Return-Path: X-Original-To: apmail-maven-users-archive@www.apache.org Delivered-To: apmail-maven-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 623DA11FB5 for ; Fri, 29 Aug 2014 15:08:48 +0000 (UTC) Received: (qmail 98786 invoked by uid 500); 29 Aug 2014 15:08:46 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 98703 invoked by uid 500); 29 Aug 2014 15:08:46 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 98689 invoked by uid 99); 29 Aug 2014 15:08:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Aug 2014 15:08:45 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [207.46.163.185] (HELO na01-bn1-obe.outbound.protection.outlook.com) (207.46.163.185) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Aug 2014 15:08:17 +0000 Received: from BY1PR0401MB1158.namprd04.prod.outlook.com (25.160.193.155) by BY1PR0401MB1157.namprd04.prod.outlook.com (25.160.193.154) with Microsoft SMTP Server (TLS) id 15.0.995.14; Fri, 29 Aug 2014 15:08:14 +0000 Received: from BY1PR0401MB1158.namprd04.prod.outlook.com ([25.160.193.155]) by BY1PR0401MB1158.namprd04.prod.outlook.com ([25.160.193.155]) with mapi id 15.00.1015.018; Fri, 29 Aug 2014 15:08:14 +0000 From: Mark Gibson To: "users@maven.apache.org" Subject: Maven Release Plugin - release:branch: branch versions not set as expected Thread-Topic: Maven Release Plugin - release:branch: branch versions not set as expected Thread-Index: Ac/Dl33UXIq2wVrYR/iMH5X2Etz1AA== Date: Fri, 29 Aug 2014 15:08:14 +0000 Message-ID: <7601b980809d48fd8af59d86841fadc2@BY1PR0401MB1158.namprd04.prod.outlook.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [77.67.62.178] x-microsoft-antispam: BCL:0;PCL:0;RULEID: x-forefront-prvs: 0318501FAE x-forefront-antispam-report: SFV:NSPM;SFS:(6009001)(199003)(189002)(16236675004)(54356999)(107886001)(66066001)(15975445006)(101416001)(99286002)(110136001)(81342001)(2351001)(229853001)(46102001)(107046002)(99396002)(105586002)(76576001)(77096002)(81542001)(87936001)(33646002)(83322001)(21056001)(19625215002)(19580405001)(31966008)(86362001)(20776003)(19580395003)(77982001)(80022001)(19300405004)(79102001)(74662001)(83072002)(92566001)(4396001)(90102001)(74316001)(74502001)(76482001)(15202345003)(2656002)(85306004)(95666004)(64706001)(108616004)(50986999)(85852003)(106356001)(2501001)(24736002);DIR:OUT;SFP:;SCL:1;SRVR:BY1PR0401MB1157;H:BY1PR0401MB1158.namprd04.prod.outlook.com;FPR:;MLV:sfv;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Content-Type: multipart/alternative; boundary="_000_7601b980809d48fd8af59d86841fadc2BY1PR0401MB1158namprd04_" MIME-Version: 1.0 X-OriginatorOrg: deltaonesolutions.com X-Virus-Checked: Checked by ClamAV on apache.org --_000_7601b980809d48fd8af59d86841fadc2BY1PR0401MB1158namprd04_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable (please see bottom of email for environment/version information) I am trying to use the "release:branch" goal to create a branch, setting th= e version in the POMs in both the new branch and the working copies. No ma= tter what properties I define on the command line, the release plugin is ov= erriding the branch version information to what it thinks (incorrectly in m= y opinion) it should be. It looks like the release version is being set ei= ther by calculation from current project version, or supplied development v= ersion. I.e. when calling Maven with the following (snippet) -DreleaseVersion=3D1.0.0 -DdevelopmentVersion=3D1.0.1-SNAPSHOT -DupdateVersionsToSnapshot=3Dfalse -DdryRun=3Dtrue The version in all the pom.xml.next files is as expected (1.0.1-SNAPSHOT), = but the version in all the pom.xml.branch files is not as expected (1.0.1-S= NAPSHOT when I would expect 1.0.0). Am I missing something that would explain why the above is correct? Or am = I missing something obvious in how to configure the plugin to work as expec= ted? (I've included a very simple repro in the grey breakout box below ) Thanks Mark Very simple setup to demonstrate: Project structure | pom.xml | +---child-one | pom.xml | \---child-two pom.xml Root pom.xml 4.0.0 org.gibbo gibbo-pom 1.0-SNAPSHOT pom Gibbo Parent POM child-one child-two UTF-8 scm:git:ssh://git@bitbucket.org/mwgibson/gibbo.git scm:git:ssh://git@bitbucket.org/mwgibson/gibbo.git https://bitbucket.org/mwgibson/gibbo org.apache.maven.plugins maven-scm-plugin 1.9.1 org.apache.maven.plugins maven-release-plugin 2.5 child-one pom.xml 4.0.0 org.gibbo gibbo-pom 1.0-SNAPSHOT ../pom.xml child-one pom Gibbo Child One POM child-two pom.xml 4.0.0 org.gibbo gibbo-pom 1.0-SNAPSHOT ../pom.xml child-two pom Gibbo Child Two POM Command Line mvn --batch-mode ^ release:branch ^ -DautoVersionSubmodules=3Dtrue ^ -DupdateBranchVersions=3Dtrue ^ -DupdateWorkingCopyVersions=3Dtrue ^ -DupdateDependencies=3Dtrue ^ -DupdateVersionsToSnapshot=3Dfalse ^ -DpushChanges=3Dfalse ^ -DremoteTagging=3Dfalse ^ -DsuppressCommitBeforeBranch=3Dfalse ^ -DbranchName=3DRELEASE-%1 ^ -DreleaseVersion=3D%1 ^ -DdevelopmentVersion=3D%2-SNAPSHOT ^ -DdryRun=3Dtrue I've tried specifying all modules independently (with the -Dproject.rel.org= .gibbo:child-one etc pattern), but the release versions in the branch are s= till overridden incorrectly. mvn --version Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T14= :51:42+01:00) Maven home: C:\MyProgramFiles\apache-maven-3.2.2\bin\.. Java version: 1.7.0_60, vendor: Oracle Corporation Java home: C:\Program Files\Java\jdk1.7.0_60\jre Default locale: en_GB, platform encoding: Cp1252 OS name: "windows 8", version: "6.2", arch: "amd64", family: "windows" git --version git version 1.9.4.msysgit.1 Maven-release-plugin 2.5 Maven-scm-plugin 1.9.1 --_000_7601b980809d48fd8af59d86841fadc2BY1PR0401MB1158namprd04_--