Dynamic version control in Maven
Hello..
I am working on cross dependent projects in order to build using Maven.
At this moment I am hard coding the version # for dependent project.
Is there any way it can be done dynamically which will reduce manual intervention in the build process?
Thank you.
Re: Dynamic version control in Maven
<version>LATEST</version>
This is fine for your stuff during development, but I wouldn't recommend it for third party dependencies as you lose all control over what you include.
Re: Dynamic version control in Maven
I see following error -
Quote:
INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.772s
[INFO] Finished at: Wed Jul 25 11:24:57 ADT 2012
[INFO] Final Memory: 5M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project projectB: Could not resolve dependencies for project net.talk:projectB:pom:1.0.33-SNAPSHOT: Failed to collect dependencies for [net.talk:projectB-module:war:LATEST (runti
me), junit:junit:jar:3.8.1 (test)]: Failed to read artifact descriptor for net.talk:projectB-module:war:LATEST: Failed to resolve version for net.talk:projectB-module:war:LATEST: Failure to find net.talk:projectB-
module/maven-metadata.xml in
http://url:8080/archiva/repository/internal/ was cached in the local repository, resolution will not be reattempted until the update interval of archiva.internal h
as elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/d...utionException
This is what I have on pom.xml in projectB. projectB depends on projectB-module.
<dependency>
<groupId>groupId</groupId>
<artifactId>projectB-module</artifactId>
<version>LATEST</version>
<type>war</type>
<scope>runtime</scope>
</dependency>
Re: Dynamic version control in Maven
Not sure offhand what's causing that.
LATEST is the way (albeit not recommended for general use) of telling maven to get the latest version of a dependency.
I can only suggest digging through the Maven docs and seeing if there's something else up with your pom or general setup.