You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Nick Panienski <pa...@codecentric.de> on 2006/07/24 10:53:00 UTC

Parent POM with Resources

Hi @ Maven,

I have a parent pom for a few projects, defining all my default properties.
I also defined my Checkstyle and PMD reports here. Now I'd like to include
my checkstyle and pmd config files as well.

As far as I know I cannot include XMLs in a project that has a
<packaging>pom</packaging>. I already tried to build a resources project
packaged as a jar and define a dependency in my parent pom. Maven doesn't
complain about this, but I still don't know how to access my config files...

So here are my questions:

Is it possible to directly include configs (XMLs) in a parent pom?
- OR -
How do I access files that are actually located in another project?
- OR -
Does anyone have a better solution for defining my report props for a bunch
of projects?

Regards
Nick


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


Re: Parent POM with Resources

Posted by Stephen Duncan <st...@gmail.com>.
Except that the build-tools jar should be referred to as an extension,
not a dependency of the plugin.  My experience was that Maven would
only try ibiblio to look for the build-tools jar if I left it as a
plugin dependency.

See the bottom of this checkstyle plugin doc for an example:
http://maven.apache.org/plugins/maven-checkstyle-plugin/customize.html

-Stephen

On 7/24/06, dcabasson <de...@insee.fr> wrote:
>
>
> Nick Panienski wrote:
> >
> > As far as I know I cannot include XMLs in a project that has a
> > <packaging>pom</packaging>. I already tried to build a resources project
> > packaged as a jar and define a dependency in my parent pom. Maven doesn't
> > complain about this, but I still don't know how to access my config
> > files...
> >
>
> Common practice is indeed to have a build-tools module, with packaging jar.
>
> To use this module (with checkstyle), in the build/plugins part, of your
> parent POM:
> <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-checkstyle-plugin</artifactId>
>         <dependencies>
>                 <dependency>
>                         <groupId>com.myApplication</groupId>
>                         <artifactId>build-tools</artifactId>
>                         <version>1.2-SNAPSHOT</version>
>                 </dependency>
>         </dependencies>
>         <configuration>
>                 <configLocation>your_checks.xml</configLocation>
>         </configuration>
> </plugin>
>
> Every sub-project will now use this checkstyle configuration.
>
> Denis.
>
> --
> View this message in context: http://www.nabble.com/Parent-POM-with-Resources-tf1990950.html#a5463782
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Stephen Duncan Jr
www.stephenduncanjr.com

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


AW: Parent POM with Resources

Posted by Nick Panienski <pa...@codecentric.de>.
> dcabasson wrote:
> > Common practice is indeed to have a build-tools module, 
> with packaging 
> > jar.

Thanks Denis, I'll try that!

Bye
Nick



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


Re: Parent POM with Resources

Posted by dcabasson <de...@insee.fr>.

dcabasson wrote:
> 
> Common practice is indeed to have a build-tools module, with packaging
> jar.
> 

"Official" link:
http://maven.apache.org/plugins/maven-checkstyle-plugin/tips.html

Cheers!

Denis.
-- 
View this message in context: http://www.nabble.com/Parent-POM-with-Resources-tf1990950.html#a5463809
Sent from the Maven - Users forum at Nabble.com.


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


Re: Parent POM with Resources

Posted by dcabasson <de...@insee.fr>.

Nick Panienski wrote:
> 
> As far as I know I cannot include XMLs in a project that has a
> <packaging>pom</packaging>. I already tried to build a resources project
> packaged as a jar and define a dependency in my parent pom. Maven doesn't
> complain about this, but I still don't know how to access my config
> files...
> 

Common practice is indeed to have a build-tools module, with packaging jar.

To use this module (with checkstyle), in the build/plugins part, of your
parent POM:
<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-checkstyle-plugin</artifactId>
	<dependencies>
		<dependency>
			<groupId>com.myApplication</groupId>
			<artifactId>build-tools</artifactId>
			<version>1.2-SNAPSHOT</version>
		</dependency>
	</dependencies>
	<configuration>
		<configLocation>your_checks.xml</configLocation>
	</configuration>
</plugin>

Every sub-project will now use this checkstyle configuration.

Denis.

-- 
View this message in context: http://www.nabble.com/Parent-POM-with-Resources-tf1990950.html#a5463782
Sent from the Maven - Users forum at Nabble.com.


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