Making resources defined in a superpom available to underlying poms.

2007-02-28 Thread Jan-Olav Eide
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Making resources defined in a superpom available to underlying poms.

2007-02-28 Thread Rémy Sanlaville

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
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-checkstyle-plugin/artifactId
   version2.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


RE: Making resources defined in a superpom available to underlying poms.

2007-02-28 Thread Jan-Olav Eide
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:[EMAIL PROTECTED] 
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
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-checkstyle-plugin/artifactId
version2.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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Making resources defined in a superpom available to underlying poms.

2007-02-28 Thread Rémy Sanlaville

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