Bad idea.

At least in the <parent> tags of your submodules you have to explicitly define 
the parent version number. If you do a reactor build, everything is fine 
without that. If you want to build a submodule standalone, Maven will ask the 
repository for the parent pom. Without version number, that will fail. And as 
Maven fails to resolve the parent pom, how can there be inheritance?

As to resource filtering, that's AFAIK meant for Java resources, and not for 
the POMs themselves.

Suggestion for your version number problem: put markers after all 
<version>someversion</version> sequences that belong to your current project 
and its submodules, like that: <version>1.0-SNAPSHOT</version><!-- 
myprojectversionmarker -->. Apply a strategy where all submodules have the same 
version number as the master pom (e.g. by simply omitting the version number 
for the child module, it will inherit its parent version number). Too many 
different versions along the submodules are confusing. Now if  you have to 
change the version, do a search and replace on all your POMs. It will be safe, 
as you have the version markers.

Just my two cents.

Christoph

> -----Original Message-----
> From: Allan Ramirez [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 16, 2006 3:18 AM
> To: Maven Users List
> Subject: Re: [m202] can I use filters to externalize my 
> artifact version
> number?
> 
> 
> Hi there,
> 
> I think <properties> from the parent pom can be inherited by the sub 
> modules. You may want to use that
> 
> or
> 
> http://maven.apache.org/guides/getting-started/index.html#How%
20do%20I%20filter%20resource%20files?

-allan

Mick Knutson wrote:

> I want an easier way to manage version numbers than having my team 
> modify the pom.xml. I want to keep them from touching it all together. 
> So can I use some soert of filtering mechanism to change:
> <version>1.2.3.2</version>
>
> to this:
>
> <version>${core.version.number}</version>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to