You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by houzecl <ch...@etat.ge.ch> on 2007/10/03 18:30:16 UTC

checkstyle plugins: maven and eclipse

Hi

I am using maven-checkstyle-plugin with a specific configuration file 
(I made it as a resource in a jar and the plugin configuration works fine:
checkstyle - or the plugin - is clever enough to get the xml file out of the
dependency jar)

I'd like to do the same within eclipse with the eclipse-checkstyle-plugin
(so that checkstyle can be active during eclipse work, not just when
building with maven)
Unfortunately the checkstyle preference window does not seem to allow a
reference to a jar.
it needs an xml file
This is not really a maven question but someone may know if my request is
possible ???

thanks for any hint
 
Christian-Luc

-- 
View this message in context: http://www.nabble.com/checkstyle-plugins%3A-maven-and-eclipse-tf4562913s177.html#a13022606
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: checkstyle plugins: maven and eclipse

Posted by houzecl <ch...@etat.ge.ch>.
this is the answer I got from checkstyle mailing list :-)

"I would suggest trying the mailing lists for Maven and the Eclipse
plug-in."

Anyway, all previous answers are very probably the best solutions at this
time.

Christian-Luc



Wayne Fay wrote:
> 
> You'll probably have better luck with this question in an Eclipse
> mailing list. Or possibly even the main Checkstyle user list.
> 
> Wayne
> 
> On 10/3/07, houzecl <ch...@etat.ge.ch> wrote:
>>
>> Hi
>>
>> I am using maven-checkstyle-plugin with a specific configuration file
>> (I made it as a resource in a jar and the plugin configuration works
>> fine:
>> checkstyle - or the plugin - is clever enough to get the xml file out of
>> the
>> dependency jar)
>>
>> I'd like to do the same within eclipse with the eclipse-checkstyle-plugin
>> (so that checkstyle can be active during eclipse work, not just when
>> building with maven)
>> Unfortunately the checkstyle preference window does not seem to allow a
>> reference to a jar.
>> it needs an xml file
>> This is not really a maven question but someone may know if my request is
>> possible ???
>>
>> thanks for any hint
>>
>> Christian-Luc
>>
>> --
>> View this message in context:
>> http://www.nabble.com/checkstyle-plugins%3A-maven-and-eclipse-tf4562913s177.html#a13022606
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/checkstyle-plugins%3A-maven-and-eclipse-tf4562913s177.html#a13058359
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: checkstyle plugins: maven and eclipse

Posted by Wayne Fay <wa...@gmail.com>.
You'll probably have better luck with this question in an Eclipse
mailing list. Or possibly even the main Checkstyle user list.

Wayne

On 10/3/07, houzecl <ch...@etat.ge.ch> wrote:
>
> Hi
>
> I am using maven-checkstyle-plugin with a specific configuration file
> (I made it as a resource in a jar and the plugin configuration works fine:
> checkstyle - or the plugin - is clever enough to get the xml file out of the
> dependency jar)
>
> I'd like to do the same within eclipse with the eclipse-checkstyle-plugin
> (so that checkstyle can be active during eclipse work, not just when
> building with maven)
> Unfortunately the checkstyle preference window does not seem to allow a
> reference to a jar.
> it needs an xml file
> This is not really a maven question but someone may know if my request is
> possible ???
>
> thanks for any hint
>
> Christian-Luc
>
> --
> View this message in context: http://www.nabble.com/checkstyle-plugins%3A-maven-and-eclipse-tf4562913s177.html#a13022606
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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: checkstyle plugins: maven and eclipse

Posted by "Hayes, Peter" <Pe...@fmr.com>.
In my organization we have created a super pom that all projects inherit
from.  Within that super pom, we have configured the eclipse plugin to
generate a standard .checkstyle file that includes the same rules that
are applied by the maven build.  This works well but you do have to keep
the two in sync.

See :
http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html#a
dditionalConfig

-----Original Message-----
From: houzecl [mailto:christian-luc.houze@etat.ge.ch] 
Sent: Thursday, October 04, 2007 4:02 AM
To: users@maven.apache.org
Subject: Re: checkstyle plugins: maven and eclipse


Yes, the last part of your post is what we'd like to do:

One mavenized projet holding a set of configuration files.
So that you can version, deploy, and access the jar containing the
appropriate set of rules.
We do not want to embed the rules inside the project(s) that will be
using
the rules.
we want these rules to be common (as sun_checks). 

Therefore, once the rules'jar is available in the repository, it can be
accessed by maven (no probs)
BUT how can you make it available to eclipse at the same time ? (do you
explode the jar in the repository when you deploy it ?, so that eclipse
checkstyle can reference the xml files ...)

anyway, I posted the question in checkstyle mailing list.
If I get an answer, I'll post it

good day,

Christian-Luc



Greg_Vaughn wrote:
> 
>> I am using maven-checkstyle-plugin with a specific configuration file

>> (I made it as a resource in a jar and the plugin configuration works 
> fine:
>> checkstyle - or the plugin - is clever enough to get the xml file out
of 
> the
>> dependency jar)
>> 
>> I'd like to do the same within eclipse with the 
> eclipse-checkstyle-plugin
>> (so that checkstyle can be active during eclipse work, not just when
>> building with maven)
>> Unfortunately the checkstyle preference window does not seem to allow
a
>> reference to a jar.
>> it needs an xml file
>> This is not really a maven question but someone may know if my
request 
> is
>> possible ???
> 
> We did this last year, but the details aren't fresh on my mind. Let me

> know
> if this general approach is not enough.
> 
> We attached the checkstyle xml file to the project so it was deployed 
> along
> with the jar file to our corporate maven repository. Since that
repository
> is available via http, we configured the eclipse plugin to use that
url.
> 
> Now we have one mavenized project to manage the checkstyle rules. When
we
> deploy it, the checkstyle rules become available to both maven and
eclipse
> at the same time.
> 
> -Greg Vaughn
> 
> 
> ======================================================================
> 
> Confidentiality Notice: The information contained in and transmitted
with
> this communication is strictly confidential, is intended only for the
use
> of the intended recipient, and is the property of Countrywide
Financial
> Corporation or its affiliates and subsidiaries. If you are not the
> intended recipient, you are hereby notified that any use of the
> information contained in or transmitted with the communication or
> dissemination, distribution, or copying of this communication is
strictly
> prohibited by law. If you have received this communication in error,
> please immediately return this communication to the sender and delete
the
> original message and any copy of it in your possession.
> 
> ======================================================================
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/checkstyle-plugins%3A-maven-and-eclipse-tf4562913s
177.html#a13034381
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
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: checkstyle plugins: maven and eclipse

Posted by Gr...@Countrywide.Com.
For the .checkstyle file, I just configured the eclipse prefs UI to point 
to a http url. It was pretty straightforward IIRC. Just poke through the 
checkstyle plugin UI. I think I did it in the project specific settings 
(project properties?). That's what creates the .checkstyle file. Otherwise 
it's stored in the workspace.

On the other point, use build-helper-maven-plugin to deploy the xml file 
as well as the jar.
http://mojo.codehaus.org/build-helper-maven-plugin/howto.html 
attach-artifact section has an example.

-Greg

"Jim Sellers" <ji...@gmail.com> wrote on 10/05/2007 08:15:32 AM:

> Hi Greg.
> 
> A couple of questions:
> "The .checkstyle file can point to the xml file in the maven repo."
> - how does it do this?  Can you please provide an example?
> 
> "There's only one source xml config file, but it gets deployed twice."
> - Are you doing that manually?  Do you have it done with maven?  Is so,
> could you provide an example of that or point me in the right direction?
> 
> Thanks for your time!
> Jim
> 
> 
> On 10/4/07, Greg_Vaughn@countrywide.com <Gr...@countrywide.com> 
wrote:
> >
> > Thanks for mentioning that, Dimitris. I forgot about that piece. 
They're
> > not mutually exclusive though. The .checkstyle file can point to the 
xml
> > file in the maven repo.
> >
> > houzecl, I don't think I was clear enough in my first message. I have 
both
> > the xml in a jar and the xml out of a jar in the maven repo. Maven 
uses
> > the one in the jar. The eclipse plugin uses the one out of the jar.
> > There's only one source xml config file, but it gets deployed twice. 
It's
> > not quite optimal, but it was close enough for our purposes.
> >
> > Someone else commented that you can add extra info in a parent pom for 
the
> > eclipse plugin that will add the metadata for checkstyle when
> > eclipse:eclipse goal is run. We went with more of Dimitris' approach 
here.
> > The .checkstyle file is part of our archetypes to make the eclipse 
plugin
> > happy. But we do use the jar file for maven invocation.
> >
> > -Greg Vaughn
> >
> > Dimitris Kapanidis <di...@itconsulting.gr> wrote on 10/04/2007 
03:47:17
> > AM:
> >
> > > I have another solution to this problem, which is not the maven way 
but
> > > works equally.
> > >
> > > I have uploaded the file on a web server and accessing it from 
there:
> > >
> > > Eclipse is using .checkstyle config to see the remote location of 
the
> > > configuration (there is an option for remote file)
> > > Maven is using the parent pom.xml to see the same remote location of 
the
> >
> > > configuration.
> > >      <plugin>
> > >                 <artifactId>maven-checkstyle-plugin</artifactId>
> > >                 <configuration>
> > >
> > >
> > <configLocation>http://www.someplace.net/scytl_checkstyle.xml
> > </configLocation>
> > >                 </configuration>
> > >      </plugin>
> > >
> > > I'd prefer the jar solution though, is much cleaner.
> > >
> > > houzecl wrote:
> > > > Yes, the last part of your post is what we'd like to do:
> > > >
> > > > One mavenized projet holding a set of configuration files.
> > > > So that you can version, deploy, and access the jar containing the
> > > > appropriate set of rules.
> > > > We do not want to embed the rules inside the project(s) that will 
be
> > using
> > > > the rules.
> > > > we want these rules to be common (as sun_checks).
> > > >
> > > > Therefore, once the rules'jar is available in the repository, it 
can
> > be
> > > > accessed by maven (no probs)
> > > > BUT how can you make it available to eclipse at the same time ? 
(do
> > you
> > > > explode the jar in the repository when you deploy it ?, so that
> > eclipse
> > > > checkstyle can reference the xml files ...)
> > > >
> > > > anyway, I posted the question in checkstyle mailing list.
> > > > If I get an answer, I'll post it
> > > >
> > > > good day,
> > > >
> > > > Christian-Luc
> > > >
> > > >
> > > >
> > > > Greg_Vaughn wrote:
> > > >
> > > >>> I am using maven-checkstyle-plugin with a specific configuration
> > file
> > > >>> (I made it as a resource in a jar and the plugin configuration 
works
> >
> > > >>>
> > > >> fine:
> > > >>
> > > >>> checkstyle - or the plugin - is clever enough to get the xml 
file
> > out of
> > > >>>
> > > >> the
> > > >>
> > > >>> dependency jar)
> > > >>>
> > > >>> I'd like to do the same within eclipse with the
> > > >>>
> > > >> eclipse-checkstyle-plugin
> > > >>
> > > >>> (so that checkstyle can be active during eclipse work, not just 
when
> > > >>> building with maven)
> > > >>> Unfortunately the checkstyle preference window does not seem to
> > allow a
> > > >>> reference to a jar.
> > > >>> it needs an xml file
> > > >>> This is not really a maven question but someone may know if my
> > request
> > > >>>
> > > >> is
> > > >>
> > > >>> possible ???
> > > >>>
> > > >> We did this last year, but the details aren't fresh on my mind. 
Let
> > me
> > > >> know
> > > >> if this general approach is not enough.
> > > >>
> > > >> We attached the checkstyle xml file to the project so it was 
deployed
> >
> > > >> along
> > > >> with the jar file to our corporate maven repository. Since that
> > repository
> > > >> is available via http, we configured the eclipse plugin to use 
that
> > url.
> > > >>
> > > >> Now we have one mavenized project to manage the checkstyle rules.
> > When we
> > > >> deploy it, the checkstyle rules become available to both maven 
and
> > eclipse
> > > >> at the same time.
> > > >>
> > > >> -Greg Vaughn
> > > >>
> > > >>
> > > >>
> > ======================================================================
> > > >>
> > > >> Confidentiality Notice: The information contained in and 
transmitted
> > with
> > > >> this communication is strictly confidential, is intended only for 
the
> > use
> > > >> of the intended recipient, and is the property of Countrywide
> > Financial
> > > >> Corporation or its affiliates and subsidiaries. If you are not 
the
> > > >> intended recipient, you are hereby notified that any use of the
> > > >> information contained in or transmitted with the communication or
> > > >> dissemination, distribution, or copying of this communication is
> > strictly
> > > >> prohibited by law. If you have received this communication in 
error,
> > > >> please immediately return this communication to the sender and 
delete
> > the
> > > >> original message and any copy of it in your possession.
> > > >>
> > > >>
> > ======================================================================
> > > >>
> > > >>
> > > >>
> > > >>
> > > >
> > > >
> > >
> > >
> > > 
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> >
> >
> > ======================================================================
> >
> > Confidentiality Notice: The information contained in and transmitted 
with
> > this communication is strictly confidential, is intended only for the 
use of
> > the intended recipient, and is the property of Countrywide Financial
> > Corporation or its affiliates and subsidiaries. If you are not the 
intended
> > recipient, you are hereby notified that any use of the 
informationcontained
> > in or transmitted with the communication or dissemination, 
distribution, or
> > copying of this communication is strictly prohibited by law. If you 
have
> > received this communication in error, please immediately return this
> > communication to the sender and delete the original message and any 
copy of
> > it in your possession.
> >
> > ======================================================================
> >
> >


======================================================================

Confidentiality Notice: The information contained in and transmitted with this communication is strictly confidential, is intended only for the use of the intended recipient, and is the property of Countrywide Financial Corporation or its affiliates and subsidiaries. If you are not the intended recipient, you are hereby notified that any use of the information contained in or transmitted with the communication or dissemination, distribution, or copying of this communication is strictly prohibited by law. If you have received this communication in error, please immediately return this communication to the sender and delete the original message and any copy of it in your possession.

======================================================================


Re: checkstyle plugins: maven and eclipse

Posted by Jim Sellers <ji...@gmail.com>.
Hi Greg.

A couple of questions:
"The .checkstyle file can point to the xml file in the maven repo."
- how does it do this?  Can you please provide an example?

"There's only one source xml config file, but it gets deployed twice."
- Are you doing that manually?  Do you have it done with maven?  Is so,
could you provide an example of that or point me in the right direction?

Thanks for your time!
Jim


On 10/4/07, Greg_Vaughn@countrywide.com <Gr...@countrywide.com> wrote:
>
> Thanks for mentioning that, Dimitris. I forgot about that piece. They're
> not mutually exclusive though. The .checkstyle file can point to the xml
> file in the maven repo.
>
> houzecl, I don't think I was clear enough in my first message. I have both
> the xml in a jar and the xml out of a jar in the maven repo. Maven uses
> the one in the jar. The eclipse plugin uses the one out of the jar.
> There's only one source xml config file, but it gets deployed twice. It's
> not quite optimal, but it was close enough for our purposes.
>
> Someone else commented that you can add extra info in a parent pom for the
> eclipse plugin that will add the metadata for checkstyle when
> eclipse:eclipse goal is run. We went with more of Dimitris' approach here.
> The .checkstyle file is part of our archetypes to make the eclipse plugin
> happy. But we do use the jar file for maven invocation.
>
> -Greg Vaughn
>
> Dimitris Kapanidis <di...@itconsulting.gr> wrote on 10/04/2007 03:47:17
> AM:
>
> > I have another solution to this problem, which is not the maven way but
> > works equally.
> >
> > I have uploaded the file on a web server and accessing it from there:
> >
> > Eclipse is using .checkstyle config to see the remote location of the
> > configuration (there is an option for remote file)
> > Maven is using the parent pom.xml to see the same remote location of the
>
> > configuration.
> >      <plugin>
> >                 <artifactId>maven-checkstyle-plugin</artifactId>
> >                 <configuration>
> >
> >
> <configLocation>http://www.someplace.net/scytl_checkstyle.xml
> </configLocation>
> >                 </configuration>
> >      </plugin>
> >
> > I'd prefer the jar solution though, is much cleaner.
> >
> > houzecl wrote:
> > > Yes, the last part of your post is what we'd like to do:
> > >
> > > One mavenized projet holding a set of configuration files.
> > > So that you can version, deploy, and access the jar containing the
> > > appropriate set of rules.
> > > We do not want to embed the rules inside the project(s) that will be
> using
> > > the rules.
> > > we want these rules to be common (as sun_checks).
> > >
> > > Therefore, once the rules'jar is available in the repository, it can
> be
> > > accessed by maven (no probs)
> > > BUT how can you make it available to eclipse at the same time ? (do
> you
> > > explode the jar in the repository when you deploy it ?, so that
> eclipse
> > > checkstyle can reference the xml files ...)
> > >
> > > anyway, I posted the question in checkstyle mailing list.
> > > If I get an answer, I'll post it
> > >
> > > good day,
> > >
> > > Christian-Luc
> > >
> > >
> > >
> > > Greg_Vaughn wrote:
> > >
> > >>> I am using maven-checkstyle-plugin with a specific configuration
> file
> > >>> (I made it as a resource in a jar and the plugin configuration works
>
> > >>>
> > >> fine:
> > >>
> > >>> checkstyle - or the plugin - is clever enough to get the xml file
> out of
> > >>>
> > >> the
> > >>
> > >>> dependency jar)
> > >>>
> > >>> I'd like to do the same within eclipse with the
> > >>>
> > >> eclipse-checkstyle-plugin
> > >>
> > >>> (so that checkstyle can be active during eclipse work, not just when
> > >>> building with maven)
> > >>> Unfortunately the checkstyle preference window does not seem to
> allow a
> > >>> reference to a jar.
> > >>> it needs an xml file
> > >>> This is not really a maven question but someone may know if my
> request
> > >>>
> > >> is
> > >>
> > >>> possible ???
> > >>>
> > >> We did this last year, but the details aren't fresh on my mind. Let
> me
> > >> know
> > >> if this general approach is not enough.
> > >>
> > >> We attached the checkstyle xml file to the project so it was deployed
>
> > >> along
> > >> with the jar file to our corporate maven repository. Since that
> repository
> > >> is available via http, we configured the eclipse plugin to use that
> url.
> > >>
> > >> Now we have one mavenized project to manage the checkstyle rules.
> When we
> > >> deploy it, the checkstyle rules become available to both maven and
> eclipse
> > >> at the same time.
> > >>
> > >> -Greg Vaughn
> > >>
> > >>
> > >>
> ======================================================================
> > >>
> > >> Confidentiality Notice: The information contained in and transmitted
> with
> > >> this communication is strictly confidential, is intended only for the
> use
> > >> of the intended recipient, and is the property of Countrywide
> Financial
> > >> Corporation or its affiliates and subsidiaries. If you are not the
> > >> intended recipient, you are hereby notified that any use of the
> > >> information contained in or transmitted with the communication or
> > >> dissemination, distribution, or copying of this communication is
> strictly
> > >> prohibited by law. If you have received this communication in error,
> > >> please immediately return this communication to the sender and delete
> the
> > >> original message and any copy of it in your possession.
> > >>
> > >>
> ======================================================================
> > >>
> > >>
> > >>
> > >>
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
>
> ======================================================================
>
> Confidentiality Notice: The information contained in and transmitted with
> this communication is strictly confidential, is intended only for the use of
> the intended recipient, and is the property of Countrywide Financial
> Corporation or its affiliates and subsidiaries. If you are not the intended
> recipient, you are hereby notified that any use of the information contained
> in or transmitted with the communication or dissemination, distribution, or
> copying of this communication is strictly prohibited by law. If you have
> received this communication in error, please immediately return this
> communication to the sender and delete the original message and any copy of
> it in your possession.
>
> ======================================================================
>
>

Re: checkstyle plugins: maven and eclipse

Posted by Gr...@Countrywide.Com.
Thanks for mentioning that, Dimitris. I forgot about that piece. They're 
not mutually exclusive though. The .checkstyle file can point to the xml 
file in the maven repo.

houzecl, I don't think I was clear enough in my first message. I have both 
the xml in a jar and the xml out of a jar in the maven repo. Maven uses 
the one in the jar. The eclipse plugin uses the one out of the jar. 
There's only one source xml config file, but it gets deployed twice. It's 
not quite optimal, but it was close enough for our purposes.

Someone else commented that you can add extra info in a parent pom for the 
eclipse plugin that will add the metadata for checkstyle when 
eclipse:eclipse goal is run. We went with more of Dimitris' approach here. 
The .checkstyle file is part of our archetypes to make the eclipse plugin 
happy. But we do use the jar file for maven invocation.

-Greg Vaughn

Dimitris Kapanidis <di...@itconsulting.gr> wrote on 10/04/2007 03:47:17 
AM:

> I have another solution to this problem, which is not the maven way but 
> works equally.
> 
> I have uploaded the file on a web server and accessing it from there:
> 
> Eclipse is using .checkstyle config to see the remote location of the 
> configuration (there is an option for remote file)
> Maven is using the parent pom.xml to see the same remote location of the 

> configuration.
>      <plugin>
>                 <artifactId>maven-checkstyle-plugin</artifactId>
>                 <configuration>
> 
> 
<configLocation>http://www.someplace.net/scytl_checkstyle.xml</configLocation>
>                 </configuration>
>      </plugin>
> 
> I'd prefer the jar solution though, is much cleaner.
> 
> houzecl wrote:
> > Yes, the last part of your post is what we'd like to do:
> >
> > One mavenized projet holding a set of configuration files.
> > So that you can version, deploy, and access the jar containing the
> > appropriate set of rules.
> > We do not want to embed the rules inside the project(s) that will be 
using
> > the rules.
> > we want these rules to be common (as sun_checks). 
> >
> > Therefore, once the rules'jar is available in the repository, it can 
be
> > accessed by maven (no probs)
> > BUT how can you make it available to eclipse at the same time ? (do 
you
> > explode the jar in the repository when you deploy it ?, so that 
eclipse
> > checkstyle can reference the xml files ...)
> >
> > anyway, I posted the question in checkstyle mailing list.
> > If I get an answer, I'll post it
> >
> > good day,
> >
> > Christian-Luc
> >
> >
> >
> > Greg_Vaughn wrote:
> > 
> >>> I am using maven-checkstyle-plugin with a specific configuration 
file 
> >>> (I made it as a resource in a jar and the plugin configuration works 

> >>> 
> >> fine:
> >> 
> >>> checkstyle - or the plugin - is clever enough to get the xml file 
out of 
> >>> 
> >> the
> >> 
> >>> dependency jar)
> >>>
> >>> I'd like to do the same within eclipse with the 
> >>> 
> >> eclipse-checkstyle-plugin
> >> 
> >>> (so that checkstyle can be active during eclipse work, not just when
> >>> building with maven)
> >>> Unfortunately the checkstyle preference window does not seem to 
allow a
> >>> reference to a jar.
> >>> it needs an xml file
> >>> This is not really a maven question but someone may know if my 
request 
> >>> 
> >> is
> >> 
> >>> possible ???
> >>> 
> >> We did this last year, but the details aren't fresh on my mind. Let 
me 
> >> know
> >> if this general approach is not enough.
> >>
> >> We attached the checkstyle xml file to the project so it was deployed 

> >> along
> >> with the jar file to our corporate maven repository. Since that 
repository
> >> is available via http, we configured the eclipse plugin to use that 
url.
> >>
> >> Now we have one mavenized project to manage the checkstyle rules. 
When we
> >> deploy it, the checkstyle rules become available to both maven and 
eclipse
> >> at the same time.
> >>
> >> -Greg Vaughn
> >>
> >>
> >> 
======================================================================
> >>
> >> Confidentiality Notice: The information contained in and transmitted 
with
> >> this communication is strictly confidential, is intended only for the 
use
> >> of the intended recipient, and is the property of Countrywide 
Financial
> >> Corporation or its affiliates and subsidiaries. If you are not the
> >> intended recipient, you are hereby notified that any use of the
> >> information contained in or transmitted with the communication or
> >> dissemination, distribution, or copying of this communication is 
strictly
> >> prohibited by law. If you have received this communication in error,
> >> please immediately return this communication to the sender and delete 
the
> >> original message and any copy of it in your possession.
> >>
> >> 
======================================================================
> >>
> >>
> >>
> >> 
> >
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


======================================================================

Confidentiality Notice: The information contained in and transmitted with this communication is strictly confidential, is intended only for the use of the intended recipient, and is the property of Countrywide Financial Corporation or its affiliates and subsidiaries. If you are not the intended recipient, you are hereby notified that any use of the information contained in or transmitted with the communication or dissemination, distribution, or copying of this communication is strictly prohibited by law. If you have received this communication in error, please immediately return this communication to the sender and delete the original message and any copy of it in your possession.

======================================================================


Re: checkstyle plugins: maven and eclipse

Posted by Dimitris Kapanidis <di...@itconsulting.gr>.
I have another solution to this problem, which is not the maven way but 
works equally.

I have uploaded the file on a web server and accessing it from there:

Eclipse is using .checkstyle config to see the remote location of the 
configuration (there is an option for remote file)
Maven is using the parent pom.xml to see the same remote location of the 
configuration.
     <plugin>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <configuration>
                    
<configLocation>http://www.someplace.net/scytl_checkstyle.xml</configLocation>
                </configuration>
     </plugin>

I'd prefer the jar solution though, is much cleaner.

houzecl wrote:
> Yes, the last part of your post is what we'd like to do:
>
> One mavenized projet holding a set of configuration files.
> So that you can version, deploy, and access the jar containing the
> appropriate set of rules.
> We do not want to embed the rules inside the project(s) that will be using
> the rules.
> we want these rules to be common (as sun_checks). 
>
> Therefore, once the rules'jar is available in the repository, it can be
> accessed by maven (no probs)
> BUT how can you make it available to eclipse at the same time ? (do you
> explode the jar in the repository when you deploy it ?, so that eclipse
> checkstyle can reference the xml files ...)
>
> anyway, I posted the question in checkstyle mailing list.
> If I get an answer, I'll post it
>
> good day,
>
> Christian-Luc
>
>
>
> Greg_Vaughn wrote:
>   
>>> I am using maven-checkstyle-plugin with a specific configuration file 
>>> (I made it as a resource in a jar and the plugin configuration works 
>>>       
>> fine:
>>     
>>> checkstyle - or the plugin - is clever enough to get the xml file out of 
>>>       
>> the
>>     
>>> dependency jar)
>>>
>>> I'd like to do the same within eclipse with the 
>>>       
>> eclipse-checkstyle-plugin
>>     
>>> (so that checkstyle can be active during eclipse work, not just when
>>> building with maven)
>>> Unfortunately the checkstyle preference window does not seem to allow a
>>> reference to a jar.
>>> it needs an xml file
>>> This is not really a maven question but someone may know if my request 
>>>       
>> is
>>     
>>> possible ???
>>>       
>> We did this last year, but the details aren't fresh on my mind. Let me 
>> know
>> if this general approach is not enough.
>>
>> We attached the checkstyle xml file to the project so it was deployed 
>> along
>> with the jar file to our corporate maven repository. Since that repository
>> is available via http, we configured the eclipse plugin to use that url.
>>
>> Now we have one mavenized project to manage the checkstyle rules. When we
>> deploy it, the checkstyle rules become available to both maven and eclipse
>> at the same time.
>>
>> -Greg Vaughn
>>
>>
>> ======================================================================
>>
>> Confidentiality Notice: The information contained in and transmitted with
>> this communication is strictly confidential, is intended only for the use
>> of the intended recipient, and is the property of Countrywide Financial
>> Corporation or its affiliates and subsidiaries. If you are not the
>> intended recipient, you are hereby notified that any use of the
>> information contained in or transmitted with the communication or
>> dissemination, distribution, or copying of this communication is strictly
>> prohibited by law. If you have received this communication in error,
>> please immediately return this communication to the sender and delete the
>> original message and any copy of it in your possession.
>>
>> ======================================================================
>>
>>
>>
>>     
>
>   


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


Re: checkstyle plugins: maven and eclipse

Posted by houzecl <ch...@etat.ge.ch>.
Yes, the last part of your post is what we'd like to do:

One mavenized projet holding a set of configuration files.
So that you can version, deploy, and access the jar containing the
appropriate set of rules.
We do not want to embed the rules inside the project(s) that will be using
the rules.
we want these rules to be common (as sun_checks). 

Therefore, once the rules'jar is available in the repository, it can be
accessed by maven (no probs)
BUT how can you make it available to eclipse at the same time ? (do you
explode the jar in the repository when you deploy it ?, so that eclipse
checkstyle can reference the xml files ...)

anyway, I posted the question in checkstyle mailing list.
If I get an answer, I'll post it

good day,

Christian-Luc



Greg_Vaughn wrote:
> 
>> I am using maven-checkstyle-plugin with a specific configuration file 
>> (I made it as a resource in a jar and the plugin configuration works 
> fine:
>> checkstyle - or the plugin - is clever enough to get the xml file out of 
> the
>> dependency jar)
>> 
>> I'd like to do the same within eclipse with the 
> eclipse-checkstyle-plugin
>> (so that checkstyle can be active during eclipse work, not just when
>> building with maven)
>> Unfortunately the checkstyle preference window does not seem to allow a
>> reference to a jar.
>> it needs an xml file
>> This is not really a maven question but someone may know if my request 
> is
>> possible ???
> 
> We did this last year, but the details aren't fresh on my mind. Let me 
> know
> if this general approach is not enough.
> 
> We attached the checkstyle xml file to the project so it was deployed 
> along
> with the jar file to our corporate maven repository. Since that repository
> is available via http, we configured the eclipse plugin to use that url.
> 
> Now we have one mavenized project to manage the checkstyle rules. When we
> deploy it, the checkstyle rules become available to both maven and eclipse
> at the same time.
> 
> -Greg Vaughn
> 
> 
> ======================================================================
> 
> Confidentiality Notice: The information contained in and transmitted with
> this communication is strictly confidential, is intended only for the use
> of the intended recipient, and is the property of Countrywide Financial
> Corporation or its affiliates and subsidiaries. If you are not the
> intended recipient, you are hereby notified that any use of the
> information contained in or transmitted with the communication or
> dissemination, distribution, or copying of this communication is strictly
> prohibited by law. If you have received this communication in error,
> please immediately return this communication to the sender and delete the
> original message and any copy of it in your possession.
> 
> ======================================================================
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/checkstyle-plugins%3A-maven-and-eclipse-tf4562913s177.html#a13034381
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: checkstyle plugins: maven and eclipse

Posted by Gr...@Countrywide.Com.
> I am using maven-checkstyle-plugin with a specific configuration file 
> (I made it as a resource in a jar and the plugin configuration works 
fine:
> checkstyle - or the plugin - is clever enough to get the xml file out of 
the
> dependency jar)
> 
> I'd like to do the same within eclipse with the 
eclipse-checkstyle-plugin
> (so that checkstyle can be active during eclipse work, not just when
> building with maven)
> Unfortunately the checkstyle preference window does not seem to allow a
> reference to a jar.
> it needs an xml file
> This is not really a maven question but someone may know if my request 
is
> possible ???

We did this last year, but the details aren't fresh on my mind. Let me 
know
if this general approach is not enough.

We attached the checkstyle xml file to the project so it was deployed 
along
with the jar file to our corporate maven repository. Since that repository
is available via http, we configured the eclipse plugin to use that url.

Now we have one mavenized project to manage the checkstyle rules. When we
deploy it, the checkstyle rules become available to both maven and eclipse
at the same time.

-Greg Vaughn


======================================================================

Confidentiality Notice: The information contained in and transmitted with this communication is strictly confidential, is intended only for the use of the intended recipient, and is the property of Countrywide Financial Corporation or its affiliates and subsidiaries. If you are not the intended recipient, you are hereby notified that any use of the information contained in or transmitted with the communication or dissemination, distribution, or copying of this communication is strictly prohibited by law. If you have received this communication in error, please immediately return this communication to the sender and delete the original message and any copy of it in your possession.

======================================================================