maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <joerg.schai...@gmx.de>
Subject Re: How can I get the path for a root pom.xml's basedir in a multimodule project with pom inheritance
Date Fri, 26 Oct 2007 20:36:14 GMT
clamb wrote:

> 
> 
> Matthew McCullough wrote:
>> 
>> This is a creative idea, but appears only to work if your leaf nodes of
>> the project are all at the same level so that the ../../ is consistently
>> just the right amount "back up" the directory tree.
>> 
> 
> Yeah ... that is a limitation. However, once you have each pom.xml setup
> its no longer a problem.
> 
> The following worked for me (maven 2.0.4) as each mvn invocation at a
> particular level has the rootPOM defined according to its own path. I've
> got a project that goes 4 directories deep and am using this in the root
> pom.xml for setting pluginDefaults so i can have my filters for the entire
> project in one directory.
> 
>   <build>
> <pluginManagement>
> <plugins>
> <plugin>
> <inherited>true</inherited>
> ...
> <configuration>
> <defs>${rootPOM}/genericFilters</defs>
> </configuration>
> ...
> </plugin>
> </plugins>
> </pluginManagement>
>   </build>

Why don't you simply keep those filters in an own module and pack them into
an archive? Every other project that needs to access them may declare a dep
on that artifact and can user the build-helper plugin to unpack them into a
temporary location.

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message