Author: fgiust Date: Fri Dec 30 11:26:01 2005 New Revision: 360150 URL: http://svn.apache.org/viewcvs?rev=360150&view=rev Log: MCHECKSTYLE-25 don't throw errors if the plugin is not run as a report and a source folder doesn't exist
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java?rev=360150&r1=360149&r2=360150&view=diff ============================================================================== --- maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java (original) +++ maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java Fri Dec 30 11:26:01 2005 @@ -441,8 +441,8 @@ if ( !canGenerateReport() ) { - // TODO: failure if not a report - throw new MavenReportException( "No source directory to process for checkstyle" ); + getLog().info( "Source directory does not exist - skipping report." ); + return; } // for when we start using maven-shared-io and maven-shared-monitor... @@ -936,6 +936,6 @@ public boolean canGenerateReport() { // TODO: would be good to scan the files here - return super.canGenerateReport() && sourceDirectory.exists(); + return sourceDirectory.exists(); } }