This is an automated email from the ASF dual-hosted git repository.

olamy pushed a commit to branch 
MJAVADOC-613-exclude_skipped_modules_from_aggregate
in repository https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git

commit 44e759faa241fd4fe3baf6278b18b76d3ae388b4
Author: olivier lamy <ol...@apache.org>
AuthorDate: Fri Feb 7 19:11:06 2020 +1000

    fix regression
    
    Signed-off-by: olivier lamy <ol...@apache.org>
---
 src/it/projects/MJAVADOC-320/verify.bsh            | 80 ----------------------
 .../maven/plugins/javadoc/AbstractJavadocMojo.java | 36 +---------
 2 files changed, 1 insertion(+), 115 deletions(-)

diff --git a/src/it/projects/MJAVADOC-320/verify.bsh 
b/src/it/projects/MJAVADOC-320/verify.bsh
deleted file mode 100644
index 8274de9..0000000
--- a/src/it/projects/MJAVADOC-320/verify.bsh
+++ /dev/null
@@ -1,80 +0,0 @@
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.*;
-
-boolean result = true;
-
-try
-{
-    File target = new File( basedir, "module2/target" );
-    if ( !target.exists() || !target.isDirectory() )
-    {
-        System.err.println( "module2/target file is missing or not a 
directory." );
-        return false;
-    }
-
-    File apidocs = new File( target, "apidocs" );
-    if ( !apidocs.exists() || !apidocs.isDirectory() )
-    {
-        System.err.println( "module2/target/apidocs file is missing or not a 
directory." );
-        return false;
-    }
-
-    // module3 must be included
-    File module3File = new File( apidocs, 
"org/apache/maven/plugin/javadoc/it/Module3Class.html" );
-    if ( !module3File.isFile() )
-    {
-        System.err.println( 
"module2/target/apidocs/org/apache/maven/plugin/javadoc/it/Module3Class.html 
file is missing or not a file." );
-        return false;
-    }
-
-    // el-api must be included
-    File elApiFile = new File( apidocs, "javax/el/ValueExpression.html" );
-    if ( !elApiFile.isFile() )
-    {
-        System.err.println( 
"module2/target/apidocs/javax/el/ValueExpression.html file is missing or not a 
file." );
-        return false;
-    }
-
-    // module1 must NOT be included
-    File module1File = new File( apidocs, 
"org/apache/maven/plugin/javadoc/it/Module1Class.html" );
-    if ( module1File.isFile() )
-    {
-        System.err.println( 
"module2/target/apidocs/org/apache/maven/plugin/javadoc/it/Module1Class.html 
file exists, but should not." );
-        return false;
-    }
-
-    // servlet-api must NOT be included
-    File servletSpecFile = new File( apidocs, 
"javax/servlet/ServletContext.html" );
-    if ( servletSpecFile.isFile() )
-    {
-        System.err.println( 
"module2/target/apidocs/javax/servlet/ServletContext.html file exists, but 
should not." );
-        return false;
-    }
-
-}
-catch( IOException e )
-{
-    e.printStackTrace();
-    result = false;
-}
-
-return result;
diff --git 
a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java 
b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
index d2173e2..07981ab 100644
--- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
+++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
@@ -2512,7 +2512,7 @@ public abstract class AbstractJavadocMojo
         return configureDependencySourceResolution( new SourceResolverConfig( 
project,
                                                   getProjectBuildingRequest( 
project ),
                                                   sourceDependencyCacheDir )
-                                                  .withReactorProjects( 
getAggregatedProjects() ) )
+                                                  .withReactorProjects( 
this.reactorProjects ) )
                                                   .withFilter( new AndFilter( 
andFilters ) );
         
     }
@@ -6826,7 +6826,6 @@ public abstract class AbstractJavadocMojo
 
     protected boolean isSkippedJavadoc( MavenProject mavenProject )
     {
-        getLog().debug( "isSkippedJavadoc " + mavenProject );
         String property = mavenProject.getProperties().getProperty( 
"maven.javadoc.skip" );
         if ( property != null )
         {
@@ -6835,7 +6834,6 @@ public abstract class AbstractJavadocMojo
             return skip;
         }
         final String pluginId = 
"org.apache.maven.plugins:maven-javadoc-plugin";
-        //final String pluginId = 
"org.apache.maven.plugins:maven-javadoc-plugin";
         property = getPluginParameter( mavenProject, pluginId, "skip" );
         if ( property != null )
         {
@@ -6849,38 +6847,6 @@ public abstract class AbstractJavadocMojo
         }
         getLog().debug( "isSkippedJavadoc " + mavenProject + " " + false );
         return false;
-
-//        Plugin javadocPlugin = getPlugin( project, pluginId );
-//        if ( javadocPlugin == null )
-//        {
-//            if ( mavenProject.getParent() != null )
-//            {
-//                return isSkippedJavadoc( mavenProject.getParent() );
-//            }
-//            getLog().debug( "isSkippedJavadoc " + mavenProject + " false" );
-//            return false;
-//        }
-//        Xpp3Dom configuration = (Xpp3Dom) javadocPlugin.getConfiguration();
-//        if ( configuration == null )
-//        {
-//            if ( mavenProject.getParent() != null )
-//            {
-//                return isSkippedJavadoc( mavenProject.getParent() );
-//            }
-//            getLog().debug( "isSkippedJavadoc " + mavenProject + " false" );
-//            return false;
-//        }
-//        Xpp3Dom skipNode = configuration.getChild( "skip" );
-//        if ( skipNode != null )
-//        {
-//            return BooleanUtils.toBoolean( skipNode.getValue() );
-//        }
-//        if ( mavenProject.getParent() != null )
-//        {
-//            return isSkippedJavadoc( mavenProject.getParent() );
-//        }
-//        getLog().debug( "isSkippedJavadoc " + mavenProject + " false" );
-//        return false;
     }
 
 }

Reply via email to