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 97D17D6A9 for ; Wed, 22 May 2013 06:40:11 +0000 (UTC) Received: (qmail 56414 invoked by uid 500); 22 May 2013 06:40:10 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 56190 invoked by uid 500); 22 May 2013 06:40:08 -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 56143 invoked by uid 99); 22 May 2013 06:40:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 May 2013 06:40:06 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bmathus@gmail.com designates 209.85.215.174 as permitted sender) Received: from [209.85.215.174] (HELO mail-ea0-f174.google.com) (209.85.215.174) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 May 2013 06:40:02 +0000 Received: by mail-ea0-f174.google.com with SMTP id z7so868203eaf.5 for ; Tue, 21 May 2013 23:39:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=YEUfliPuODzPmjbf8nFlI+Lmx2+M7vtnw/zQG0RFZeU=; b=JjvGsC0flOgVcb59BbNm6aLeA8HGUJWyKlxr3MsSeqMBSP+8gS3+FhAMXzeBIvMhQC 4zMbIXFq0wn65ndoHdTV1ET6lGao9dmiDKMBC/9dd75hvmFciMUlpRI9b90PL39DyiPq phnoIyxdUgcrB+jTl0dv35qgbBLGDk2Cq9xlZjogEBF2yeH36h7lBPt0o1G2MoR8ObuA +HWotmfgwiTQxDy5g5EF8DaxQbej+RMZVAKrDV4eSAp7S42FviVqNxcmTE5JpLiJqfoO YSo1LW2Xi+i2QymE3zbunU3VVFWMvwGcIL0j6wjR7ATuQ8n9b6p2c+ILSJgCRwzu5knP dDhA== MIME-Version: 1.0 X-Received: by 10.14.172.195 with SMTP id t43mr15578203eel.34.1369204781104; Tue, 21 May 2013 23:39:41 -0700 (PDT) Sender: bmathus@gmail.com Received: by 10.14.191.66 with HTTP; Tue, 21 May 2013 23:39:40 -0700 (PDT) Received: by 10.14.191.66 with HTTP; Tue, 21 May 2013 23:39:40 -0700 (PDT) In-Reply-To: References: Date: Wed, 22 May 2013 08:39:40 +0200 X-Google-Sender-Auth: VLwSmROY0fp4JY6idy2Hs68Vz-A Message-ID: Subject: Re: buildnumber-maven-plugin format From: Baptiste MATHUS To: Maven Users List Content-Type: multipart/alternative; boundary=047d7b621ee69a63a004dd48d46d X-Virus-Checked: Checked by ClamAV on apache.org --047d7b621ee69a63a004dd48d46d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, >From the usage page, though not perfectly thoroughly definitely clearly stated ;) and.from my understanding it's said only this property is to go in this file. Actually, this plugin is more designed to create dynamic properties and make them available in the build context. Then you can reuse those variables as input params for other plugins (e.g. dedicated line in the manifest) or to filter properties in files (src/main/resources or even source code with the templating-maven-plugin). So, back to the initial point: where do you actually want to use those properties? Somewhere in the artifact? Cheers Le 20 mai 2013 19:15, "Thad Humphries" a =C3=A9c= rit : > On Mon, May 20, 2013 at 11:56 AM, Baptiste MATHUS wrote: > > > Hi, > > Could you provide: > > - the format you tried, > > - what you were expecting > > - what it gives > > - buildnumber plugin version you're using > > - Maven version > > > > Cheers > > > > I tried > > > org.codehaus.mojo > buildnumber-maven-plugin > 1.2 > > > validate > > create > > > > > false > false > n/a > {0,date,yyyy-MM-dd}_{1,number} ({2}) > > timestamp > buildNumber > ${user.name} > > > > > I was expecting ${basedir}/buildNumber.properties to contain a property > with the string > > 2013-05-20_12 (thad) > > as well as the buildNumber property. > > What I get is the buildNumber property > > #maven.buildNumber.plugin properties file > #Mon May 20 12:57:02 EDT 2013 > buildNumber=3D12 > > but no other property. I can see in my console > > [INFO] --- buildnumber-maven-plugin:1.2:create (default) @ Tools --- > [INFO] Storing buildNumber: 2013-05-20_12 (thad) at timestamp: > 1369069022984 > [INFO] Executing: /bin/sh -c cd /home/thad/devel/tools && svn > --non-interactive info > [INFO] Working directory: /home/thad/devel/tools > [INFO] Storing buildScmBranch: UNKNOWN_BRANCH > > but that formatted string is not written anywhere. I'd like to have it > somewhere--eventually in my target--so that my webapp can find it as a > ResourceBundle (like www for testing, and > MyApp-1.0-SNAPSHOT/WEB-INF/classes for the WAR). > > Maybe I'm misunderstand what this plugin can do. I don't see the point in > having my formatted string solely in my console. (I'm *very new* to Maven= ; > I'm trying to create build string similar to other apps we use in our > webapps.) > > As you see from the above, I'm using version 1.2 of the plugin. > > My Maven version is 3.0.5 > > BTW, I've also added this to my pom.xml (since my source is not yet check= ed > in to our local SVN repository). > > > scm:svn:http://127.0.0.1/dummy > scm:svn:https://127.0.0.1/dummy > > HEAD > http://127.0.0.1/dummy > > > > Thank you. > > > > Le 20 mai 2013 02:19, "Thad Humphries" a > =C3=A9crit > > : > > > > > I'm attempting to use the buildnumber-maven-plugin ( > > > http://mojo.codehaus.org/buildnumber-maven-plugin/< > > > http://mojo.codehaus.org/buildnumber-maven-plugin/usage.html>) > > > to give me a build based on a number that will increment when create = my > > WAR > > > file. > > > > > > Although I define a and as shown in the usage page, > all > > > that shows up in buildNumber.properties is buildNumber=3D10 > > > > > > Is this to be expected? How can I get a formatted string? (Otherwise = I > > have > > > to use antrun to get at timestamp). > > > > > > -- > > > "Hell hath no limits, nor is circumscrib'd In one self-place; but whe= re > > we > > > are is hell, And where hell is, there must we ever be" --Christopher > > > Marlowe, *Doctor Faustus* (v, 121-24) > > > > > > > > > -- > "Hell hath no limits, nor is circumscrib'd In one self-place; but where w= e > are is hell, And where hell is, there must we ever be" --Christopher > Marlowe, *Doctor Faustus* (v, 121-24) > --047d7b621ee69a63a004dd48d46d--