sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1519809 - /sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerMojo.java
Date Tue, 03 Sep 2013 19:44:30 GMT
Author: desruisseaux
Date: Tue Sep  3 19:44:30 2013
New Revision: 1519809

URL: http://svn.apache.org/r1519809
Log:
Bug fix in Eclipse integration (patch by Olivier Nouguier).

Modified:
    sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerMojo.java

Modified: sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerMojo.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerMojo.java?rev=1519809&r1=1519808&r2=1519809&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerMojo.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerMojo.java
[UTF-8] Tue Sep  3 19:44:30 2013
@@ -44,6 +44,11 @@ import org.sonatype.plexus.build.increme
  */
 public class ResourceCompilerMojo extends AbstractMojo implements FilenameFilter {
     /**
+     * Pattern to filter properties files that were modified.
+     */
+    private static final String[] PROPERTIES_PATTERN = new String[] {"**/*.properties"};
+
+    /**
      * Project information (name, version, URL).
      *
      * @parameter property="project"
@@ -113,17 +118,18 @@ public class ResourceCompilerMojo extend
                  * been modified. This is okay for now since changes in resource files are
rare and compiling
                  * them is very fast.
                  */
-                if (!isIncremental) {
+                if (isIncremental) {
                     Scanner scanner = buildContext.newScanner(directory);
-                    scanner.setIncludes(new String[] {"*.properties"});
+                    scanner.setIncludes(PROPERTIES_PATTERN);
                     scanner.scan();
-                    if (scanner.getIncludedFiles() == null) {
+                    final String[] includedFiles = scanner.getIncludedFiles();
+                    if (includedFiles == null || includedFiles.length == 0) {
                         continue;
                     }
                 }
                 javaDirectoryFile = directory;
                 errors += processAllResourceDirectories(directory);
-                buildContext.refresh(directory);
+                buildContext.refresh(outputDirectory);
             }
         }
         if (errors != 0) {



Mime
View raw message