Thanks; I had thought about that, I was hoping there was something simpler
and just as transparent.  It kinda grates me to create a maven project and
repository jar file for one file; using a simple URL is tempting, but
anywhere we can stick the file we can stick the jar, and the simple URL idea
doesnt let us control changes to it;

thanks again

-t.


On 12/2/06, Robert Reiner <[EMAIL PROTECTED]> wrote:



Trevor Torrez wrote:
>
> What is the best way to have all subprojects use the same checkstyles
> file?
>
>

Hi Trevor,

I do not know what the best way is, but this is how it works for me:

I have a parent POM to all POMs of my subprojects. In this I declare my
checkstyle configuration as an extension like this:

  <extensions>
     <extension>
       <groupId>de.smartics.config</groupId>
       <artifactId>checkstyle-config-smartics</artifactId>
       <version>0.2.1</version>
     </extension>
   </extensions>

The plugin is defined in the same POM:

    <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-checkstyle-plugin</artifactId>
       <version>2.1</version>
       <extensions>true</extensions>
       <inherited>true</inherited>
       <configuration>
         <configLocation>checkstyle.xml</configLocation>
       </configuration>
     </plugin>

The checkstyle project referenced in the extension section is a project on
its own, containing only the checkstyle.xml. So the build section in this
project looks like this:

<build>
   <resources>
     <resource>
       <directory>src/main/resources</directory>
     </resource>
   </resources>
</build>

And in the resources directory I place the checkstyle.xml file. I had some
difficulties placing it in a subdir and naming it other than this, but
this
may have been a fault on my side...

Hope this helps.

Greetings,
Robert
--
View this message in context:
http://www.nabble.com/checkstyles-tf2734779s177.html#a7652646
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to