xmvn/0002-Disable-doclint-in-javadoc-aggregate-MOJO-executions.patch

46 lines
1.8 KiB
Diff
Raw Normal View History

From 0f2c0581f4a22a1ec60b1926e07d6baddb22d4bc Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Thu, 16 Apr 2015 10:18:25 +0200
Subject: [PATCH 2/2] Disable doclint in javadoc:aggregate MOJO executions
---
.../xmvn/connector/aether/XMvnMojoExecutionListener.java | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMojoExecutionListener.java b/xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMojoExecutionListener.java
index 8e3f3f8..7265d36 100644
--- a/xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMojoExecutionListener.java
+++ b/xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMojoExecutionListener.java
@@ -33,6 +33,8 @@ import org.apache.maven.plugin.Mojo;
import org.apache.maven.plugin.MojoExecution;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.project.MavenProject;
+import org.eclipse.sisu.bean.BeanProperties;
+import org.eclipse.sisu.bean.BeanProperty;
/**
* Listens to various MOJO executions and captures useful information.
@@ -191,7 +193,18 @@ public class XMvnMojoExecutionListener
@Override
public void beforeMojoExecution( MojoExecutionEvent event )
{
- // Nothing to do
+ Mojo mojo = event.getMojo();
+ MojoExecution execution = event.getExecution();
+
+ // Disable doclint
+ if ( JAVADOC_AGGREGATE.equals( execution ) )
+ {
+ for ( BeanProperty<Object> property : new BeanProperties( mojo.getClass() ) )
+ {
+ if ( property.getName().equals( "additionalparam" ) )
+ property.set( mojo, "-Xdoclint:none" );
+ }
+ }
}
@Override
--
2.1.0