Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modulelist maven plugin refactoring #4887

Merged
merged 2 commits into from
Oct 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions tools/jersey-doc-modulelist-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.eclipse.ee4j</groupId>
<artifactId>project</artifactId>
<version>1.0.7</version>
</parent>

<groupId>org.glassfish.jersey.tools.plugins</groupId>
<artifactId>jersey-doc-modulelist-maven-plugin</artifactId>
<packaging>maven-plugin</packaging>
Expand Down Expand Up @@ -53,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 All @@ -74,6 +86,23 @@
<fork>false</fork>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
<executions>
<execution>
<id>default-descriptor</id>
<goals>
<goal>descriptor</goal>
</goals>
<phase>process-classes</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -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 @@ -41,10 +45,11 @@
* The plugins main MOJO class.
* Walks through the maven dependency tree and creates the docbook output file.
*
* @goal generate
* @phase process-sources
* @aggregator
* goal: generate
* 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
*/
@Parameter( defaultValue = "${session}", readonly = true )
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
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -20,14 +20,17 @@
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.
*
* @goal help
* @phase process-sources
* @aggregator
* goal: help
* phase: process-sources
* aggregator
*/
@Mojo(name = "help", aggregator = true, defaultPhase = LifecyclePhase.PROCESS_SOURCES)
public class HelpMojo extends AbstractMojo {

private Log log;
Expand Down