This question has also been posted to stackoverflow.com:

http://stackoverflow.com/questions/335781/how-can-maven-be-used-in-a-continu
ous-integration-situation-to-install-versione

--

We are in the process of converting our main build process from ant to
maven. We use TeamCity for our Continuous Integration server (CI).

We'd like to use the CI server to kick off (nightly) builds whose version
contain a build number, as in 1.0.0.build#. These builds would be installed
in our local maven repository to be used by other projects. So the CI server
would manage the versions, maven would build the project, and the maven
repository would make the builds accessible to other projects.

I intended to initiate the build from the CI server using the following
command:

    mvn -Dversion=1.0.0.25 install

The project's pom would have a bogus version number, and the -D flag would
override it, as in:

    <version>0.0.0.0</version>


The problem with this method is that the maven install plugin only uses the
version in the pom file, not the version passed in on the command line. This
is noted in [this maven issue][1].

So since this issue has existed since 08/2006 and has not been fixed, I
assume that this is somehow not '*the maven way*'. So my question is, how
can maven be used in a continuous integration situation to install versioned
artifacts in the repository?

  [1]: http://jira.codehaus.org/browse/MINSTALL-30


Thank you.


Matthew Jaskula
Engineer
Advanced Trading Solutions
NYSE Euronext
22 Cortlandt Street, Suite 1101
New York, New York 10007
United States
t +1 212.542.8299
www.nyseeuronext.com



Visit our website at http://www.nyse.com

****************************************************

Note:  The information contained in this message and any attachment
to it is privileged, confidential and protected from disclosure.  If the 
reader of this message is not the intended recipient, or an employee
or agent responsible for delivering this message to the intended 
recipient, you are hereby notified that any dissemination, 
distribution or copying of this communication is strictly prohibited.
If you have received this communication in error, please notify the 
sender immediately by replying to the message, and please delete
it from your system. Thank you.  NYSE Euronext, Inc.

Reply via email to