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 8AE62181D4 for ; Tue, 8 Mar 2016 19:33:34 +0000 (UTC) Received: (qmail 47305 invoked by uid 500); 8 Mar 2016 19:33:33 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 47230 invoked by uid 500); 8 Mar 2016 19:33:33 -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 47211 invoked by uid 99); 8 Mar 2016 19:33:32 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Mar 2016 19:33:32 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 6202318060A for ; Tue, 8 Mar 2016 19:33:32 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 8N-z3M8kr6wZ for ; Tue, 8 Mar 2016 19:33:29 +0000 (UTC) Received: from mail-ob0-f178.google.com (mail-ob0-f178.google.com [209.85.214.178]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id E01645F1B3 for ; Tue, 8 Mar 2016 19:33:28 +0000 (UTC) Received: by mail-ob0-f178.google.com with SMTP id ts10so24358284obc.1 for ; Tue, 08 Mar 2016 11:33:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=HthXAZSMN5qzDQRvBuOesb4cH2jbEj1xd48HTHdSxtA=; b=QdIy++zGfskOC+SXN5pgFu+QhYW8BBTHGI7yOdXHPj4pTJ8GMQrwsb9yd/FnqXVW1k 6MOIkAxwdu7KrWk6WGIbjkf2eB2idcAJ/er9xVzmSB4tY+G7l/vqbIi1Awq5jhnGdidK gGjz2CUojhL0u7awj3EU5o5mv4cR/1gP+IwpBwuToKJhCtgihN0Rz4uAyGqGQTeAN7Xv aEFCs+KX3OltopMJd5lN986xT3iQWt5fRyumwZk6wWv4BPRozxXRdIbzB+L9LEyFjkRg 97+DF/rOf39ArtSiYV8tutUaQT58uEcjxXVmFoUHXo7c3QBxAUk9/WJKW09shhOMSpZ1 ZGxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=HthXAZSMN5qzDQRvBuOesb4cH2jbEj1xd48HTHdSxtA=; b=VshrkNg0nlN7l91vza/IxeP0jn4zWz8y94ZiEvJd2/c1t4HJgwzYmixrW1aGvhgHUN gOF7ixj1I7r7qZTn3uewmAF2Jez0dKJVoR3q5z+KuAt11PTHZ7b9cnXyMKk1yNKB5xls 6R3zseKpJIc3YBmYyRw+dO3XqhqGn1hM2RVv2QVg0+HJAFV4Z8F8+VywzEOBYBLE/RoJ ONHuEfm9XrU0qs8ZlceNpRA/4fVsCmBvZdhbpF9ONTzVuX5niJIj9sExSwWFXnKNIA94 5OlcmlU2o91EoDKyLQOSQDAEsu2wJDhwiUw8Jy+wC0bnc++IuIHYbslOIKJ0rEbbI4F2 LQCw== X-Gm-Message-State: AD7BkJICbSEcwPpAlleaPCC1QceZ9w5Z6qfKgCsQdV+pgViRT1WVaKUjCMuO7HaYCqzUWPt1pjEjrtd2T/qplA== MIME-Version: 1.0 X-Received: by 10.60.96.164 with SMTP id dt4mr18024457oeb.74.1457465608191; Tue, 08 Mar 2016 11:33:28 -0800 (PST) Received: by 10.157.45.87 with HTTP; Tue, 8 Mar 2016 11:33:28 -0800 (PST) In-Reply-To: References: <1117518061.2095613.1456897151404.JavaMail.yahoo.ref@mail.yahoo.com> <1117518061.2095613.1456897151404.JavaMail.yahoo@mail.yahoo.com> Date: Tue, 8 Mar 2016 11:33:28 -0800 Message-ID: Subject: Re: variable doesn't work for version From: Gary Gregory To: Maven Users List Content-Type: multipart/alternative; boundary=089e01182606d948da052d8ea7f2 --089e01182606d948da052d8ea7f2 Content-Type: text/plain; charset=UTF-8 On Tue, Mar 8, 2016 at 11:28 AM, Stephen Connolly < stephen.alan.connolly@gmail.com> wrote: > In the .mvn folder put an extension that contributes the ${rev} property > based on whatever you seem safe > Where does this mystical .mvn folder reside, oh knowing one? Is ${rev} a built in name? Gary > > Then just have the project version include the ${rev} at the appropriate > place > > On Tuesday 8 March 2016, Gary Gregory wrote: > > > On Mon, Mar 7, 2016 at 6:53 PM, Eric B > > > wrote: > > > > > The first question I have to ask is what you are trying to accomplish > > with > > > your continuous-delivery? > > > > > > We have a Maven multi-module build which has thousands of unit tests. We > > use Bamboo for CI and if we get a green build that means that all the > tests > > pass of course and that we successfully deployed the build to our repo > (we > > use Artifactory). We use the Maven's deploy to deploy, not the release > > plugin. > > > > At this point anyone can use the built product out of Bamboo's saved > > artifacts or Artifactory: our internal/external consultants, sales > > engineers, formal QA, other downstream, products, and so on. It's up to > the > > PO to decide when to slap a new major or minor version label and he/she > can > > do at anytime. > > > > From development's POV, a green build is a released product, with a > version > > for example 3.1.201601070101 (3.1.YYYYMMDDHHMM). We used to have the SVN > > version number as the maintenance version part but we are switching to > Git > > soon, hence the move to timestamps. > > > > Our parent POM contains what is considered a Maven "hack": > > > > > > > > yyyyMMddHHmm > > 3 > > 1 > > ${version.major}.${version.minor} > > ${maven.build.timestamp} > > ${version.main}.${revision} > > > > Each module then has: > > > > ${dv.version} > > > > What is the Maven way to achieve this goal? > > > > Gary > > > > > > > > > Are you trying to put snapshot versions into a > > > production/release state? > > > > > > The biggest issue I have noticed with teams is the misunderstanding of > > how > > > SNAPSHOTs work, or their purpose in the development process. Either > > teams > > > want to release applications in SNAPSHOT mode, or release code that is > > > essentially in SNAPSHOT (ie: development) mode, but with fixed version > > > numbers. But instead of changing version numbers, they use something > > like > > > a timestamp to increment version numbers automatically. But at the end > > of > > > it all, it kind of contravenes maven's versioning concept. > > > > > > Normally, if your artifact is a work in progress, you should just be > > using > > > a SNAPSHOT. If you are looking to make a real release, then you should > > be > > > promoting your code from a SNAPSHOT to a fixed version. Generally, the > > > concept of continuous-delivery should only apply when in a SNAPSHOT > mode, > > > since anything else isn't changing (ie: a fixed release doesn't need to > > be > > > re-delivered). > > > > > > So then that begs the question why you need to constantly change your > > > version numbers during your development phase? > > > > > > And if the goal is truly to have fixed versions for some other team to > > have > > > access to a "stable" version of your artifact (ie: they can be > guaranteed > > > that it isn't going to change as you continue to develop), you could > > always > > > use something like the maven-release-plugin to promote from SNAPSHOT > to a > > > fixed version, and then re-open the next version as a SNAPSHOT. > > (Although > > > I know there are many dissenters against the release-plugin). > > > > > > Thanks, > > > > > > Eric > > > > > > > > > > > > On Mon, Mar 7, 2016 at 7:15 PM, Gary Gregory > > > > > wrote: > > > > > > > Is there a Maven-way to do continuous delivery then? As opposed > > > > to continuous integration. > > > > > > > > Our current hack is to use the date as the maintenance version as a > > > > variable for example 3.1.20160102 > > > > > > > > G > > > > > > > > On Mon, Mar 7, 2016 at 11:18 AM, Eric B > > wrote: > > > > > > > > > I personally have a pet-peeve of using system variables to define > > > version > > > > > numbers; I find it is counter productive to the building of maven > > > > > artifacts. There is no traceability to determine the actual > version > > > of > > > > an > > > > > artifact once it has been built. At least having a fixed version > > > number > > > > in > > > > > the element shows up in the META-INF/maven/../pom.* > files. > > > > > > > > > > Is using a variable for the version even a good idea? > > > > > > > > > > Thanks, > > > > > > > > > > Eric > > > > > > > > > > > > > > > On Mon, Mar 7, 2016 at 4:04 AM, Stephen Connolly < > > > > > stephen.alan.connolly@gmail.com > wrote: > > > > > > > > > > > only specific properties are permitted for expansion in XPath > paths > > > > that > > > > > > match the following regex > > > > /project/(parent/)?(groupId|artifactId|version) > > > > > > > > > > > > On 2 March 2016 at 05:39, Raghu > > > > wrote: > > > > > > > > > > > > > I have a POM with parent node as below: > > > > > > > com.test pom.parent > > > > > > > ${test.version} > > > > > > > ../scripts/pom.xml > > > > > > > This used to work till maven 3.3.3 version - mvn clean install. > > > > > However, > > > > > > > the version 3.3.9 throws error though. When I change the > version > > > to a > > > > > > value > > > > > > > instead of the variable, it works fine. > > > > > > > Won't maven support variable for version? Or is it a bug with > > > 3.3.9? > > > > > > > Appreciate your response... > > > > > > > - regards,raghu > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org > > > > > > Java Persistence with Hibernate, Second Edition > > > > > > > > JUnit in Action, Second Edition > > > > Spring Batch in Action > > > > Blog: http://garygregory.wordpress.com > > > > Home: http://garygregory.com/ > > > > Tweet! http://twitter.com/GaryGregory > > > > > > > > > > > > > > > -- > > E-Mail: garydgregory@gmail.com | ggregory@apache.org > > > > Java Persistence with Hibernate, Second Edition > > > > JUnit in Action, Second Edition > > Spring Batch in Action > > Blog: http://garygregory.wordpress.com > > Home: http://garygregory.com/ > > Tweet! http://twitter.com/GaryGregory > > > > > -- > Sent from my phone > -- E-Mail: garydgregory@gmail.com | ggregory@apache.org Java Persistence with Hibernate, Second Edition JUnit in Action, Second Edition Spring Batch in Action Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory --089e01182606d948da052d8ea7f2--