You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Thomas Scheffler <th...@uni-jena.de> on 2010/02/25 12:05:44 UTC

Checkstyle and multi module

Hi,

I have a multi module project with this layout

Base
|-- pom.xml
|-- build-tools
|   |-- src
|   |   `-- main
|   |       `-- resources
|   |           `-- org
|   |               `-- project
|   |                   `-- checkstyle.xml
|   `-- pom.xml
|-- parent
|-- module1
|-- module2
`-- modulen

Everything is like it is described in
http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/multi-module-config.html
with one exception:

The Base/pom.xml is not the parent module pom but Base/parent/pom.xml is.

After following the guide above I can run "mvn checkstyle:checkstyle"
fine on all modules and it uses the checkstyle.xml from the build-tools
module.

Just "mvn site" will not work with this error:

[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error during page generation

Embedded error: Error rendering Maven report: Failed during checkstyle
execution
Could not find resource 'org/project/checkstyle.xml'.


Why does it work with "checkstyle:checkstyle" and not with "site"?


Thanks

Thomas

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


Re: Checkstyle and multi module

Posted by Thomas Scheffler <th...@uni-jena.de>.
Am 26.02.2010 08:43, schrieb Thomas Scheffler:
> Am 25.02.2010 23:01, schrieb Dennis Lundberg:
>> Which version of the Checkstyle Plugin are you using?
>
> First I tried it with version 2.5 and later with 2.4. I had no luck with
> that either so I didn't tried any older version.
>
> Thomas

Hi,

one Idea came to my mind that I can maybe extend the 
maven-checkstyle-plugin with a plug-in named project-checkstyle-plugin 
that includes the resource that is needed in the JAR file and has the 
normal maven-checkstyle-plugin as it dependency.

Does anyone has experience extending plug-ins and can hint me to some 
documentations?

Thanks

Thomas

>
>> On 2010-02-25 12:05, Thomas Scheffler wrote:
>>> Hi,
>>>
>>> I have a multi module project with this layout
>>>
>>> Base
>>> |-- pom.xml
>>> |-- build-tools
>>> |   |-- src
>>> |   |   `-- main
>>> |   |       `-- resources
>>> |   |           `-- org
>>> |   |               `-- project
>>> |   |                   `-- checkstyle.xml
>>> |   `-- pom.xml
>>> |-- parent
>>> |-- module1
>>> |-- module2
>>> `-- modulen
>>>
>>> Everything is like it is described in
>>> http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/multi-module-config.html
>>> with one exception:
>>>
>>> The Base/pom.xml is not the parent module pom but Base/parent/pom.xml is.
>>>
>>> After following the guide above I can run "mvn checkstyle:checkstyle"
>>> fine on all modules and it uses the checkstyle.xml from the build-tools
>>> module.
>>>
>>> Just "mvn site" will not work with this error:
>>>
>>> [ERROR] BUILD ERROR
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Error during page generation
>>>
>>> Embedded error: Error rendering Maven report: Failed during checkstyle
>>> execution
>>> Could not find resource 'org/project/checkstyle.xml'.
>>>
>>>
>>> Why does it work with "checkstyle:checkstyle" and not with "site"?
>>>
>>>
>>> Thanks
>>>
>>> Thomas
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>>
>
>


-- 
Thomas Scheffler
Friedrich-Schiller-Universität Jena
Thüringer Universitäts- und Landesbibliothek
Bibliotheksplatz 2
07743 Jena
Phone: ++49 3641 940027
FAX:   ++49 3641 940022

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


Re: Checkstyle and multi module

Posted by Thomas Scheffler <th...@uni-jena.de>.
Am 25.02.2010 23:01, schrieb Dennis Lundberg:
> Which version of the Checkstyle Plugin are you using?

First I tried it with version 2.5 and later with 2.4. I had no luck with
that either so I didn't tried any older version.

Thomas

> On 2010-02-25 12:05, Thomas Scheffler wrote:
>> Hi,
>>
>> I have a multi module project with this layout
>>
>> Base
>> |-- pom.xml
>> |-- build-tools
>> |   |-- src
>> |   |   `-- main
>> |   |       `-- resources
>> |   |           `-- org
>> |   |               `-- project
>> |   |                   `-- checkstyle.xml
>> |   `-- pom.xml
>> |-- parent
>> |-- module1
>> |-- module2
>> `-- modulen
>>
>> Everything is like it is described in
>> http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/multi-module-config.html
>> with one exception:
>>
>> The Base/pom.xml is not the parent module pom but Base/parent/pom.xml is.
>>
>> After following the guide above I can run "mvn checkstyle:checkstyle"
>> fine on all modules and it uses the checkstyle.xml from the build-tools
>> module.
>>
>> Just "mvn site" will not work with this error:
>>
>> [ERROR] BUILD ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Error during page generation
>>
>> Embedded error: Error rendering Maven report: Failed during checkstyle
>> execution
>> Could not find resource 'org/project/checkstyle.xml'.
>>
>>
>> Why does it work with "checkstyle:checkstyle" and not with "site"?
>>
>>
>> Thanks
>>
>> Thomas
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 
> 


-- 
Thomas Scheffler
Friedrich-Schiller-Universität Jena
Thüringer Universitäts- und Landesbibliothek
Bibliotheksplatz 2
07743 Jena
Phone: ++49 3641 940027
FAX:   ++49 3641 940022

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


Re: Checkstyle and multi module

Posted by Dennis Lundberg <de...@apache.org>.
Which version of the Checkstyle Plugin are you using?

On 2010-02-25 12:05, Thomas Scheffler wrote:
> Hi,
> 
> I have a multi module project with this layout
> 
> Base
> |-- pom.xml
> |-- build-tools
> |   |-- src
> |   |   `-- main
> |   |       `-- resources
> |   |           `-- org
> |   |               `-- project
> |   |                   `-- checkstyle.xml
> |   `-- pom.xml
> |-- parent
> |-- module1
> |-- module2
> `-- modulen
> 
> Everything is like it is described in
> http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/multi-module-config.html
> with one exception:
> 
> The Base/pom.xml is not the parent module pom but Base/parent/pom.xml is.
> 
> After following the guide above I can run "mvn checkstyle:checkstyle"
> fine on all modules and it uses the checkstyle.xml from the build-tools
> module.
> 
> Just "mvn site" will not work with this error:
> 
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error during page generation
> 
> Embedded error: Error rendering Maven report: Failed during checkstyle
> execution
> Could not find resource 'org/project/checkstyle.xml'.
> 
> 
> Why does it work with "checkstyle:checkstyle" and not with "site"?
> 
> 
> Thanks
> 
> Thomas
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 


-- 
Dennis Lundberg

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