maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Elmström (JIRA) <>
Subject [jira] [Commented] (MNG-5614) Continuous Delivery Friendly Versions not present in installed artifacts
Date Wed, 19 Aug 2015 15:18:45 GMT


Johan Elmström commented on MNG-5614:

I ran into the same problem, but it seemed like it did not affect all submodules in my project,
which seems a bit strange, but I am not that familiar with how maven build multi-module projects.It
could be a threading issue as the same error does not appear in my simple project created
to expose the bug.

I found that the easiest workaround was to place the dependencies in the root pom under dependencyManagement


And then refer to the dependencies in sub-module without the version. This seems fairly stable..

> Continuous Delivery Friendly Versions not present in installed artifacts
> ------------------------------------------------------------------------
>                 Key: MNG-5614
>                 URL:
>             Project: Maven
>          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
> ...
> <parent>
>         ...
>         <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
> 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

View raw message