You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Benson Margulies <bi...@gmail.com> on 2015/07/10 03:04:55 UTC

A checkstyle plugin mystery

Ever since we bumped to 2.15 of the plugin, we've been hitting a
problem. I don't have a concise repro, so I'm not opening a JIRA yet,
but I thought I'd inquire for other people's experience.

We use some source generators, and none of them generate source that
is acceptable to our checkstyle rules. To prevent checkstyle from
processing that stuff, we bind the 'check' goal to the validate phase.
Since this is before generate-sources, it comes and goes before the
generator plugin(s) have a chance to register any additional source
roots.

The recent change afflicts only release builds. All is well until we
run release:perform, and then the build fails because of checkstyle
complaints on generated source.

How is it that the release plugin causes the generated source roots to
be visible to the plugin?

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


Re: A checkstyle plugin mystery

Posted by Benson Margulies <bi...@gmail.com>.
Yes, it's to do with the forked execution. I've made a test case and
created https://issues.apache.org/jira/browse/MRELEASE-915.

I haven't tried the <mavenExecutorId> yet, I will in a moment and
annotate the JIRA.


On Sun, Jul 12, 2015 at 1:08 PM, Benson Margulies <bi...@gmail.com> wrote:
> On Sat, Jul 11, 2015 at 5:04 AM, Robert Scholte <rf...@apache.org> wrote:
>> You know that release:perform doesn't do any magic. It would be the same as:
>> cd target/checkout
>> mvn deploy (or mvn deploy site-deploy)
>>
>> If this works as expected (without failures), then it looks like something
>> is leaking.
>> Could you try to switch to the ForkedMavenExecutor?
>> <mavenExecutorId>forked-path</mavenExecutorId>
>
> Where do I put that? release plugin config?
>
>>
>> thanks,
>> Robert
>>
>> Op Fri, 10 Jul 2015 03:04:55 +0200 schreef Benson Margulies
>> <bi...@gmail.com>:
>>
>>> Ever since we bumped to 2.15 of the plugin, we've been hitting a
>>> problem. I don't have a concise repro, so I'm not opening a JIRA yet,
>>> but I thought I'd inquire for other people's experience.
>>>
>>> We use some source generators, and none of them generate source that
>>> is acceptable to our checkstyle rules. To prevent checkstyle from
>>> processing that stuff, we bind the 'check' goal to the validate phase.
>>> Since this is before generate-sources, it comes and goes before the
>>> generator plugin(s) have a chance to register any additional source
>>> roots.
>>>
>>> The recent change afflicts only release builds. All is well until we
>>> run release:perform, and then the build fails because of checkstyle
>>> complaints on generated source.
>>>
>>> How is it that the release plugin causes the generated source roots to
>>> be visible to the plugin?
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>

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


Re: A checkstyle plugin mystery

Posted by Benson Margulies <bi...@gmail.com>.
On Sat, Jul 11, 2015 at 5:04 AM, Robert Scholte <rf...@apache.org> wrote:
> You know that release:perform doesn't do any magic. It would be the same as:
> cd target/checkout
> mvn deploy (or mvn deploy site-deploy)
>
> If this works as expected (without failures), then it looks like something
> is leaking.
> Could you try to switch to the ForkedMavenExecutor?
> <mavenExecutorId>forked-path</mavenExecutorId>

Where do I put that? release plugin config?

>
> thanks,
> Robert
>
> Op Fri, 10 Jul 2015 03:04:55 +0200 schreef Benson Margulies
> <bi...@gmail.com>:
>
>> Ever since we bumped to 2.15 of the plugin, we've been hitting a
>> problem. I don't have a concise repro, so I'm not opening a JIRA yet,
>> but I thought I'd inquire for other people's experience.
>>
>> We use some source generators, and none of them generate source that
>> is acceptable to our checkstyle rules. To prevent checkstyle from
>> processing that stuff, we bind the 'check' goal to the validate phase.
>> Since this is before generate-sources, it comes and goes before the
>> generator plugin(s) have a chance to register any additional source
>> roots.
>>
>> The recent change afflicts only release builds. All is well until we
>> run release:perform, and then the build fails because of checkstyle
>> complaints on generated source.
>>
>> How is it that the release plugin causes the generated source roots to
>> be visible to the plugin?
>>
>> ---------------------------------------------------------------------
>> 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
>

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


Re: A checkstyle plugin mystery

Posted by Robert Scholte <rf...@apache.org>.
You know that release:perform doesn't do any magic. It would be the same  
as:
cd target/checkout
mvn deploy (or mvn deploy site-deploy)

If this works as expected (without failures), then it looks like something  
is leaking.
Could you try to switch to the ForkedMavenExecutor?
<mavenExecutorId>forked-path</mavenExecutorId>

thanks,
Robert

Op Fri, 10 Jul 2015 03:04:55 +0200 schreef Benson Margulies  
<bi...@gmail.com>:

> Ever since we bumped to 2.15 of the plugin, we've been hitting a
> problem. I don't have a concise repro, so I'm not opening a JIRA yet,
> but I thought I'd inquire for other people's experience.
>
> We use some source generators, and none of them generate source that
> is acceptable to our checkstyle rules. To prevent checkstyle from
> processing that stuff, we bind the 'check' goal to the validate phase.
> Since this is before generate-sources, it comes and goes before the
> generator plugin(s) have a chance to register any additional source
> roots.
>
> The recent change afflicts only release builds. All is well until we
> run release:perform, and then the build fails because of checkstyle
> complaints on generated source.
>
> How is it that the release plugin causes the generated source roots to
> be visible to the plugin?
>
> ---------------------------------------------------------------------
> 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: A checkstyle plugin mystery

Posted by Jeff Jensen <je...@upstairstechnology.com>.
I don't know the answer to your intriguing question... my suggestion
prevents the problem though: use Checkstyle suppression filters for the
generated directories, e.g.:
  <suppress files="[\\/]generated-sources[\\/]" checks="[a-zA-Z0-9]*" />


On Thu, Jul 9, 2015 at 8:04 PM, Benson Margulies <bi...@gmail.com>
wrote:

> Ever since we bumped to 2.15 of the plugin, we've been hitting a
> problem. I don't have a concise repro, so I'm not opening a JIRA yet,
> but I thought I'd inquire for other people's experience.
>
> We use some source generators, and none of them generate source that
> is acceptable to our checkstyle rules. To prevent checkstyle from
> processing that stuff, we bind the 'check' goal to the validate phase.
> Since this is before generate-sources, it comes and goes before the
> generator plugin(s) have a chance to register any additional source
> roots.
>
> The recent change afflicts only release builds. All is well until we
> run release:perform, and then the build fails because of checkstyle
> complaints on generated source.
>
> How is it that the release plugin causes the generated source roots to
> be visible to the plugin?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>