sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattm...@apache.org
Subject svn commit: r1519284 - in /sis/trunk: ./ core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ core/sis-build-helper/src/main/resources/META-INF/ core/sis-build-helper/src/main/resources/META-INF/m2e/
Date Sun, 01 Sep 2013 15:24:36 GMT
Author: mattmann
Date: Sun Sep  1 15:24:36 2013
New Revision: 1519284

URL: http://svn.apache.org/r1519284
Log:
Fix for SIS-132 Better support for eclipse IDE contributed by Olivier NOUGUIER.

Added:
    sis/trunk/core/sis-build-helper/src/main/resources/META-INF/
    sis/trunk/core/sis-build-helper/src/main/resources/META-INF/m2e/
    sis/trunk/core/sis-build-helper/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml
Modified:
    sis/trunk/CHANGES
    sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerMojo.java

Modified: sis/trunk/CHANGES
URL: http://svn.apache.org/viewvc/sis/trunk/CHANGES?rev=1519284&r1=1519283&r2=1519284&view=diff
==============================================================================
--- sis/trunk/CHANGES (original)
+++ sis/trunk/CHANGES Sun Sep  1 15:24:36 2013
@@ -1,5 +1,8 @@
 Apache SIS Change Log
 ======================
+Release 0.4 - Current Development
+
+* SIS-132 Better support for eclipse IDE (mattmann)
 
 Release 0.3 - 06/29/2013
 

Modified: sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerMojo.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerMojo.java?rev=1519284&r1=1519283&r2=1519284&view=diff
==============================================================================
--- sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerMojo.java
[UTF-8] (original)
+++ sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerMojo.java
[UTF-8] Sun Sep  1 15:24:36 2013
@@ -19,8 +19,11 @@ package org.apache.sis.util.resources;
 import java.io.File;
 import java.io.FilenameFilter;
 import java.util.List;
+
+import org.apache.maven.model.Resource;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.project.MavenProject;
 
 
 /**
@@ -37,6 +40,13 @@ import org.apache.maven.plugin.MojoExecu
  * @phase generate-resources
  */
 public class ResourceCompilerMojo extends AbstractMojo implements FilenameFilter {
+	
+	/**
+     * @parameter expression="${project}"
+     * @required
+     * @readonly
+     */
+	private MavenProject project;
     /**
      * The source directories containing the sources to be compiled.
      *
@@ -49,21 +59,18 @@ public class ResourceCompilerMojo extend
     /**
      * Directory containing the generated class files.
      *
-     * @parameter property="project.build.outputDirectory"
+     * @parameter default-value="${project.build.directory}/generated-resources/sis"
      * @required
      */
-    private String outputDirectory;
+    private File outputDirectory;
 
     /**
      * The <code>compileSourceRoots</code> named "java" as a <code>File</code>.
      */
     private File javaDirectoryFile;
 
-    /**
-     * The <code>outputDirectory</code> as a <code>File</code>.
-     */
-    private File outputDirectoryFile;
-
+        
+    
     /**
      * Executes the mojo.
      *
@@ -72,8 +79,12 @@ public class ResourceCompilerMojo extend
     @Override
     @SuppressWarnings({"unchecked","rawtypes"}) // Generic array creation.
     public void execute() throws MojoExecutionException {
+    	Resource resource = new Resource();
+    	resource.setDirectory(outputDirectory.getPath());
+    	project.addResource( resource );
+//    	project.addCompileSourceRoot(outputDirectory.getPath());
+        
         int errors = 0;
-        outputDirectoryFile = new File(outputDirectory);
         for (final String sourceDirectory : compileSourceRoots) {
             final File directory = new File(sourceDirectory);
             if (directory.getName().equals("java")) {
@@ -134,7 +145,7 @@ public class ResourceCompilerMojo extend
      */
     private final class Compiler extends IndexedResourceCompiler {
         public Compiler(File[] resourcesToProcess) {
-            super(javaDirectoryFile, outputDirectoryFile, resourcesToProcess);
+            super(javaDirectoryFile, outputDirectory, resourcesToProcess);
         }
 
         /**

Added: sis/trunk/core/sis-build-helper/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-build-helper/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml?rev=1519284&view=auto
==============================================================================
--- sis/trunk/core/sis-build-helper/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml
(added)
+++ sis/trunk/core/sis-build-helper/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml
Sun Sep  1 15:24:36 2013
@@ -0,0 +1,17 @@
+<lifecycleMappingMetadata>
+  <pluginExecutions>
+    <pluginExecution>
+      <pluginExecutionFilter>
+        <goals>
+          <goal>compile-resources</goal>
+        </goals>
+      </pluginExecutionFilter>
+      <action>
+        <execute>
+          <runOnIncremental>true</runOnIncremental>
+          <runOnConfiguration>true</runOnConfiguration>
+        </execute>
+      </action>
+    </pluginExecution>
+  </pluginExecutions>
+</lifecycleMappingMetadata>
\ No newline at end of file



Mime
View raw message