You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Carlos Sanchez <ca...@gmail.com> on 2005/07/26 19:25:22 UTC

Re: How import my own checks in plugin checkstyle of Maven

Hi,

I've never tried to do that so I can't tell you the exact steps, but
seems that you need to add your jar as a dependency to the project
adding this property:

      <properties>
        <classloader>root</classloader>
      </properties>

It's related to the info in http://jira.codehaus.org/browse/MPCHECKSTYLE-27

Please send next emails to the maven users list.

Regards

On 7/26/05, darkan darkan <da...@hotmail.com> wrote:
> Hello Carlos,
> i permit to write this email because i have a problem to import my own
> checks.
> Indeed, i have my checks in mychecks.jar (.class and a message.properties)
> and i would like step by step know how use my checks in maven with the
> plugin-maven-checkstyle.
> Namely, where do i put checks.jar and how customize the plugin to assimilate
> my checks
> Thx
> 
> Loïc
> 
> 
>

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


Re: How import my own checks in plugin checkstyle of Maven

Posted by darkan darkan <da...@hotmail.com>.
Indeed i tested with the idea of Arnaud Heritier two solutions works 
(completing i think MPCHECKSTYLE-27 ).

Solution 1 with dependency
Step 1 : Into my project.xml i added
<dependency>

<groupId>mychecks</groupId>

<artifactId>mychecks</artifactId>

<version>1.0</version>

<properties>

<classloader>root</classloader>

</properties>

</dependency>

Step 2 : Into C:\Documents and Settings\LTAN\.maven\repository\mychecks\jars 
i put mychecks.jar

Step 3 and Final step same as the first solution with forehead.conf...

Solution 2 :

Step 1 : i put in my project.properties : maven.jar.mychecks = 
D:/eclipse/workspace/myproject/lib/mychecks.jar

Step 2 : I put into my project.xml

<dependency>

<groupId>mychecks</groupId>

<artifactId>mychecks</artifactId>

<jar>D:/eclipse/workspace/myproject/lib/mychecks.jar</jar>

<type>jar</type>

<properties>

<classloader>root</classloader>

</properties>

</dependency>

Step 3 and Final Step are similar that solution with forehead.conf..

To conclude, i think that the third solution (the last) is the cleaner 
solution if u import ur checks in plugin maven-checkstyle.

What do u think?

Bye bye

Loïc


>From: Carlos Sanchez <ca...@gmail.com>
>Reply-To: carlos@apache.org
>To: darkan darkan <da...@hotmail.com>, Maven Users List 
><us...@maven.apache.org>
>Subject: Re: How import my own checks in plugin checkstyle of Maven
>Date: Tue, 26 Jul 2005 10:25:22 -0700
>
>Hi,
>
>I've never tried to do that so I can't tell you the exact steps, but
>seems that you need to add your jar as a dependency to the project
>adding this property:
>
>       <properties>
>         <classloader>root</classloader>
>       </properties>
>
>It's related to the info in http://jira.codehaus.org/browse/MPCHECKSTYLE-27
>
>Please send next emails to the maven users list.
>
>Regards
>
>On 7/26/05, darkan darkan <da...@hotmail.com> wrote:
> > Hello Carlos,
> > i permit to write this email because i have a problem to import my own
> > checks.
> > Indeed, i have my checks in mychecks.jar (.class and a 
>message.properties)
> > and i would like step by step know how use my checks in maven with the
> > plugin-maven-checkstyle.
> > Namely, where do i put checks.jar and how customize the plugin to 
>assimilate
> > my checks
> > Thx
> >
> > Loïc
> >
> >
> >



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


Re: How import my own checks in plugin checkstyle of Maven

Posted by Emmanuel Venisse <em...@venisse.net>.
You can try to add your jar as a dependency of your project.

Emmanuel


darkan darkan wrote:
> Hi,
> 
> Right, yesterday i found a solution to import my own checks :
> Step 1 : Into C:\Program Files\Apache Software Foundation\Maven 
> 1.0.2\lib put mychecks.jar
> Step 2 : Into C:\Program Files\Apache Software Foundation\Maven 
> 1.0.2\bin modify forehead.conf adding on part [root] the line : 
> ${maven.home}/lib/mychecks.jar
> Step 3 : Into C:\Documents and 
> Settings\LTAN\.maven\cache\maven-checkstyle-plugin-2.5\plugin-resources 
> put the file mychecks_checks.xml. Don't forget to put "_checks" at the 
> end of the name of xml file.
> Final step : Into C:\Documents and 
> Settings\LTAN\.maven\cache\maven-checkstyle-plugin-2.5 modify into 
> plugin.properties the line "maven.checkstyle.format" like this : 
> maven.checkstyle.format = mychecks
> Don't precise "_checks", Maven goes to add "mychecks" and the string 
> "_checks".
> 
> Now i can use only my own checks and not for example Sun's checks
> The solution works but perhaps it's not the best solution...
> 
> Long life to Maven
> 
> Bye
> 
> Loïc
> 
>> From: Carlos Sanchez <ca...@gmail.com>
>> Reply-To: carlos@apache.org
>> To: darkan darkan <da...@hotmail.com>, Maven Users List 
>> <us...@maven.apache.org>
>> Subject: Re: How import my own checks in plugin checkstyle of Maven
>> Date: Tue, 26 Jul 2005 10:25:22 -0700
>>
>> Hi,
>>
>> I've never tried to do that so I can't tell you the exact steps, but
>> seems that you need to add your jar as a dependency to the project
>> adding this property:
>>
>>       <properties>
>>         <classloader>root</classloader>
>>       </properties>
>>
>> It's related to the info in 
>> http://jira.codehaus.org/browse/MPCHECKSTYLE-27
>>
>> Please send next emails to the maven users list.
>>
>> Regards
>>
>> On 7/26/05, darkan darkan <da...@hotmail.com> wrote:
>> > Hello Carlos,
>> > i permit to write this email because i have a problem to import my own
>> > checks.
>> > Indeed, i have my checks in mychecks.jar (.class and a 
>> message.properties)
>> > and i would like step by step know how use my checks in maven with the
>> > plugin-maven-checkstyle.
>> > Namely, where do i put checks.jar and how customize the plugin to 
>> assimilate
>> > my checks
>> > Thx
>> >
>> > Loïc
>> >
>> >
>> >
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 


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


Re: How import my own checks in plugin checkstyle of Maven

Posted by darkan darkan <da...@hotmail.com>.
Hi,

Right, yesterday i found a solution to import my own checks :
Step 1 : Into C:\Program Files\Apache Software Foundation\Maven 1.0.2\lib 
put mychecks.jar
Step 2 : Into C:\Program Files\Apache Software Foundation\Maven 1.0.2\bin 
modify forehead.conf adding on part [root] the line : 
${maven.home}/lib/mychecks.jar
Step 3 : Into C:\Documents and 
Settings\LTAN\.maven\cache\maven-checkstyle-plugin-2.5\plugin-resources put 
the file mychecks_checks.xml. Don't forget to put "_checks" at the end of 
the name of xml file.
Final step : Into C:\Documents and 
Settings\LTAN\.maven\cache\maven-checkstyle-plugin-2.5 modify into 
plugin.properties the line "maven.checkstyle.format" like this : 
maven.checkstyle.format = mychecks
Don't precise "_checks", Maven goes to add "mychecks" and the string 
"_checks".

Now i can use only my own checks and not for example Sun's checks
The solution works but perhaps it's not the best solution...

Long life to Maven

Bye

Loïc

>From: Carlos Sanchez <ca...@gmail.com>
>Reply-To: carlos@apache.org
>To: darkan darkan <da...@hotmail.com>, Maven Users List 
><us...@maven.apache.org>
>Subject: Re: How import my own checks in plugin checkstyle of Maven
>Date: Tue, 26 Jul 2005 10:25:22 -0700
>
>Hi,
>
>I've never tried to do that so I can't tell you the exact steps, but
>seems that you need to add your jar as a dependency to the project
>adding this property:
>
>       <properties>
>         <classloader>root</classloader>
>       </properties>
>
>It's related to the info in http://jira.codehaus.org/browse/MPCHECKSTYLE-27
>
>Please send next emails to the maven users list.
>
>Regards
>
>On 7/26/05, darkan darkan <da...@hotmail.com> wrote:
> > Hello Carlos,
> > i permit to write this email because i have a problem to import my own
> > checks.
> > Indeed, i have my checks in mychecks.jar (.class and a 
>message.properties)
> > and i would like step by step know how use my checks in maven with the
> > plugin-maven-checkstyle.
> > Namely, where do i put checks.jar and how customize the plugin to 
>assimilate
> > my checks
> > Thx
> >
> > Loïc
> >
> >
> >



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