[MPLUGIN-238] avoid HelpMojo failure when using java-annotations without any configuration
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1599050 13f79535-47bb-0310-9956-ffa450edef68master
parent
660e74e052
commit
bb948bfbc8
|
|
@ -46,6 +46,12 @@ under the License.
|
|||
<artifactId>plexus-utils</artifactId>
|
||||
<version>3.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||
<artifactId>maven-plugin-annotations</artifactId>
|
||||
<version>@project.version@</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
@ -64,6 +70,10 @@ under the License.
|
|||
<artifactId>maven-plugin-plugin</artifactId>
|
||||
<version>@project.version@</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-descriptor</id>
|
||||
<phase>process-classes</phase>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>help-goal</id>
|
||||
<goals>
|
||||
|
|
|
|||
|
|
@ -20,15 +20,17 @@ package test;
|
|||
*/
|
||||
|
||||
import org.apache.maven.plugin.AbstractMojo;
|
||||
import org.apache.maven.plugins.annotations.Mojo;
|
||||
import org.apache.maven.plugins.annotations.Parameter;
|
||||
|
||||
/**
|
||||
* MOJO-DESCRIPTION. Some "quotation" marks and backslashes '\\', some <strong>important</strong> javadoc<br> and an
|
||||
* inline link to {@link test.AnotherMojo}.
|
||||
*
|
||||
* @goal test
|
||||
* @deprecated As of 1.0, use the "quoted" goal instead.
|
||||
* @since 2.1
|
||||
*/
|
||||
@Mojo( name= "test" )
|
||||
public class MyMojo
|
||||
extends AbstractMojo
|
||||
{
|
||||
|
|
@ -37,31 +39,26 @@ public class MyMojo
|
|||
* This parameter uses "quotation" marks and backslashes '\\' in its description. Those characters <em>must</em> be
|
||||
* escaped in Java string literals.
|
||||
*
|
||||
* @parameter default-value="escape\\backslash"
|
||||
* @since 2.0
|
||||
*/
|
||||
@Parameter( defaultValue = "escape\\backslash" )
|
||||
private String defaultParam;
|
||||
|
||||
/**
|
||||
* This parameter is deprecated.
|
||||
*
|
||||
* @parameter
|
||||
* @deprecated As of version 1.0, use the {@link #defaultParam} instead.
|
||||
*/
|
||||
@Parameter
|
||||
private String deprecatedParam;
|
||||
|
||||
/**
|
||||
* @parameter expression="${test.undocumented}"
|
||||
* @required
|
||||
*/
|
||||
@Parameter( property = "test.undocumented", required = true )
|
||||
private String undocumentedParam;
|
||||
|
||||
/**
|
||||
* Readonly parameter: should not be proposed for configuration.
|
||||
*
|
||||
* @parameter default-value="not for configuration"
|
||||
* @readonly
|
||||
*/
|
||||
@Parameter( defaultValue = "not for configuration", readonly = true )
|
||||
private String readonly;
|
||||
|
||||
public void execute()
|
||||
|
|
|
|||
|
|
@ -85,6 +85,9 @@ public class HelpGeneratorMojo
|
|||
public void execute()
|
||||
throws MojoExecutionException
|
||||
{
|
||||
// force value for this plugin
|
||||
skipErrorNoDescriptorsFound = true;
|
||||
|
||||
super.execute();
|
||||
|
||||
if ( !project.getCompileSourceRoots().contains( outputDirectory.getAbsolutePath() ) && !skip )
|
||||
|
|
|
|||
Loading…
Reference in New Issue