maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fgi...@apache.org
Subject svn commit: r360591 - /maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/PmdReport.java
Date Sun, 01 Jan 2006 23:22:51 GMT
Author: fgiust
Date: Sun Jan  1 15:22:47 2006
New Revision: 360591

URL: http://svn.apache.org/viewcvs?rev=360591&view=rev
Log:
don't add report for non-java projects

Modified:
    maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/PmdReport.java

Modified: maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/PmdReport.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/PmdReport.java?rev=360591&r1=360590&r2=360591&view=diff
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/PmdReport.java
(original)
+++ maven/plugins/trunk/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/PmdReport.java
Sun Jan  1 15:22:47 2006
@@ -25,6 +25,8 @@
 import net.sourceforge.pmd.TargetJDK1_3;
 import net.sourceforge.pmd.TargetJDK1_4;
 import net.sourceforge.pmd.TargetJDK1_5;
+
+import org.apache.maven.artifact.handler.ArtifactHandler;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.reporting.AbstractMavenReport;
 import org.apache.maven.reporting.MavenReportException;
@@ -263,5 +265,14 @@
     private static ResourceBundle getBundle( Locale locale )
     {
         return ResourceBundle.getBundle( "pmd-report", locale, PmdReport.class.getClassLoader()
);
+    }
+
+    /**
+     * @see org.apache.maven.reporting.AbstractMavenReport#canGenerateReport()
+     */
+    public boolean canGenerateReport()
+    {
+        ArtifactHandler artifactHandler = project.getArtifact().getArtifactHandler();
+        return ( "java".equals( artifactHandler.getLanguage() ) );
     }
 }



Mime
View raw message