sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1389327 - in /sis/trunk: sis-build-helper/src/main/java/org/apache/sis/resources/ sis-utility/
Date Mon, 24 Sep 2012 12:21:00 GMT
Author: desruisseaux
Date: Mon Sep 24 12:21:00 2012
New Revision: 1389327

URL: http://svn.apache.org/viewvc?rev=1389327&view=rev
Log:
Compile the localized resources in the utility module at build time using our Maven mojo.

Modified:
    sis/trunk/sis-build-helper/src/main/java/org/apache/sis/resources/IndexedResourceCompiler.java
    sis/trunk/sis-build-helper/src/main/java/org/apache/sis/resources/ResourceCompilerException.java
    sis/trunk/sis-build-helper/src/main/java/org/apache/sis/resources/ResourceCompilerMojo.java
    sis/trunk/sis-utility/pom.xml

Modified: sis/trunk/sis-build-helper/src/main/java/org/apache/sis/resources/IndexedResourceCompiler.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-build-helper/src/main/java/org/apache/sis/resources/IndexedResourceCompiler.java?rev=1389327&r1=1389326&r2=1389327&view=diff
==============================================================================
--- sis/trunk/sis-build-helper/src/main/java/org/apache/sis/resources/IndexedResourceCompiler.java
(original)
+++ sis/trunk/sis-build-helper/src/main/java/org/apache/sis/resources/IndexedResourceCompiler.java
Mon Sep 24 12:21:00 2012
@@ -26,12 +26,16 @@ import java.util.regex.Pattern;
  * Reads a given list of {@code .properties} files and copies their content to {@code .utf}
files
  * using UTF-8 encoding. It also checks for key validity and checks values for {@link MessageFormat}
  * compatibility. Finally, it writes the key values in the Java source files.
+ * <p>
+ * This class is independent of any Mojo and could be executed from the command-line.
+ * For now we keep it package-private, but we could consider to enable execution from
+ * the command-line in a future version if this happen to be useful.
  *
  * @author Martin Desruisseaux (IRD, Geomatys)
  * @since   0.3 (derived from geotk-1.2)
  * @version 0.3
  */
-public class IndexedResourceCompiler implements FilenameFilter, Comparator<Object>
{
+class IndexedResourceCompiler implements FilenameFilter, Comparator<Object> {
     /**
      * Extension for java source files.
      */

Modified: sis/trunk/sis-build-helper/src/main/java/org/apache/sis/resources/ResourceCompilerException.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-build-helper/src/main/java/org/apache/sis/resources/ResourceCompilerException.java?rev=1389327&r1=1389326&r2=1389327&view=diff
==============================================================================
--- sis/trunk/sis-build-helper/src/main/java/org/apache/sis/resources/ResourceCompilerException.java
(original)
+++ sis/trunk/sis-build-helper/src/main/java/org/apache/sis/resources/ResourceCompilerException.java
Mon Sep 24 12:21:00 2012
@@ -20,7 +20,7 @@ import org.apache.maven.plugin.MojoExecu
 
 
 /**
- * Thrown when the {@link IndexedResourceCompiler} exit abnormally.
+ * Thrown when the {@link ResourceCompilerMojo} exit abnormally.
  *
  * @author Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-3.00)

Modified: sis/trunk/sis-build-helper/src/main/java/org/apache/sis/resources/ResourceCompilerMojo.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-build-helper/src/main/java/org/apache/sis/resources/ResourceCompilerMojo.java?rev=1389327&r1=1389326&r2=1389327&view=diff
==============================================================================
--- sis/trunk/sis-build-helper/src/main/java/org/apache/sis/resources/ResourceCompilerMojo.java
(original)
+++ sis/trunk/sis-build-helper/src/main/java/org/apache/sis/resources/ResourceCompilerMojo.java
Mon Sep 24 12:21:00 2012
@@ -30,7 +30,7 @@ import org.apache.maven.plugin.MojoExecu
  * @since   0.3 (derived from geotk-3.00)
  * @version 0.3
  *
- * @goal compile
+ * @goal compile-resources
  * @phase generate-resources
  */
 public class ResourceCompilerMojo extends AbstractMojo implements FilenameFilter {

Modified: sis/trunk/sis-utility/pom.xml
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/pom.xml?rev=1389327&r1=1389326&r2=1389327&view=diff
==============================================================================
--- sis/trunk/sis-utility/pom.xml (original)
+++ sis/trunk/sis-utility/pom.xml Mon Sep 24 12:21:00 2012
@@ -93,6 +93,27 @@ Miscellaneous utilities.
 
 
   <!-- ===========================================================
+           Compile properties files into resources UTF files
+       =========================================================== -->
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.sis</groupId>
+        <artifactId>sis-build-helper</artifactId>
+        <version>${project.version}</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>compile-resources</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+
+  <!-- ===========================================================
            Dependencies
        =========================================================== -->
   <dependencies>



Mime
View raw message