You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jan-Olav Eide <Ja...@fast.no> on 2007/02/28 13:46:53 UTC
Making resources defined in a superpom available to underlying poms.
I have a pom with packaging jar that contains a number of modules
(possibly nested). I have some resources that I want to be available to
all underlying poms . In my case it is a reference to a checkstyle
configuration file, but it could be anything (such as the stylesheet
used for javadoc generation). I have defined a property with the
_absolute_ path to this file in the top level pom, but is that the best
way to do it? I'd rather use a relative path (relative to the top
level), is that possible?
--
jo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Making resources defined in a superpom available to underlying poms.
Posted by Rémy Sanlaville <re...@gmail.com>.
No, you just have to declare it in our parent pom.
Just try to see if it works...
Parent
| --- module1
| --- module2
| --- ...
| --- src
| | --- main
| | | --- config
| | | | --- checkstyle.xml
| --- pom.xml
Rémy
RE: Making resources defined in a superpom available to underlying poms.
Posted by Jan-Olav Eide <Ja...@fast.no>.
I was hoping I could define the resource only once. If I understand you correctly, the plugin configuration below needs to be present in all poms?
-----Original Message-----
From: Rémy Sanlaville [mailto:remy.sanlaville@gmail.com]
Sent: 28. februar 2007 15:04
To: Maven Users List
Subject: Re: Making resources defined in a superpom available to underlying poms.
Hi,
For checkstyle, you can follow this [1]
[1] http://maven.apache.org/plugins/maven-checkstyle-plugin/customize.html
(cf. Use a custom developd Checkstyle Check modules)
or
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.1</version>
<configuration>
<configLocation>${project.parent.basedir
}/src/main/config/checkstyle.xml</configLocation>
</configuration>
</plugin>
The second solution is more generic and not specific for checkstyle.
HTH,
Rémy
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Making resources defined in a superpom available to underlying poms.
Posted by Rémy Sanlaville <re...@gmail.com>.
Hi,
For checkstyle, you can follow this [1]
[1] http://maven.apache.org/plugins/maven-checkstyle-plugin/customize.html
(cf. Use a custom developd Checkstyle Check modules)
or
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.1</version>
<configuration>
<configLocation>${project.parent.basedir
}/src/main/config/checkstyle.xml</configLocation>
</configuration>
</plugin>
The second solution is more generic and not specific for checkstyle.
HTH,
Rémy