Quantcast

maven-plugin-plugin thinks there's no mojos when I use annotations

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

maven-plugin-plugin thinks there's no mojos when I use annotations

Benson Margulies
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-plugin-plugin:3.0:helpmojo
(generated-helpmojo) on project maven-shade-plugin: Error extracting
plugin descriptor: 'No mojo definitions were found for plugin:
org.apache.maven.plugins:maven-shade-plugin.' -> [Help 1]

even though I've got:

@Mojo(name = "shade", defaultPhase = LifecyclePhase.PACKAGE,
threadSafe = false, requiresDependencyResolution =
ResolutionScope.RUNTIME)


on the class.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: maven-plugin-plugin thinks there's no mojos when I use annotations

Tony Chemit
On Fri, 29 Jun 2012 19:58:53 -0400
Benson Margulies <[hidden email]> wrote:

> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-plugin-plugin:3.0:helpmojo
> (generated-helpmojo) on project maven-shade-plugin: Error extracting
> plugin descriptor: 'No mojo definitions were found for plugin:
> org.apache.maven.plugins:maven-shade-plugin.' -> [Help 1]
>
> even though I've got:
>
> @Mojo(name = "shade", defaultPhase = LifecyclePhase.PACKAGE,
> threadSafe = false, requiresDependencyResolution =
> ResolutionScope.RUNTIME)
>
>
> on the class.
Yes that's because the helpmojo is inovked at generate-sources phase, but descriptor is now invoked at process-classes (to process annotations).

to avoid your problem just add in the maven-plugin-plugin this configuration :

<configuration>
  <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>

see http://maven.apache.org/plugin-tools/maven-plugin-plugin/examples/using-annotations.html

>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



--
Tony Chemit
--------------------
tél: +33 (0) 2 40 50 29 28
email: [hidden email]
http://www.codelutin.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: maven-plugin-plugin thinks there's no mojos when I use annotations

Benson Margulies
THanks.


On Fri, Jun 29, 2012 at 8:04 PM, Tony Chemit <[hidden email]> wrote:

> On Fri, 29 Jun 2012 19:58:53 -0400
> Benson Margulies <[hidden email]> wrote:
>
>> [ERROR] Failed to execute goal
>> org.apache.maven.plugins:maven-plugin-plugin:3.0:helpmojo
>> (generated-helpmojo) on project maven-shade-plugin: Error extracting
>> plugin descriptor: 'No mojo definitions were found for plugin:
>> org.apache.maven.plugins:maven-shade-plugin.' -> [Help 1]
>>
>> even though I've got:
>>
>> @Mojo(name = "shade", defaultPhase = LifecyclePhase.PACKAGE,
>> threadSafe = false, requiresDependencyResolution =
>> ResolutionScope.RUNTIME)
>>
>>
>> on the class.
> Yes that's because the helpmojo is inovked at generate-sources phase, but descriptor is now invoked at process-classes (to process annotations).
>
> to avoid your problem just add in the maven-plugin-plugin this configuration :
>
> <configuration>
>  <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
> </configuration>
>
> see http://maven.apache.org/plugin-tools/maven-plugin-plugin/examples/using-annotations.html
>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
>
>
> --
> Tony Chemit
> --------------------
> tél: +33 (0) 2 40 50 29 28
> email: [hidden email]
> http://www.codelutin.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...