Skip to content

Commit

Permalink
Adding annotations to plugin definitions
Browse files Browse the repository at this point in the history
Signed-off-by: Maxim Nesen <maxim.nesen@oracle.com>
  • Loading branch information
senivam committed Oct 7, 2021
1 parent 9df14df commit fdd65e3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/jersey-doc-modulelist-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@
<artifactId>maven-dependency-tree</artifactId>
<version>${maven.shared.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.6.1</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;

import java.io.BufferedReader;
Expand All @@ -45,6 +49,7 @@
* phase: process-sources
* aggregator
*/
@Mojo(name = "generate", aggregator = true, defaultPhase = LifecyclePhase.PROCESS_SOURCES)
public class GenerateJerseyModuleListMojo extends AbstractMojo {

/**
Expand Down Expand Up @@ -82,18 +87,21 @@ public class GenerateJerseyModuleListMojo extends AbstractMojo {
* @required
* @readonly
*/
@Parameter(defaultValue = "${project.basedir}")
private MavenProject mavenProject;

/**
* @component
* @required
* @readonly
*/
@Component
private MavenSession mavenSession;

/**
* @parameter default-value="modules.xml"
*/
@Parameter(defaultValue = "modules.xml")
private String outputFileName;

/**
Expand All @@ -103,6 +111,7 @@ public class GenerateJerseyModuleListMojo extends AbstractMojo {
*
* @parameter
*/
@Parameter
private String templateFileName;

/**
Expand All @@ -112,6 +121,7 @@ public class GenerateJerseyModuleListMojo extends AbstractMojo {
*
* @parameter
*/
@Parameter
private String tableHeaderFileName;

/**
Expand All @@ -120,6 +130,7 @@ public class GenerateJerseyModuleListMojo extends AbstractMojo {
*
* @parameter
*/
@Parameter
private String tableFooterFileName;

/**
Expand All @@ -129,11 +140,13 @@ public class GenerateJerseyModuleListMojo extends AbstractMojo {
*
* @parameter
*/
@Parameter
private String tableRowFileName;

/**
* @parameter default-value="false"
*/
@Parameter(defaultValue = "false")
private boolean outputUnmatched;

private Configuration configuration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;

/**
* Displays the plugin help message.
Expand All @@ -28,6 +30,7 @@
* phase: process-sources
* aggregator
*/
@Mojo(name = "help", aggregator = true, defaultPhase = LifecyclePhase.PROCESS_SOURCES)
public class HelpMojo extends AbstractMojo {

private Log log;
Expand Down

0 comments on commit fdd65e3

Please sign in to comment.