You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2010/02/17 23:56:45 UTC

svn commit: r911212 - in /maven/plugins/trunk/maven-checkstyle-plugin/src: it/multi-modules/ it/multi-modules/multi-modules-child/src/main/java/org/apache/maven/plugins/checkstyle/its/ it/multimoduleproject/ main/java/org/apache/maven/plugin/checkstyle/

Author: olamy
Date: Wed Feb 17 22:56:44 2010
New Revision: 911212

URL: http://svn.apache.org/viewvc?rev=911212&view=rev
Log:
[MCHECKSTYLE-130] multimodule project requires src/main/java after 2.5 update

Modified:
    maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules/invoker.properties
    maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules/multi-modules-child/src/main/java/org/apache/maven/plugins/checkstyle/its/App.java
    maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules/pom.xml
    maven/plugins/trunk/maven-checkstyle-plugin/src/it/multimoduleproject/invoker.properties
    maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/DefaultCheckstyleExecutor.java

Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules/invoker.properties?rev=911212&r1=911211&r2=911212&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules/invoker.properties (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules/invoker.properties Wed Feb 17 22:56:44 2010
@@ -1 +1 @@
-invoker.goals=clean checkstyle:checkstyle
+invoker.goals=clean checkstyle:checkstyle checkstyle:check

Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules/multi-modules-child/src/main/java/org/apache/maven/plugins/checkstyle/its/App.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules/multi-modules-child/src/main/java/org/apache/maven/plugins/checkstyle/its/App.java?rev=911212&r1=911211&r2=911212&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules/multi-modules-child/src/main/java/org/apache/maven/plugins/checkstyle/its/App.java (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules/multi-modules-child/src/main/java/org/apache/maven/plugins/checkstyle/its/App.java Wed Feb 17 22:56:44 2010
@@ -1,5 +1,24 @@
 package org.apache.maven.plugins.checkstyle.its;
 
+/*
+ * 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.
+ */
+
 /**
  * Hello world!
  *

Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules/pom.xml?rev=911212&r1=911211&r2=911212&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules/pom.xml (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/multi-modules/pom.xml Wed Feb 17 22:56:44 2010
@@ -38,6 +38,10 @@
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-checkstyle-plugin</artifactId>
           <version>@pom.version@</version>
+          <configuration>
+            <configLocation>http://svn.apache.org/repos/asf/maven/plugins/tags/maven-checkstyle-plugin-2.5/src/main/resources/config/maven_checks.xml</configLocation>
+            <headerLocation>http://svn.apache.org/repos/asf/maven/plugins/tags/maven-checkstyle-plugin-2.5/src/main/resources/config/maven-header.txt</headerLocation>
+          </configuration>            
         </plugin>      
       </plugins>
     </pluginManagement>
@@ -61,6 +65,9 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
         <version>@pom.version@</version>
+        <configuration>
+          <configLocation>http://svn.apache.org/repos/asf/maven/plugins/tags/maven-checkstyle-plugin-2.5/src/main/resources/config/maven_checks.xml</configLocation>
+        </configuration>        
       </plugin>
     </plugins>
   </reporting>

Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/it/multimoduleproject/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/multimoduleproject/invoker.properties?rev=911212&r1=911211&r2=911212&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/it/multimoduleproject/invoker.properties (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/multimoduleproject/invoker.properties Wed Feb 17 22:56:44 2010
@@ -1 +1 @@
-invoker.goals=clean checkstyle:checkstyle
+invoker.goals=clean checkstyle:checkstyle checkstyle:check

Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/DefaultCheckstyleExecutor.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/DefaultCheckstyleExecutor.java?rev=911212&r1=911211&r2=911212&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/DefaultCheckstyleExecutor.java (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/DefaultCheckstyleExecutor.java Wed Feb 17 22:56:44 2010
@@ -404,6 +404,11 @@
             excludesStr.append( defaultExcludes[i] );
         }
 
+        if (request.getSourceDirectory() == null || !request.getSourceDirectory().exists())
+        {
+            return EMPTY_FILE_ARRAY;
+        }
+        
         List files = FileUtils.getFiles( request.getSourceDirectory(), request.getIncludes(), excludesStr.toString() );
         if ( request.isIncludeTestSourceDirectory() && ( request.getTestSourceDirectory() != null )
             && ( request.getTestSourceDirectory().exists() ) && ( request.getTestSourceDirectory().isDirectory() ) )