Skip to content

Commit

Permalink
MAILET-123 Upgrade maven-plugin-* & use annotation in Mailetdocs mojo
Browse files Browse the repository at this point in the history
  • Loading branch information
aduprat authored and Antoine Duprat committed Oct 25, 2016
1 parent 2caf9c0 commit b303bc2
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 27 deletions.
9 changes: 9 additions & 0 deletions mailet/mailetdocs-maven-plugin/pom.xml
Expand Up @@ -47,6 +47,11 @@
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
Expand All @@ -59,6 +64,10 @@
<groupId>org.apache.james</groupId>
<artifactId>apache-mailet-api</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
Expand Down
Expand Up @@ -27,6 +27,8 @@
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.Predicate;
import org.apache.maven.doxia.siterenderer.Renderer;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import org.apache.maven.reporting.AbstractMavenReport;
import org.apache.maven.reporting.MavenReportException;
Expand All @@ -42,25 +44,17 @@ public abstract class AbstractMailetdocsReport extends AbstractMavenReport {

/**
* Directory where reports will go.
*
* @parameter expression="${project.reporting.outputDirectory}"
* @required
* @readonly
*/
@Parameter(defaultValue = "${project.reporting.outputDirectory}",
required = true)
private String outputDirectory;

/**
* @parameter default-value="${project}"
* @required
* @readonly
*/
@Parameter(defaultValue = "${project}",
required = true,
readonly = true)
private MavenProject project;

/**
* @component
* @required
* @readonly
*/
@Component
private Renderer siteRenderer;

/**
Expand Down
Expand Up @@ -21,6 +21,9 @@

import java.util.List;

import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.project.MavenProject;


Expand All @@ -35,17 +38,14 @@
* <li>Should only used as a report.</li>
* <li>Mailets are instantiated during report production. </li>
* </ul>
* @goal aggregate
* @since 0.2
* @requiresDependencyResolution compile
* @aggregator
*/
@Mojo(name = "aggregate",
requiresDependencyResolution = ResolutionScope.COMPILE,
aggregator = true)
public class AggregateMailetdocsReport extends AbstractMailetdocsReport {

/**
* @parameter expression="${reactorProjects}"
* @readonly
*/
@Parameter(defaultValue = "${reactorProjects}",
readonly = true)
private List<MavenProject> reactorProjects;

/**
Expand Down
Expand Up @@ -21,6 +21,8 @@

import java.util.List;

import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.project.MavenProject;


Expand All @@ -31,10 +33,9 @@
* <li>Should only used as a report.</li>
* <li>Mailets are instantiated during report production. </li>
* </ul>
* @goal mailetdocs
* @since 0.1
* @requiresDependencyResolution compile
*/
@Mojo(name = "mailetdocs",
requiresDependencyResolution = ResolutionScope.COMPILE)
public class MailetdocsReport extends AbstractMailetdocsReport {

/**
Expand Down
8 changes: 7 additions & 1 deletion mailet/pom.xml
Expand Up @@ -50,7 +50,8 @@
<httpclient-osgi.version>4.5.1</httpclient-osgi.version>
<!-- maven-mailetdocs-plugin artifacts -->
<maven-artifact.version>3.0-alpha-1</maven-artifact.version>
<maven-plugin-api.version>3.0.4</maven-plugin-api.version>
<maven-plugin-annotations.version>3.4</maven-plugin-annotations.version>
<maven-plugin-api.version>3.2.5</maven-plugin-api.version>
<maven-reporting-impl.version>2.2</maven-reporting-impl.version>
<maven-reporting-api.version>3.0</maven-reporting-api.version>
<qdox.version>1.12.1</qdox.version>
Expand Down Expand Up @@ -110,6 +111,11 @@
<artifactId>maven-plugin-api</artifactId>
<version>${maven-plugin-api.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>${maven-plugin-annotations.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -724,7 +724,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.2</version>
<version>3.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down

0 comments on commit b303bc2

Please sign in to comment.