Author: rfscholte
Date: Fri Jul 14 21:38:11 2017
New Revision: 1801993

URL: http://svn.apache.org/viewvc?rev=1801993&view=rev
Log:
[MJAVADOC-456] Upgrade to Maven3 plugin
make use of requiresDependencyResolution to get artifacts

Modified:
    
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
    
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/TestJavadocJar.java
    
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/TestJavadocReport.java

Modified: 
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java?rev=1801993&r1=1801992&r2=1801993&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
 (original)
+++ 
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
 Fri Jul 14 21:38:11 2017
@@ -1814,17 +1814,6 @@ public abstract class AbstractJavadocMoj
     }
 
     /**
-     * @param p not null maven project
-     * @return the list of artifacts for the given project
-     */
-    protected List<Artifact> getProjectArtifacts( MavenProject p )
-    {
-        return ( p.getCompileArtifacts() == null
-            ? Collections.<Artifact>emptyList()
-            : new LinkedList<Artifact>( p.getCompileArtifacts() ) );
-    }
-
-    /**
      * @return the current javadoc directory
      */
     protected File getJavadocDirectory()
@@ -2554,7 +2543,7 @@ public abstract class AbstractJavadocMoj
             classpathElements.addAll( getProjectBuildOutputDirs( project ) );
         }
         
-        populateCompileArtifactMap( compileArtifactMap, getProjectArtifacts( 
project ) );
+        populateCompileArtifactMap( compileArtifactMap, project.getArtifacts() 
);
 
         if ( isAggregator() && project.isExecutionRoot() )
         {

Modified: 
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/TestJavadocJar.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/TestJavadocJar.java?rev=1801993&r1=1801992&r2=1801993&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/TestJavadocJar.java
 (original)
+++ 
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/TestJavadocJar.java
 Fri Jul 14 21:38:11 2017
@@ -199,12 +199,6 @@ public class TestJavadocJar
     }
 
     @Override
-    protected List<Artifact> getProjectArtifacts( MavenProject p )
-    {
-        return p.getTestArtifacts();
-    }
-
-    @Override
     protected ScopeFilter getDependencyScopeFilter()
     {
         return ScopeFilter.including( Artifact.SCOPE_COMPILE, 
Artifact.SCOPE_PROVIDED, Artifact.SCOPE_SYSTEM,

Modified: 
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/TestJavadocReport.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/TestJavadocReport.java?rev=1801993&r1=1801992&r2=1801993&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/TestJavadocReport.java
 (original)
+++ 
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/TestJavadocReport.java
 Fri Jul 14 21:38:11 2017
@@ -279,13 +279,6 @@ public class TestJavadocReport
     }
 
     @Override
-    protected List<Artifact> getProjectArtifacts( MavenProject p )
-    {
-        return ( p.getTestArtifacts() == null ? 
Collections.<Artifact>emptyList()
-                        : new LinkedList<Artifact>( p.getTestArtifacts() ) );
-    }
-
-    @Override
     protected File getJavadocDirectory()
     {
         return testJavadocDirectory;


Reply via email to