You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Markus KARG (JIRA)" <ji...@codehaus.org> on 2013/11/07 16:59:52 UTC

[jira] (MRELEASE-837) Release plugin resets parent to outdated version

    [ https://jira.codehaus.org/browse/MRELEASE-837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=335354#comment-335354 ] 

Markus KARG commented on MRELEASE-837:
--------------------------------------

I reproduced this today and the bug still exists. As you can see, the plugin asks what the next development snapshot of parent is, and suggests 1.1-SNAPSHOT. I agreed to this, everything works without any error message, but after that the POM still uses the OLD 1.0-SNAPSHOT parent!

POM before release:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <artifactId>my-artifact</artifactId>
  <version>1.1-SNAPSHOT</version>
  <name>my-artifact</name>
  <parent>
    <groupId>my.group</groupId>
    <artifactId>my-parent</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <scm>
    <developerConnection>scm:svn:svn://svn/Research/my-artifact/trunk</developerConnection>
  </scm>
  <distributionManagement>
    <repository>
      <id>releases</id>
      <url>http://nexus.quipsy.local/nexus/content/repositories/releases</url>
    </repository>
    <snapshotRepository>
      <id>snapshots</id>
      <url>http://nexus.quipsy.local/nexus/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>
</project>

Preparing and performing the release:

C:\Users\Markus Karg\workspace\artifact\my-artifact>mvn release:prepare release:perform
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building my-artifact 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-release-plugin:2.0:prepare (default-cli) @ my-artifact ---
[INFO] Verifying that there are no local modifications...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive status"
[INFO] Working directory: C:\Users\Markus Karg\workspace\artifact\my-artifact
[INFO] Checking dependencies and plugins for snapshots ...
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: :
Resolve Project Dependency Snapshots.: 'my.group:my-parent' set to release? (yes/no) yes: :
What is the next development version? (1.1-SNAPSHOT) 1.1-SNAPSHOT: :
What is the release version for "my-artifact"? (my.group:my-artifact) 1.0: :
What is SCM release tag or label for "my-artifact"? (my.group:my-artifact) my-artifact-1.0: :
What is the new development version for "my-artifact"? (my.group:my-artifact) 1.1-SNAPSHOT: :
[INFO] Transforming 'my-artifact'...
[INFO] Not generating release POMs
[INFO] Executing goals 'clean verify'...
[WARNING] Maven will be executed in interactive mode, but no input stream has been configured for this MavenInvoker instance.
[INFO] [INFO] Scanning for projects...
[INFO] [INFO]
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Building my-artifact 1.0
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO]
[INFO] [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ my-artifact ---
[INFO] [INFO]
[INFO] [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ my-artifact ---
[INFO] [debug] execute contextualize
[INFO] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] [INFO] skip non existing resourceDirectory C:\Users\Markus Karg\workspace\artifact\my-artifact\src\main\resources
[INFO] [INFO]
[INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ my-artifact ---
[INFO] [INFO] No sources to compile
[INFO] [INFO]
[INFO] [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ my-artifact ---
[INFO] [debug] execute contextualize
[INFO] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] [INFO] skip non existing resourceDirectory C:\Users\Markus Karg\workspace\artifact\my-artifact\src\test\resources
[INFO] [INFO]
[INFO] [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ my-artifact ---
[INFO] [INFO] No sources to compile
[INFO] [INFO]
[INFO] [INFO] --- maven-surefire-plugin:2.10:test (default-test) @ my-artifact ---
[INFO] [INFO] No tests to run.
[INFO] [INFO] Surefire report directory: C:\Users\Markus Karg\workspace\artifact\my-artifact\target\surefire-reports
[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO]
[INFO] Results :
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] [INFO]
[INFO] [INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ my-artifact ---
[INFO] [WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] [INFO] Building jar: C:\Users\Markus Karg\workspace\artifact\my-artifact\target\my-artifact-1.0.jar
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD SUCCESS
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 1.669s
[INFO] [INFO] Finished at: Thu Nov 07 16:51:37 CET 2013
[INFO] [INFO] Final Memory: 8M/86M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] Checking in modified POMs...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive commit --file C:\Users\MARKUS~1\AppData\Local\Temp\maven-scm-1833971603.commit --targets C:\Users\MARKUS~
1\AppData\Local\Temp\maven-scm-6393151358719095528-targets"
[INFO] Working directory: C:\Users\Markus Karg\workspace\artifact\my-artifact
[INFO] Tagging release with the label my-artifact-1.0...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive copy --file C:\Users\MARKUS~1\AppData\Local\Temp\maven-scm-1626719244.commit --revision 24574 svn://svn/R
esearch/my-artifact/trunk svn://svn/Research/my-artifact/tags/my-artifact-1.0"
[INFO] Working directory: C:\Users\Markus Karg\workspace\artifact\my-artifact
[INFO] Transforming 'my-artifact'...
[INFO] Not removing release POMs
[INFO] Checking in modified POMs...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive commit --file C:\Users\MARKUS~1\AppData\Local\Temp\maven-scm-868179206.commit --targets C:\Users\MARKUS~1
\AppData\Local\Temp\maven-scm-7809457724306865748-targets"
[INFO] Working directory: C:\Users\Markus Karg\workspace\artifact\my-artifact
[INFO] Release preparation complete.
[INFO]
[INFO] --- maven-release-plugin:2.0:perform (default-cli) @ my-artifact ---
[INFO] Checking out the project to perform the release ...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive checkout svn://svn/Research/my-artifact/tags/my-artifact-1.0 "C:\Users\Markus Karg\workspace\artifact\my-
artifact\target\checkout""
[INFO] Working directory: C:\Users\Markus Karg\workspace\artifact\my-artifact\target
[INFO] Executing goals 'deploy'...
[WARNING] Maven will be executed in interactive mode, but no input stream has been configured for this MavenInvoker instance.
[INFO] [INFO] Scanning for projects...
[INFO] [WARNING]
[INFO] [WARNING] Some problems were encountered while building the effective model for my.group:my-artifact:jar:1.0
[INFO] [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing.
[INFO] [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-deploy-plugin is missing.
[INFO] [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing.
[INFO] [WARNING]
[INFO] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[INFO] [WARNING]
[INFO] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[INFO] [WARNING]
[INFO] [INFO]
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Building my-artifact 1.0
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO]
[INFO] [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ my-artifact ---
[INFO] [debug] execute contextualize
[INFO] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] [INFO] skip non existing resourceDirectory C:\Users\Markus Karg\workspace\artifact\my-artifact\target\checkout\src\main\resources
[INFO] [INFO]
[INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ my-artifact ---
[INFO] [INFO] No sources to compile
[INFO] [INFO]
[INFO] [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ my-artifact ---
[INFO] [debug] execute contextualize
[INFO] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] [INFO] skip non existing resourceDirectory C:\Users\Markus Karg\workspace\artifact\my-artifact\target\checkout\src\test\resources
[INFO] [INFO]
[INFO] [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ my-artifact ---
[INFO] [INFO] No sources to compile
[INFO] [INFO]
[INFO] [INFO] --- maven-surefire-plugin:2.10:test (default-test) @ my-artifact ---
[INFO] [INFO] No tests to run.
[INFO] [INFO] Surefire report directory: C:\Users\Markus Karg\workspace\artifact\my-artifact\target\checkout\target\surefire-reports
[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO]
[INFO] Results :
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] [INFO]
[INFO] [INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ my-artifact ---
[INFO] [WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] [INFO] Building jar: C:\Users\Markus Karg\workspace\artifact\my-artifact\target\checkout\target\my-artifact-1.0.jar
[INFO] [INFO]
[INFO] [INFO] >>> maven-source-plugin:2.2.1:jar (attach-sources) @ my-artifact >>>
[INFO] [INFO]
[INFO] [INFO] <<< maven-source-plugin:2.2.1:jar (attach-sources) @ my-artifact <<<
[INFO] [INFO]
[INFO] [INFO] --- maven-source-plugin:2.2.1:jar (attach-sources) @ my-artifact ---
[INFO] [INFO] No sources in project. Archive not created.
[INFO] [INFO]
[INFO] [INFO] --- maven-javadoc-plugin:2.9.1:jar (attach-javadocs) @ my-artifact ---
[INFO] [INFO]
[INFO] [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ my-artifact ---
[INFO] [INFO] Installing C:\Users\Markus Karg\workspace\artifact\my-artifact\target\checkout\target\my-artifact-1.0.jar to C:\Users\Markus Karg\.m2\repository\m
y\group\my-artifact\1.0\my-artifact-1.0.jar
[INFO] [INFO] Installing C:\Users\Markus Karg\workspace\artifact\my-artifact\target\checkout\pom.xml to C:\Users\Markus Karg\.m2\repository\my\group\my-artifact
\1.0\my-artifact-1.0.pom
[INFO] [INFO]
[INFO] [INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ my-artifact ---
[INFO] Uploading: http://nexus.quipsy.local/nexus/content/repositories/releases/my/group/my-artifact/1.0/my-artifact-1.0.jar
[INFO] 2/2 KB
[INFO]
[INFO] Uploaded: http://nexus.quipsy.local/nexus/content/repositories/releases/my/group/my-artifact/1.0/my-artifact-1.0.jar (2 KB at 5.3 KB/sec)
[INFO] Uploading: http://nexus.quipsy.local/nexus/content/repositories/releases/my/group/my-artifact/1.0/my-artifact-1.0.pom
[INFO] 971/971 B
[INFO]
[INFO] Uploaded: http://nexus.quipsy.local/nexus/content/repositories/releases/my/group/my-artifact/1.0/my-artifact-1.0.pom (971 B at 6.7 KB/sec)
[INFO] Downloading: http://nexus.quipsy.local/nexus/content/repositories/releases/my/group/my-artifact/maven-metadata.xml
[INFO]
[INFO] Uploading: http://nexus.quipsy.local/nexus/content/repositories/releases/my/group/my-artifact/maven-metadata.xml
[INFO] 295/295 B
[INFO]
[INFO] Uploaded: http://nexus.quipsy.local/nexus/content/repositories/releases/my/group/my-artifact/maven-metadata.xml (295 B at 2.6 KB/sec)
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD SUCCESS
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 3.962s
[INFO] [INFO] Finished at: Thu Nov 07 16:51:43 CET 2013
[INFO] [INFO] Final Memory: 18M/136M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] Cleaning up after release...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 54.662s
[INFO] Finished at: Thu Nov 07 16:51:43 CET 2013
[INFO] Final Memory: 11M/135M
[INFO] ------------------------------------------------------------------------
C:\Users\Markus Karg\workspace\artifact\my-artifact>

POM after the release:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <artifactId>my-artifact</artifactId>
  <version>1.1-SNAPSHOT</version>
  <name>my-artifact</name>
  <parent>
    <groupId>my.group</groupId>
    <artifactId>my-parent</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <scm>
    <developerConnection>scm:svn:svn://svn/Research/my-artifact/trunk</developerConnection>
  </scm>
  <distributionManagement>
    <repository>
      <id>releases</id>
      <url>http://nexus.quipsy.local/nexus/content/repositories/releases</url>
    </repository>
    <snapshotRepository>
      <id>snapshots</id>
      <url>http://nexus.quipsy.local/nexus/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>
</project>

In fact this works well as soon as this POM is used as a module within the parent. Also if there would be dependencies, they will correctly get processed. Hence, only parent version in non-module POMs have this problem!
                
> Release plugin resets parent to outdated version
> ------------------------------------------------
>
>                 Key: MRELEASE-837
>                 URL: https://jira.codehaus.org/browse/MRELEASE-837
>             Project: Maven Release Plugin
>          Issue Type: Bug
>          Components: prepare
>            Reporter: Markus KARG
>            Priority: Critical
>
> Using Maven 3.0.4 I noticed that the release plugin resets the parent to an outdated version. Here is what I noticed with all of my Projects when doing "mvn release:prepare":
> * Asks whether I want to update the parent version. I say "yes".
> * Asks whether "1.1" is the correct release version of paren, which is true.
> * Asks whether "1.2-SNAPSHOT" is the correct developer version of parent, which is true.
> * Asks whether "1.1" is the correct release version of child, which is true.
> * Asks whether "1.2-SNAPSHOT" is the correct developer version of child, which is true.
> After perform is done, my pom has different versions for parent and child:
> * Child correctly has "1.2-SNAPSHOT"
> * Parent incorrectly is reset to "1.1-SNAPSHOT"
> This is simple to fix in each POM, but annoying when releasing much and often. Hence I would be glad if this could get fixed soon.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira