Java Programming: ZQ: Overide project and dependency versions using command line attribute

  • rahamim_zvi_zvi / 116 / Mon, 04 May 2009 03:39:00 GMT / Comments (0)
  • Thank you both,
    Suppose I use the Maven using a java code (MavenEmbedder~).
    How can I leverage this in order to change the parameter values (my-app and my-app2 versions)?
    Thanks

    Message
    From: Arnaud Bailly [mailto:abailly (AT) oqube (DOT) com]
    Sent: Monday, November 06, 2006 11:39 AM
    To: Maven Users List
    Subject: Re: ZQ: project and dependency versions using command line attribute

    franz see <franz.see (AT) gmail (DOT) comwrites:

    Good day to you, Rahamim,

    I don't think that is possible. IIRC, Dependencies are resolved before
    any filtering can take place :-)

    +1

    >
    >Hi,
    >I have a project my-app that depends on my-app-2.
    >The version that is specified in that file is version 1.0.0 for
    >my-app and 2.0.0 for my-app2.
    >I want, without modifying the pom.xml file, to build deploy my-app
    >but with version 1.0.1 that uses my-app2's version 2.0.1 Can you tell
    >me how to do it using command line property parameters?
    >Thanks!
    >


    But may be this objective can be reached using profiles and dependencyManagement. Set one profile with 1.0.0 dependency and another with 2.0.0 and choose which profile to run on command line with -P <profilename>. Note that these profiles must be defined in the PM, not settings.xml.

    HTH
    regards
  • Keywords:

    zq, overide, project, dependency, versions, command, line, attribute, java, programming

  • http://java.itags.org/java-programming/332353/«« Last Thread - Next Thread »»