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 3491784EC for ; Fri, 26 Aug 2011 16:12:47 +0000 (UTC) Received: (qmail 19937 invoked by uid 500); 26 Aug 2011 16:12:44 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 19872 invoked by uid 500); 26 Aug 2011 16:12:44 -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 7106 invoked by uid 99); 26 Aug 2011 16:08:58 -0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= X-Spam-Check-By: apache.org Received-SPF: unknown (athena.apache.org: error in processing during lookup of mdb@threerings.net) Date: Fri, 26 Aug 2011 09:08:30 -0700 (PDT) From: Michael Bayne X-X-Sender: mdb@bering.sea.earth.threerings.net To: users@maven.apache.org Subject: Embed project version in archetype Message-ID: User-Agent: Alpine 2.00 (OSX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Hi, I'm creating a Maven archetype which generates a project skeleton that will include a dependency on the project from which the archetype originated. For example, the origin project looks like: origin/archetype/... archetype for generating project /core/... core services /extra/... extra services and the archetype will generate a project with a POM that contains dependencies like so: com.foo origin-core SOMEVERSION I want SOMEVERSION to be the version of the origin project at the time that the archetype is built and installed into the repository. So if the origin project is at version 1.0-SNAPSHOT and is "mvn install"ed, then I want the archetype to generate a dependency on 1.0-SNAPSHOT. And when the origin project is released, and automatically bumped to version 1.0, I want the archetype to generate a dependency on origin-core 1.0. Basically I'd like to use ${archetypeVersion} as a Velocity variable in my POM, but that doesn't seem possible. Is there any other way of accomplishing what I'm trying to do here? Does everyone who generates dependencies in their artifacts just manually hack them every time they do a project release? Thanks, Michael -- mdb@threerings.net --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org For additional commands, e-mail: users-help@maven.apache.org