Axel Fontaine created MNG-5614:
----------------------------------

             Summary: Continuous Delivery Friendly Versions not present in 
installed artifacts
                 Key: MNG-5614
                 URL: https://jira.codehaus.org/browse/MNG-5614
             Project: Maven 2 & 3
          Issue Type: Bug
    Affects Versions: 3.2.1
            Reporter: Axel Fontaine


Consider a parent pom with these tags:
...
<version>${revision}</version>
...
<properties>
        <revision>0-SNAPSHOT</revision>
</properties>
...

If I start the build with:
  mvn install -Drevision=666

The revision gets replaced correctly at runtime (correct), but the placeholder 
remains in the installed artifact in the local repository (wrong).

To make matters worse, if you have a Maven Plugin child module with these tags 
in the pom:
...
<parent>
        <groupId>com.boxfuse.client</groupId>
        <artifactId>boxfuse-client</artifactId>
        <version>${revision}</version>
</parent>
...
<packaging>maven-plugin</packaging>
...
<dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>other-artifact</artifactId>
            <version>${project.version}</version>
        </dependency>
</dependencies>

Once the plugin gets used in yet another module, the resolution of 
other-artifact will fail at runtime with:
 Plugin ...:666 or one of its dependencies could not be resolved: Could not 
find artifact ...:other-artifact:jar:0-SNAPSHOT

Until this is fixed the functionality provided by MNG-5576 is virtually useless.

By speaking about the fix, why bother with replacing variables? Why bother with 
parent POMs? How about simply installing and deploying the effective POM? This 
would solve a whole range of problems at once. And at the end of the day, this 
will simplify many things, at the cost of slightly larger installed POMs.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to