Results 1 to 4 of 4
  1. #1
    szms is offline Member
    Join Date
    Jul 2012
    Posts
    4
    Rep Power
    0

    Default 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.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,820
    Rep Power
    19

    Default 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.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    szms is offline Member
    Join Date
    Jul 2012
    Posts
    4
    Rep Power
    0

    Default Re: Dynamic version control in Maven

    I see following error -

    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>

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,820
    Rep Power
    19

    Default 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.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. java -version pointing to older version
    By deepakts in forum New To Java
    Replies: 4
    Last Post: 05-06-2010, 09:59 AM
  2. Replies: 0
    Last Post: 04-20-2009, 06:26 PM
  3. web based version control
    By uttam864 in forum Threads and Synchronization
    Replies: 2
    Last Post: 02-02-2009, 04:59 AM
  4. control app width based on certain control
    By thebillybobjr in forum SWT / JFace
    Replies: 0
    Last Post: 05-15-2008, 04:52 PM
  5. Maven or ANT
    By goldhouse in forum Reviews / Advertising
    Replies: 0
    Last Post: 08-09-2007, 08:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •