maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Schaller (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MRELEASE-923) mvn release:prepare-with-pom doesn't replace SNAPSHOTs defined in a SNAPSHOT parent
Date Thu, 31 Mar 2016 09:30:25 GMT

     [ https://issues.apache.org/jira/browse/MRELEASE-923?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andreas Schaller updated MRELEASE-923:
--------------------------------------
    Labels:   (was: build maven)

> mvn release:prepare-with-pom doesn't replace SNAPSHOTs defined in a SNAPSHOT parent
> -----------------------------------------------------------------------------------
>
>                 Key: MRELEASE-923
>                 URL: https://issues.apache.org/jira/browse/MRELEASE-923
>             Project: Maven Release Plugin
>          Issue Type: Bug
>          Components: prepare-with-pom
>    Affects Versions: 2.5.2, 2.5.3
>            Reporter: Andreas Schaller
>            Priority: Blocker
>
> If I use a SNAPSHOT version of a plugin within a parent pom that is also a SNAPSHOT,
the mvn release:prepare-with-pom can't replace it with its released version.
> I'm asked:
> {noformat}
> There are still some remaining snapshot dependencies.
> : Do you want to resolve them now? (yes/no) no: : yes
> Dependency type to resolve,: specify the selection number ( 0:All 1:Project Dependencies
2:Plugins 3:Reports 4:Extensions ): (0/1/2/3) 1: : 
> Dependency 'my.group:my.dependency' is a snapshot (1.0.0-SNAPSHOT)
> : Which release version should it be set to? 1.0.0: : 
> What version should the dependency be reset to for development? 1.0.0: : 1.0.1-SNAPSHOT
> Dependency 'my.group:my.parent' is a snapshot (1.0.0-SNAPSHOT)
> : Which release version should it be set to? 1.0.0: : 
> What version should the dependency be reset to for development? 1.0.0: : 1.0.1-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 40.211s
> [INFO] Finished at: Wed Sep 23 13:35:33 CEST 2015
> [INFO] Final Memory: 17M/157M
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.2:prepare-with-pom
(default-cli) on project my.project: Can't release project due to non released dependencies
:
> [ERROR] my.group:my.maven.plugin:maven-plugin:1.0.0-SNAPSHOT:runtime
> {noformat}
> Example parent pom:
> {code:xml}
> <project>
>     <groupId>my.group</groupId>
>     <artifactId>my.parent</artifactId>
>     <version>1.0.0-SNAPSHOT</version>
>     <packaging>pom</packaging>
>     <profiles>
>         <profile>
>             <id>java-packaging-tools</id>
>             <activation>
>                 <activeByDefault>true</activeByDefault>
>             </activation>
>             <build>
>                 <plugins>
>                     <plugin>
>                         <groupId>my.group</groupId>
>                         <artifactId>my.maven.plugin</artifactId>
>                         <version>1.0.0-SNAPSHOT</version>
>                     </plugin>
>                 </plugins>
>             </build>
>         </profile>
>     </profiles>
> </project>
> {code}
> Example project pom:
> {code:xml}
> <project>
>     <groupId>my.group</groupId>
>     <artifactId>my.project</artifactId>
>     <version>1.0.0-SNAPSHOT</version>
>     <dependencies>
>         <dependency>
>             <groupId>my.group</groupId>
>             <artifactId>my.dependency</artifactId>
>             <version>1.0.0-SNAPSHOT</version>
>         </dependency>
>     </dependencies>
> </project>
> {code}
> So first of all, why are the transitive dependencies resolved before the parent?
> And now the issue: in the released version of my.parent (1.0.0) there is also the released
version of my.maven.plugin (1.0.0) so why is the relase:prepare-with-pom failing?
> If I manually set the parent version to 1.0.0 before I run mvn relase:prepare-with-pom
everything works fine as expected.
> Also I when use the option "Dependency type to resolve,: specify the selection number
( 0:All 1:Project Dependencies 2:Plugins 3:Reports 4:Extensions ): (0/1/2/3) 1: : 0" I'm asked
for the relese version of the my.maven.plugin and can perform the release as expected.
> And a last question: why is the default answer for the "What version should the dependency
be reset to for development?" question always the released version and not the next SNAPSHOT
version?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message