You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Brinker, Don-NONEMP" <db...@collegeboard.org> on 2011/04/01 03:25:58 UTC
Releases, archetypes, and parent POMs
Hi all,
I'm running into a bit of an odd issue here with using the release plugin. I have a multi-module project I'm trying to release that has two submodules. One defines a "parent" subproject with a header like so:
<project ...>
...
<groupId>my.group</groupId>
<artifactId>parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
...
</project>
In a separate submodule, I have an archetype that generates projects that extend this parent. In other words, I have the following in src/main/archetype-resources/pom.xml:
<project>
...
<parent>
<groupId>my.group</groupId>
<artifactId>parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
...
</project>
Now here's the question: I'd like the parent version in the archetype to be changed when the multi-module project updates. As is, that doesn't happen (the parent version in the archetype remains 1.0.0-SNAPSHOT even after I release the whole project). Is there something I can do to make this work? For that matter, is what I'm trying to do a bad idea for some reason?
Thanks
- Don
RE: Releases, archetypes, and parent POMs
Posted by "Brinker, Don-NONEMP" <db...@collegeboard.org>.
Actually, ${project.version} just gets passed along in the archetype files. To my mind this is a good thing, since I need that token in the generated POM, but it still leaves me with the question of how to designate the version of the archetype.
Thanks
- Don
-----Original Message-----
From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On Behalf Of Anders Hammar
Sent: Friday, April 01, 2011 4:41 AM
To: Maven Users List
Subject: Re: Releases, archetypes, and parent POMs
Have you tried specifying ${project.version}?
/Anders
On Fri, Apr 1, 2011 at 03:25, Brinker, Don-NONEMP <dbrinker@collegeboard.org
> wrote:
> Hi all,
>
> I'm running into a bit of an odd issue here with using the release plugin.
> I have a multi-module project I'm trying to release that has two
> submodules. One defines a "parent" subproject with a header like so:
> <project ...>
> ...
> <groupId>my.group</groupId>
> <artifactId>parent</artifactId>
> <version>1.0.0-SNAPSHOT</version>
> <packaging>pom</packaging>
> ...
> </project>
>
> In a separate submodule, I have an archetype that generates projects that
> extend this parent. In other words, I have the following in
> src/main/archetype-resources/pom.xml:
> <project>
> ...
> <parent>
> <groupId>my.group</groupId>
> <artifactId>parent</artifactId>
> <version>1.0.0-SNAPSHOT</version>
> </parent>
>
> <artifactId>${artifactId}</artifactId>
> <version>${version}</version>
> ...
> </project>
>
> Now here's the question: I'd like the parent version in the archetype to
> be changed when the multi-module project updates. As is, that doesn't
> happen (the parent version in the archetype remains 1.0.0-SNAPSHOT even
> after I release the whole project). Is there something I can do to make
> this work? For that matter, is what I'm trying to do a bad idea for some
> reason?
>
> Thanks
>
> - Don
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Releases, archetypes, and parent POMs
Posted by Anders Hammar <an...@hammar.net>.
Have you tried specifying ${project.version}?
/Anders
On Fri, Apr 1, 2011 at 03:25, Brinker, Don-NONEMP <dbrinker@collegeboard.org
> wrote:
> Hi all,
>
> I'm running into a bit of an odd issue here with using the release plugin.
> I have a multi-module project I'm trying to release that has two
> submodules. One defines a "parent" subproject with a header like so:
> <project ...>
> ...
> <groupId>my.group</groupId>
> <artifactId>parent</artifactId>
> <version>1.0.0-SNAPSHOT</version>
> <packaging>pom</packaging>
> ...
> </project>
>
> In a separate submodule, I have an archetype that generates projects that
> extend this parent. In other words, I have the following in
> src/main/archetype-resources/pom.xml:
> <project>
> ...
> <parent>
> <groupId>my.group</groupId>
> <artifactId>parent</artifactId>
> <version>1.0.0-SNAPSHOT</version>
> </parent>
>
> <artifactId>${artifactId}</artifactId>
> <version>${version}</version>
> ...
> </project>
>
> Now here's the question: I'd like the parent version in the archetype to
> be changed when the multi-module project updates. As is, that doesn't
> happen (the parent version in the archetype remains 1.0.0-SNAPSHOT even
> after I release the whole project). Is there something I can do to make
> this work? For that matter, is what I'm trying to do a bad idea for some
> reason?
>
> Thanks
>
> - Don
>
>