Return-Path: Delivered-To: apmail-maven-users-archive@www.apache.org Received: (qmail 62276 invoked from network); 17 Jan 2006 01:21:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Jan 2006 01:21:10 -0000 Received: (qmail 49467 invoked by uid 500); 17 Jan 2006 01:21:02 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 49445 invoked by uid 500); 17 Jan 2006 01:21:02 -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 49434 invoked by uid 99); 17 Jan 2006 01:21:02 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jan 2006 17:21:02 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of dion.gillard@gmail.com designates 66.249.82.204 as permitted sender) Received: from [66.249.82.204] (HELO xproxy.gmail.com) (66.249.82.204) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jan 2006 17:20:59 -0800 Received: by xproxy.gmail.com with SMTP id s18so848552wxc for ; Mon, 16 Jan 2006 17:20:39 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=PpaRxcFy2PP5XJ4YyKXYUwnamGG3xcM/eP44i8u1xGH1g7zF2wq4GD4vMcCujw9lpWA8TNkUZrmCQgtKCaQeCLer1ZzRGXQGn7v9QO5WQ7nKAs9Sgi85Oq1EYcfzDp0cd/k5OiYEJOHZpzwJc00RO2ngPOb4dTcIJ3M3VP7Focw= Received: by 10.11.100.43 with SMTP id x43mr97737cwb; Mon, 16 Jan 2006 17:20:38 -0800 (PST) Received: by 10.11.120.38 with HTTP; Mon, 16 Jan 2006 17:20:38 -0800 (PST) Message-ID: Date: Tue, 17 Jan 2006 12:20:38 +1100 From: Dion Gillard To: Maven Users List Subject: Re: [m1.1-b-2] how can I initialize a variable/prop just once and share with subprojects in multiproject build? In-Reply-To: <1137458885.8649.38.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1137453299.8649.27.camel@localhost.localdomain> <1137458885.8649.38.camel@localhost.localdomain> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Yep, that works well. Since you want it to be available to all projects, the system properties are one way to do it. On 1/17/06, Max Cooper wrote: > Well, I am not sure this is a good answer, but I found something that > works -- save it in the systemScope: > > > > > Getting revision... > > > > ${systemScope.setProperty('my.svnRevision', svnRevision)} > > > > Comments are still welcome. :-) > > -Max > > On Mon, 2006-01-16 at 15:14 -0800, Max Cooper wrote: > > I want to initialize a variable or property just once at the beginning > > of a multiproject build and then be able to access that value in any of > > the subprojects. Ideally, running a subproject build on it's own would > > also initialize the value. > > > > For instance, so far I have something like this in my shared, > > common/maven.xml file: > > > > > > > > Getting revision... > > > > > > > > > > > > This doesn't work -- "Getting revision..." is echoed for each subprojec= t > > build, which means that svnRevision isn't set in the context of each of > > the individual builds. I don't actually think this code should work (it > > makes sense that each subproject *would* have it's own independent > > instance of the svnRevision variable) -- I am just looking for tips > > about what I might change to get it to work. I just don't know where I > > can "stash" the value so that it will be available in the subproject > > builds. > > > > Thanks, > > -Max > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org > > For additional commands, e-mail: users-help@maven.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org > For additional commands, e-mail: users-help@maven.apache.org > > -- http://www.multitask.com.au/people/dion/ "In order to succeed, your desire for success should be greater than your fear of failure." - Bill Cosby --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org For additional commands, e-mail: users-help@maven.apache.org