maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1336288 - /maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java
Date Wed, 09 May 2012 16:43:11 GMT
Author: olamy
Date: Wed May  9 16:43:10 2012
New Revision: 1336288

URL: http://svn.apache.org/viewvc?rev=1336288&view=rev
Log:
add the directory only if exists

Modified:
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java

Modified: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java?rev=1336288&r1=1336287&r2=1336288&view=diff
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java
(original)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java
Wed May  9 16:43:10 2012
@@ -262,7 +262,7 @@ public class JavaAnnotationsMojoDescript
         return discoverClasses( request.getEncoding(), request.getProject() );
     }
 
-    protected Map<String, JavaClass> discoverClasses( final String encoding, MavenProject
project )
+    protected Map<String, JavaClass> discoverClasses( final String encoding, final
MavenProject project )
     {
         JavaDocBuilder builder = new JavaDocBuilder();
         builder.setEncoding( encoding );
@@ -274,7 +274,8 @@ public class JavaAnnotationsMojoDescript
 
         // TODO be more dynamic
         File generatedPlugin = new File( project.getBasedir(), "target/generated-sources/plugin"
);
-        if ( !project.getCompileSourceRoots().contains( generatedPlugin.getAbsolutePath()
) )
+        if ( !project.getCompileSourceRoots().contains( generatedPlugin.getAbsolutePath()
)
+            && generatedPlugin.exists() )
         {
             builder.addSourceTree( generatedPlugin );
         }



Mime
View raw message