Ya +1. I think I will do the same, Thanks Roy.
Thanks Lakshman > -----Original Message----- > From: Wayne Fay [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 5 September 2006 8:37 AM > To: Maven Users List > Subject: Re: Maven+Checkstyle - Configuration file location > > This is a great solution to this problem, Roy. > > Wayne > > On 9/4/06, Roy van der Kuil <[EMAIL PROTECTED]> wrote: > > Hi, > > > > We have a similar setup and have created a 'project' with only a couple of > > resources. (our own version of the checkstyle xml and suppressions). > > > > We deployed this 'jar' and made the maven-checkstyle-plugin dependant on > > that dependancy: > > <plugin> > > <groupId>org.apache.maven.plugins</groupId> > > <artifactId>maven-checkstyle-plugin</artifactId> > > <dependencies> > > <dependency> > > <groupId>acompany</groupId> > > <artifactId>acompay_style</artifactId> > > <version>1.0-SNAPSHOT</version> > > </dependency> > > </dependencies> > > </plugin> > > > > This actually works very well and makes sure every project uses the 'latest' > > style. > > > > > > On 9/4/06, Olivier Vierlinck <[EMAIL PROTECTED]> wrote: > > > > > > We use maven+checkstyle on a multi-project. > > > > > > We have defined our checks (mycheckstyle.xml) for one of the component. > > > The > > > xml file is stored right at the root of the component (next to the src and > > > target folders) in the top pom file we have: > > > > > > <plugin> > > > <groupId>org.apache.maven.plugins</groupId> > > > <artifactId>maven-checkstyle-plugin</artifactId> > > > <configuration> > > > <configLocation>mycheckstyle.xml</configLocation> > > > </configuration> > > > </plugin> > > > > > > So we have a structure like this > > > > > > topProject > > > --- pom.xml > > > > > > --- subComponent1 > > > --- --- src > > > --- --- target > > > --- --- pom.xml > > > --- --- mycheckstyle.xml > > > --- --- ... > > > > > > --- subComponent2 > > > --- --- src > > > --- --- target > > > --- --- pom.xml > > > --- --- ... > > > > > > --- --- subsubComponent2.1 > > > --- --- --- src > > > --- --- --- target > > > --- --- --- pom.xml > > > --- --- --- ... > > > > > > This works fine. But now, we would like to use the same configuration file > > > for ALL our component. So, we would like to have our (single) > > > mycheckstyle.xml file stored only once, right under the topProject, next > > > to > > > the top pom.xml file. > > > > > > How can we define that in the pom file. I tried using relative path > > > (../mycheckstyle.xml), full url (file:../mycheckstyle.xml), using maven > > > variables ($project.dir/mycheckstyle.xml) but without success, always with > > > one or another error message from maven such as > > > > > > Unable to find location '../mycheckstyle.xml' as URL, File or Resource. > > > > > > Is there any way to combine maven's knowledge of the project/components > > > tree > > > so that each individual component knwos the top level and use it to locate > > > the mycheckstyle.xml. Even better: is there a way to support component > > > with > > > different level in the tree (as subComponent2 and subComponent2.1 in the > > > example above) > > > > > > Thanks, > > > Olivier > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
