Dear mailing list,

as far as I understand Maven, the benefit of a deployed artifact is that regarding to the pom the dependencies are
fixed to a version and aren't changing anymore.

But how do I nail down a specific version, if I have defined it with a property in my pom and set a new value in
a profile like:

....
<dependency>
  <groupId>com.myCompany</groupId>
  <artifactId>dependendProject</artifactId>
  <version>${useVersion}</version>
</dependency>

....

<properties>
  <useVersion>1.0.0</useVersion>
</properties>

<profiles>
  <profile>
    <id>aProfile</id>
    <properties>
      <useVersion>1.1.0</useVersion>
    </properties>
    ....

If I now deploy the project with "mvn clean deploy -PaProfile" and someone uses my project as dependency he/she will get the "dependendProject" with version 1.0.0 instead of 1.1.0 as transitive dependency, because the default
property for "useVersion" is 1.0.0.

Is there a way to remove all dynamic content in the deployed pom, that all properties are fixed?

Thank you for your answers,
Marco


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to