Uploaded image for project: 'Maven Release Plugin'
  1. Maven Release Plugin
  2. MRELEASE-1022

release:prepare does not honor project.dev version predefined in release.properties

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.5.3
    • Fix Version/s: None
    • Component/s: prepare
    • Labels:
      None
    • Environment:

      Description

      Hi

      Using the release.properties defined as below

      scm.tag=rd-2019.3
      project.rel.com.scort\:rd=2019.3
      project.dev.com.scort\:rd=2019.4-SNAPSHOT
      project.rel.com.scort.merge\:mergejar=1.2.0
      project.dev.com.scort.merge\:mergejar=1.2.0
      project.rel.com.scort.plugins\:mergejar=1.2.0
      project.dev.com.scort.plugins\:mergejar=1.2.0
      

      with the command

      mvn -B release:prepare -DdryRun=true
      

      the maven-release-plugin does not use the specified 'project.dev' version to update the pom in the second phase. Here the log

      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Build Order:
      [INFO]
      [INFO] RD                                                                 [pom]
      [INFO] Jar Merger                                                         [jar]
      [INFO] MAVEN plugin to merge jar                                 [maven-plugin]
      [INFO]
      [INFO] ----------------------------< com.scort:rd >----------------------------
      [INFO] Building RD 2019.3-SNAPSHOT                                        [1/3]
      [INFO] --------------------------------[ pom ]---------------------------------
      [INFO]
      [INFO] --- maven-release-plugin:2.5.3:prepare (default-cli) @ rd ---
      [INFO] Verifying that there are no local modifications...
      [INFO]   ignoring changes on: **\pom.xml.next, **\release.properties, **\pom.xml.branch, **\pom.xml.tag, **\pom.xml.backup, **\pom.xml.releaseBackup
      [INFO] Executing: cmd.exe /X /C "git rev-parse --show-toplevel"
      [INFO] Working directory: C:\Users\fandre\Documents\MXW\RD\RD
      [INFO] Executing: cmd.exe /X /C "git status --porcelain ."
      [INFO] Working directory: C:\Users\fandre\Documents\MXW\RD\RD
      [WARNING] Ignoring unrecognized line: ?? RD/release.properties.copy
      [INFO] Checking dependencies and plugins for snapshots ...
      [INFO] Transforming 'RD'...
      [INFO]   Updating ${antmergejar} to 1.2.0
      [INFO]   Updating ${mavenmergejar} to 1.2.0
      [INFO] Transforming 'Jar Merger'...
      [INFO] Transforming 'MAVEN plugin to merge jar'...
      [INFO] Not generating release POMs
      [INFO] Executing preparation goals - since this is simulation mode it is running against the original project, not the rewritten ones
      [INFO] Executing goals 'clean verify'...
      [INFO] [INFO] Scanning for projects...
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] Reactor Build Order:
      [INFO] [INFO]
      [INFO] [INFO] RD                                                                 [pom]
      [INFO] [INFO] Jar Merger                                                         [jar]
      [INFO] [INFO] MAVEN plugin to merge jar                                 [maven-plugin]
      [INFO] [INFO]
      [INFO] [INFO] ----------------------------< com.scort:rd >----------------------------
      [INFO] [INFO] Building RD 2019.3-SNAPSHOT                                        [1/3]
      [INFO] [INFO] --------------------------------[ pom ]---------------------------------
      [INFO] [INFO]
      [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ rd ---
      [INFO] [INFO]
      [INFO] [INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven) @ rd ---
      [INFO] [INFO]
      [INFO] [INFO] ----------------------< com.scort.merge:mergejar >----------------------
      [INFO] [INFO] Building Jar Merger 1.2.0                                          [2/3]
      [INFO] [INFO] --------------------------------[ jar ]---------------------------------
      [INFO] [INFO]
      [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ mergejar ---
      [INFO] [INFO] Deleting C:\Users\fandre\Documents\MXW\RD\RD\AntMergeJar\target
      [INFO] [INFO]
      [INFO] [INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven) @ mergejar ---
      [INFO] [INFO]
      [INFO] [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ mergejar ---
      [INFO] [INFO] Using 'ISO-8859-15' encoding to copy filtered resources.
      [INFO] [INFO] Copying 1 resource
      [INFO] [INFO]
      [INFO] [INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ mergejar ---
      [INFO] [INFO] Compiling 8 source files to C:\Users\fandre\Documents\MXW\RD\RD\AntMergeJar\target\classes
      [INFO] [WARNING] C:\Users\fandre\Documents\MXW\RD\RD\AntMergeJar\sources\com\scort\tools\mergejar\Merger.java:[27,22] Log is internal proprietary API and may be removed in a future release
      [INFO] [INFO]
      [INFO] [INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ mergejar ---
      [INFO] [INFO] Using 'ISO-8859-15' encoding to copy filtered resources.
      [INFO] [INFO] skip non existing resourceDirectory C:\Users\fandre\Documents\MXW\RD\RD\AntMergeJar\src\test\resources
      [INFO] [INFO]
      [INFO] [INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ mergejar ---
      [INFO] [INFO] No sources to compile
      [INFO] [INFO]
      [INFO] [INFO] --- maven-surefire-plugin:2.14.1:test (default-test) @ mergejar ---
      [INFO] [INFO] No tests to run.
      [INFO] [INFO]
      [INFO] [INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ mergejar ---
      [INFO] [INFO] Building jar: C:\Users\fandre\Documents\MXW\RD\RD\AntMergeJar\target\mergejar-1.2.0.jar
      [INFO] [INFO]
      [INFO] [INFO] ---------------------< com.scort.plugins:mergejar >---------------------
      [INFO] [INFO] Building MAVEN plugin to merge jar 1.2.0                           [3/3]
      [INFO] [INFO] ----------------------------[ maven-plugin ]----------------------------
      [INFO] [INFO]
      [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ mergejar ---
      [INFO] [INFO] Deleting C:\Users\fandre\Documents\MXW\RD\RD\MavenMergeJar\target
      [INFO] [INFO]
      [INFO] [INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven) @ mergejar ---
      [INFO] [INFO]
      [INFO] [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ mergejar ---
      [INFO] [INFO] Using 'ISO-8859-15' encoding to copy filtered resources.
      [INFO] [INFO] skip non existing resourceDirectory C:\Users\fandre\Documents\MXW\RD\RD\MavenMergeJar\src\main\resources
      [INFO] [INFO]
      [INFO] [INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ mergejar ---
      [INFO] [INFO] Compiling 2 source files to C:\Users\fandre\Documents\MXW\RD\RD\MavenMergeJar\target\classes
      [INFO] [INFO]
      [INFO] [INFO] --- maven-plugin-plugin:2.3:descriptor (default-descriptor) @ mergejar ---
      [INFO] [INFO] Using 2 extractors.
      [INFO] [INFO] Applying extractor for language: java
      [INFO] [INFO] Extractor for language: java found 1 mojo descriptors.
      [INFO] [INFO] Applying extractor for language: bsh
      [INFO] [INFO] Extractor for language: bsh found 0 mojo descriptors.
      [INFO] [INFO]
      [INFO] [INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ mergejar ---
      [INFO] [INFO] Using 'ISO-8859-15' encoding to copy filtered resources.
      [INFO] [INFO] skip non existing resourceDirectory C:\Users\fandre\Documents\MXW\RD\RD\MavenMergeJar\test
      [INFO] [INFO]
      [INFO] [INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ mergejar ---
      [INFO] [INFO] No sources to compile
      [INFO] [INFO]
      [INFO] [INFO] --- maven-surefire-plugin:2.14.1:test (default-test) @ mergejar ---
      [INFO] [INFO] No tests to run.
      [INFO] [INFO]
      [INFO] [INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ mergejar ---
      [INFO] [INFO] Building jar: C:\Users\fandre\Documents\MXW\RD\RD\MavenMergeJar\target\mergejar-1.2.0.jar
      [INFO] [INFO]
      [INFO] [INFO] --- maven-plugin-plugin:2.3:addPluginArtifactMetadata (default-addPluginArtifactMetadata) @ mergejar ---
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] Reactor Summary:
      [INFO] [INFO]
      [INFO] [INFO] RD 2019.3-SNAPSHOT ................................. SUCCESS [  0.675 s]
      [INFO] [INFO] Jar Merger 1.2.0 ................................... SUCCESS [  1.469 s]
      [INFO] [INFO] MAVEN plugin to merge jar 1.2.0 .................... SUCCESS [  0.454 s]
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] BUILD SUCCESS
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] Total time:  3.072 s
      [INFO] [INFO] Finished at: 2019-04-19T09:52:13+02:00
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] Full run would be commit 3 files with message: '[maven-release-plugin] prepare release rd-2019.3'
      [INFO] Full run would be tagging working copy C:\Users\fandre\Documents\MXW\RD\RD with label: 'rd-2019.3'
      [INFO] Transforming 'RD'...
      [INFO]   Updating ${antmergejar} to 1.2.1-SNAPSHOT
      [INFO]   Updating ${mavenmergejar} to 1.2.1-SNAPSHOT
      [INFO] Transforming 'Jar Merger'...
      [INFO] Transforming 'MAVEN plugin to merge jar'...
      [INFO] Not removing release POMs
      [INFO] Executing completion goals - since this is simulation mode it is running against the original project, not the rewritten ones
      [INFO] Full run would be commit 3 files with message: '[maven-release-plugin] prepare for next development iteration'
      [INFO] Release preparation simulation complete.
      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Summary:
      [INFO]
      [INFO] RD 2019.3-SNAPSHOT ................................. SUCCESS [  5.366 s]
      [INFO] Jar Merger 1.2.0 ................................... SKIPPED
      [INFO] MAVEN plugin to merge jar 1.2.0 .................... SKIPPED
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  6.073 s
      [INFO] Finished at: 2019-04-19T09:52:14+02:00
      [INFO] ------------------------------------------------------------------------
      
      

      Version of both modules will be set to 1.2.1-SNAPSHOT it should be 1.2.0

       

      Below the pom.xml.next of one of the modules

      <?xml version="1.0" encoding="UTF-8"?>
      
      <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/maven-v4_0_0.xsd ">
      
          <modelVersion>4.0.0</modelVersion>
      
          <parent>
              <groupId>com.scort</groupId>
              <artifactId>rd</artifactId>
              <relativePath>../</relativePath>
              <version>2019.4-SNAPSHOT</version>
          </parent>
      
          <groupId>com.scort.plugins</groupId>
          <artifactId>mergejar</artifactId>
          <version>1.2.1-SNAPSHOT</version>
          <packaging>maven-plugin</packaging>
      
          <name>MAVEN plugin to merge jar</name>
          <inceptionYear>2007</inceptionYear>
          <description>MAVEN plugin to merge jar using the mergejar library</description>
      
          <dependencyManagement>
              <dependencies>
                  <dependency>
                      <groupId>org.apache.maven</groupId>
                      <artifactId>maven-project</artifactId>
                      <version>2.0.7</version>
                  </dependency>
                  <dependency>
                      <groupId>org.apache.maven</groupId>
                      <artifactId>maven-plugin-api</artifactId>
                      <version>2.0.7</version>
                  </dependency>
                  <dependency>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-jar-plugin</artifactId>
                      <version>2.2</version>
                  </dependency>
                  <dependency>
                      <groupId>org.apache.maven</groupId>
                      <artifactId>maven-artifact</artifactId>
                      <version>2.0.7</version>
                  </dependency>
              
              </dependencies>
          </dependencyManagement>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven</groupId>
              <artifactId>maven-project</artifactId>
            </dependency>
            <dependency>
              <groupId>org.apache.maven</groupId>
              <artifactId>maven-plugin-api</artifactId>
            </dependency>
            <dependency>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-jar-plugin</artifactId>
            </dependency>
            <dependency>
              <groupId>org.apache.maven</groupId>
              <artifactId>maven-artifact</artifactId>
            </dependency>
            <dependency>
              <groupId>com.scort.merge</groupId>
              <artifactId>mergejar</artifactId>
            </dependency>
          </dependencies>
      
          <build>
              <sourceDirectory>src</sourceDirectory>
              <testSourceDirectory>test</testSourceDirectory>
              <testResources>
                  <testResource>
                      <directory>test</directory>
                      <includes>
                          <include>**/*.properties</include>
                      </includes>
                  </testResource>
              </testResources>
             
              <plugins>
                  <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-plugin-plugin</artifactId>
                      <version>2.3</version>
                  </plugin>
              </plugins>    
          </build>
          
      </project>
      
      

        Attachments

        1. pom.xml
          22 kB
          zosrothko
        2. release.properties
          0.3 kB
          zosrothko
        3. release.properties.dryRun
          1 kB
          zosrothko
        4. mvn.log
          9 kB
          zosrothko
        5. pom.xml
          1 kB
          zosrothko
        6. pom.xml
          3 kB
          zosrothko

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              zosrothko zosrothko
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: