Re: Applying Jenkins build number

2018-11-22 Thread Karl Heinz Marbaise

Hi,

On 22/11/18 22:24, Francois MAROT wrote:

The new way to deal with such situation is described here:
https://maven.apache.org/maven-ci-friendly.html


 0-SNAPSHOT


1.2.${revision}

and let Jenkins run Maven like this mvn deploy
-Drevision=${env.BUILD_NUMBER} (or maybe just $BUILD_NUMBER depending on the
way you run Jenkins)


Please add the configuration for flatten-maven-plugin to your 
configuration as described on the mentioned page...


Kind regards
Karl Heinz Marbaise

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Applying Jenkins build number

2018-11-22 Thread Francois MAROT
The new way to deal with such situation is described here:
https://maven.apache.org/maven-ci-friendly.html


0-SNAPSHOT


1.2.${revision}

and let Jenkins run Maven like this mvn deploy
-Drevision=${env.BUILD_NUMBER} (or maybe just $BUILD_NUMBER depending on the
way you run Jenkins)



--
Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Applying Jenkins build number

2018-11-22 Thread Anders Hammar
Why not just update the pom (but not commit to scm) with a step like
mvn versions:set -DnewVersion=$newVersion
?

And newVersion you would parse from the pom file and add ${build.number} to
it.

/Anders

On Thu, Nov 22, 2018 at 12:14 PM Jochen Wiedmann 
wrote:

> Hi,
>
> when running Maven outside of Jenkins, I have the version number (for
> example) 1.2, which is just fine. However, within Jenkins I'd like
> that to be 1.2.${build.number}. Is that possible without overwriting
> the version number in the pom with every build? For example, by using
> a "jenkins" profile, which overwrites the project version somehow?
>
> Thanks,
>
> Jochen
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Applying Jenkins build number

2018-11-22 Thread Jochen Wiedmann
Hi,

when running Maven outside of Jenkins, I have the version number (for
example) 1.2, which is just fine. However, within Jenkins I'd like
that to be 1.2.${build.number}. Is that possible without overwriting
the version number in the pom with every build? For example, by using
a "jenkins" profile, which overwrites the project version somehow?

Thanks,

Jochen

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org