You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jason Kuster <ja...@google.com.INVALID> on 2017/07/21 17:48:08 UTC

rat:check bad default?

Hi,

I had a problem which I was fighting with for a few hours before figuring
out. I was trying to run the rat plugin manually against my project by
invoking `mvn rat:check`. It was failing to pick up the configuration I was
putting in my pom no matter what I did.

I finally noticed after a while that I was configuring
org.apache.rat:apache-rat-plugin in my pom, but that mvn rat:check was
executing the `rat-maven-plugin` instead. It appears that the codehaus rat
maven plugin (last developed in 2007) is what is resolved by invoking
`rat`, and that running the modern rat plugin requires fully qualifying the
name on the command line. I have two questions.

First, is it possible to set an override in my project's pom to clarify
that when I or another developer execute `mvn rat:check` I mean
org.apache.rat:apache-rat-plugin instead of
org.codehaus.mojo:rat-maven-plugin?

Second, is it possible to fix this on a more global scale so that other
folks don't run into the same problem in the future?

Best,

Jason

Re: rat:check bad default?

Posted by Benson Margulies <bi...@gmail.com>.
AFAIK, That can't be in pom, only settings, and there are many people
who would have to deal with this. Is the problem just that
org.codehaus.mojo is set up in the superpom as a popular destination?


On Fri, Jul 21, 2017 at 12:10 PM, John Patrick <nh...@gmail.com> wrote:
> Does this help?
> https://maven.apache.org/settings.html#Plugin_Groups
>
> Maybe something like this...
>
> <pluginGroups>
> <pluginGroup>org.apache.maven.plugins</pluginGroup>
> <pluginGroup>org.apache.rat</pluginGroup>
> <pluginGroup>org.mojohaus.mojo</pluginGroup>
> <pluginGroup>org.codehaus.mojo</pluginGroup>
> </pluginGroups>
>
> With codehaus dead, either moved to github or mojohaus, the scan
> ordering might need to be changed for future releases.
>
> Not sure if you can do it within the pom.xml, or it's purely a
> settings.xml change needed.
>
> John
>
>
> On 21 July 2017 at 18:48, Jason Kuster <ja...@google.com.invalid> wrote:
>> Hi,
>>
>> I had a problem which I was fighting with for a few hours before figuring
>> out. I was trying to run the rat plugin manually against my project by
>> invoking `mvn rat:check`. It was failing to pick up the configuration I was
>> putting in my pom no matter what I did.
>>
>> I finally noticed after a while that I was configuring
>> org.apache.rat:apache-rat-plugin in my pom, but that mvn rat:check was
>> executing the `rat-maven-plugin` instead. It appears that the codehaus rat
>> maven plugin (last developed in 2007) is what is resolved by invoking
>> `rat`, and that running the modern rat plugin requires fully qualifying the
>> name on the command line. I have two questions.
>>
>> First, is it possible to set an override in my project's pom to clarify
>> that when I or another developer execute `mvn rat:check` I mean
>> org.apache.rat:apache-rat-plugin instead of
>> org.codehaus.mojo:rat-maven-plugin?
>>
>> Second, is it possible to fix this on a more global scale so that other
>> folks don't run into the same problem in the future?
>>
>> Best,
>>
>> Jason
>
> ---------------------------------------------------------------------
> 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: rat:check bad default?

Posted by John Patrick <nh...@gmail.com>.
Does this help?
https://maven.apache.org/settings.html#Plugin_Groups

Maybe something like this...

<pluginGroups>
<pluginGroup>org.apache.maven.plugins</pluginGroup>
<pluginGroup>org.apache.rat</pluginGroup>
<pluginGroup>org.mojohaus.mojo</pluginGroup>
<pluginGroup>org.codehaus.mojo</pluginGroup>
</pluginGroups>

With codehaus dead, either moved to github or mojohaus, the scan
ordering might need to be changed for future releases.

Not sure if you can do it within the pom.xml, or it's purely a
settings.xml change needed.

John


On 21 July 2017 at 18:48, Jason Kuster <ja...@google.com.invalid> wrote:
> Hi,
>
> I had a problem which I was fighting with for a few hours before figuring
> out. I was trying to run the rat plugin manually against my project by
> invoking `mvn rat:check`. It was failing to pick up the configuration I was
> putting in my pom no matter what I did.
>
> I finally noticed after a while that I was configuring
> org.apache.rat:apache-rat-plugin in my pom, but that mvn rat:check was
> executing the `rat-maven-plugin` instead. It appears that the codehaus rat
> maven plugin (last developed in 2007) is what is resolved by invoking
> `rat`, and that running the modern rat plugin requires fully qualifying the
> name on the command line. I have two questions.
>
> First, is it possible to set an override in my project's pom to clarify
> that when I or another developer execute `mvn rat:check` I mean
> org.apache.rat:apache-rat-plugin instead of
> org.codehaus.mojo:rat-maven-plugin?
>
> Second, is it possible to fix this on a more global scale so that other
> folks don't run into the same problem in the future?
>
> Best,
>
> Jason

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


Re: rat:check bad default?

Posted by Benson Margulies <bi...@gmail.com>.
On Fri, Jul 21, 2017 at 2:24 PM, Robert Scholte <rf...@apache.org> wrote:
> Hi,
>
> just wondering, are both plugins part of the effective pom?
> When using a plugin prefix like "rat", Maven should first go over all
> plugins and verify if the prefix matches.
> Ensuring that org.apache.rat is above org.codehaus.mojo should help.

The Old Codehaus Rat is nowhere in our poms. The behavior is as if, in
the absence of a settings.xml for the user, org.codehaus.moho is
registered as a plugin group above org.apache.rat.

>
> thanks,
> Robert
>
> On Fri, 21 Jul 2017 19:48:08 +0200, Jason Kuster
> <ja...@google.com.invalid> wrote:
>
>> Hi,
>>
>> I had a problem which I was fighting with for a few hours before figuring
>> out. I was trying to run the rat plugin manually against my project by
>> invoking `mvn rat:check`. It was failing to pick up the configuration I
>> was
>> putting in my pom no matter what I did.
>>
>> I finally noticed after a while that I was configuring
>> org.apache.rat:apache-rat-plugin in my pom, but that mvn rat:check was
>> executing the `rat-maven-plugin` instead. It appears that the codehaus rat
>> maven plugin (last developed in 2007) is what is resolved by invoking
>> `rat`, and that running the modern rat plugin requires fully qualifying
>> the
>> name on the command line. I have two questions.
>>
>> First, is it possible to set an override in my project's pom to clarify
>> that when I or another developer execute `mvn rat:check` I mean
>> org.apache.rat:apache-rat-plugin instead of
>> org.codehaus.mojo:rat-maven-plugin?
>>
>> Second, is it possible to fix this on a more global scale so that other
>> folks don't run into the same problem in the future?
>>
>> Best,
>>
>> Jason
>
>
> ---------------------------------------------------------------------
> 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: rat:check bad default?

Posted by Robert Scholte <rf...@apache.org>.
Hi,

just wondering, are both plugins part of the effective pom?
When using a plugin prefix like "rat", Maven should first go over all  
plugins and verify if the prefix matches.
Ensuring that org.apache.rat is above org.codehaus.mojo should help.

thanks,
Robert

On Fri, 21 Jul 2017 19:48:08 +0200, Jason Kuster  
<ja...@google.com.invalid> wrote:

> Hi,
>
> I had a problem which I was fighting with for a few hours before figuring
> out. I was trying to run the rat plugin manually against my project by
> invoking `mvn rat:check`. It was failing to pick up the configuration I  
> was
> putting in my pom no matter what I did.
>
> I finally noticed after a while that I was configuring
> org.apache.rat:apache-rat-plugin in my pom, but that mvn rat:check was
> executing the `rat-maven-plugin` instead. It appears that the codehaus  
> rat
> maven plugin (last developed in 2007) is what is resolved by invoking
> `rat`, and that running the modern rat plugin requires fully qualifying  
> the
> name on the command line. I have two questions.
>
> First, is it possible to set an override in my project's pom to clarify
> that when I or another developer execute `mvn rat:check` I mean
> org.apache.rat:apache-rat-plugin instead of
> org.codehaus.mojo:rat-maven-plugin?
>
> Second, is it possible to fix this on a more global scale so that other
> folks don't run into the same problem in the future?
>
> Best,
>
> Jason

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