1 Maven Release Plugin
Es folgt das Vorbereiten des Codes auf die neue Release (Ändern der Versionsnummer im Code, etc.) Version: 1.3.0 Develop Version: 1.3.1-SNAPSHOT Tag: tag-testingrelease-1.3.0
mvn release:prepare -Darguments=-Dmaven.test.skip=true -DautoVersionSubmodules=true -Dtag=[TAG] -DdevelopmentVersion=[Develop Version] -DreleaseVersion=[Version] -Dproject.dev.com.gentics:generic-testutils=1.0.0-SNAPSHOT -Dproject.rel.com.gentics:generic-testutils=1.0.0-SNAPSHOT
Evtl. vorhandene SNAPSHOT Dependencies müssen an dieser Stelle aufgelöst werden.
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: : 0 Dependency 'com.gentics:generic-testutils' is a snapshot (1.0.0-SNAPSHOT) : Which release version should it be set to? 1.0.0: : 1.0.0-SNAPSHOT What version should the dependency be reset to for development? 1.0.0-SNAPSHOT: :
Jenkins Script (Deprecated)
1. Switch to the checkout directory which should be prepared.
2. Execute /home/scripts/maven/prepare_release.sh
Example output:
jenkins@dev6-jenkins:/home/release_prepare/node$ /home/scripts/maven/prepare_release.sh * Location: /home/release_prepare/node * Current version is: 1.3.2-SNAPSHOT * Enter Release Version: 1.3.2 * Enter Next Develop Version: 1.3.3-SNAPSHOT ----------------------------------------- * Are these settings correct? Release will be tagged with: testing-release-1.3.2 Release version will be: 1.3.2 Next develop version will be: 1.3.3-SNAPSHOT Press any key to continue * Executing mvn release:prepare [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] Gentics .Node - Project Root [INFO] Gentics .Node - Meta [INFO] Gentics Content.Node - REST API Library [INFO] Gentics .Node - Library [INFO] Gentics .Node - Profiler Webapp [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Gentics .Node - Project Root 1.3.2-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-release-plugin:2.1:prepare (default-cli) @ node --- [INFO] Verifying that there are no local modifications... [INFO] ignoring changes on: pom.xml.next, release.properties, pom.xml.releaseBackup, pom.xml.backup, pom.xml.branch, pom.xml.tag [INFO] Executing: /bin/sh -c cd /home/release_prepare/node && git status [INFO] Working directory: /home/release_prepare/node [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: : 0 Dependency 'com.gentics:generic-testutils' is a snapshot (1.0.0-SNAPSHOT) : Which release version should it be set to? 1.0.0: : 1.0.0-SNAPSHOT What version should the dependency be reset to for development? 1.0.0-SNAPSHOT: : 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: : 0 Dependency 'com.gentics:generic-testutils' is a snapshot (1.0.0-SNAPSHOT) : Which release version should it be set to? 1.0.0: : 1.0.0-SNAPSHOT What version should the dependency be reset to for development? 1.0.0-SNAPSHOT: : [INFO] Transforming 'Gentics .Node - Project Root'... [INFO] Transforming 'Gentics .Node - Meta'... [INFO] Transforming 'Gentics Content.Node - REST API Library'... [INFO] Updating generic-testutils to 1.0.0-SNAPSHOT [INFO] Transforming 'Gentics .Node - Library'... [INFO] Updating restapi-lib to 1.3.2 [INFO] Updating generic-testutils to 1.0.0-SNAPSHOT [INFO] Transforming 'Gentics .Node - Profiler Webapp'... [INFO] Updating node-lib to 1.3.2 [INFO] Ignoring artifact version update for expression: ${project.parent.version} [INFO] Not generating release POMs . . . . Done. Project is now prepared for maven release. Your TODOs: # Check that only the maven release files are modified git status # Add the maven release files git add . # Commit the files git commit -m '@hide Prepared release' * Update the jenkins task and perform the maven release