geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r384377 - in /geronimo/devtools/eclipse-plugin/trunk: geronimo-emf/pom.xml maven-plugins/maven-geronimodevtools-plugin/src/main/java/org/apache/geronimo/eclipse/devtools/ImportResourcesMojo.java
Date Wed, 08 Mar 2006 23:33:36 GMT
Author: sppatel
Date: Wed Mar  8 15:33:34 2006
New Revision: 384377

URL: http://svn.apache.org/viewcvs?rev=384377&view=rev
Log:
mojo fixes, add schemas and genmodel in target

Modified:
    geronimo/devtools/eclipse-plugin/trunk/geronimo-emf/pom.xml
    geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-geronimodevtools-plugin/src/main/java/org/apache/geronimo/eclipse/devtools/ImportResourcesMojo.java

Modified: geronimo/devtools/eclipse-plugin/trunk/geronimo-emf/pom.xml
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/geronimo-emf/pom.xml?rev=384377&r1=384376&r2=384377&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/geronimo-emf/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/geronimo-emf/pom.xml Wed Mar  8 15:33:34 2006
@@ -10,19 +10,36 @@
     <version>1.0</version>
   </parent>
   <build>
+    <resources>
+      <resource>
+        <targetPath>genmodels</targetPath>
+        <directory>genmodels</directory>
+        <includes>
+          <include>**/*.genmodel</include>
+        </includes>
+      </resource>
+      <!-- TODO REMOVE THIS ENTRY--> 
+      <resource>
+        <targetPath>genmodels</targetPath>
+        <directory>.</directory>
+        <includes>
+          <include>*.genmodel</include>
+        </includes>
+      </resource>
+    </resources>
     <plugins>
       <plugin>
         <groupId>org.apache.geronimo.devtools</groupId>
         <artifactId>maven-geronimodevtools-plugin</artifactId>
         <configuration>
-          <targetPath>schema</targetPath>
+          <target>${project.build.directory}/classes/schemas</target>
           <includes>
             <include>**/*.xsd</include>
           </includes>
         </configuration>
         <executions>
           <execution>
-            <phase>process-resources</phase>
+            <phase>generate-resources</phase>
             <goals>
               <goal>importresources</goal>
             </goals>

Modified: geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-geronimodevtools-plugin/src/main/java/org/apache/geronimo/eclipse/devtools/ImportResourcesMojo.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-geronimodevtools-plugin/src/main/java/org/apache/geronimo/eclipse/devtools/ImportResourcesMojo.java?rev=384377&r1=384376&r2=384377&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-geronimodevtools-plugin/src/main/java/org/apache/geronimo/eclipse/devtools/ImportResourcesMojo.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-geronimodevtools-plugin/src/main/java/org/apache/geronimo/eclipse/devtools/ImportResourcesMojo.java
Wed Mar  8 15:33:34 2006
@@ -47,7 +47,7 @@
 	 * @parameter
 	 * @required
 	 */
-	private String targetPath;
+	private File target;
 
 	/**
 	 * @parameter expression="true"
@@ -60,7 +60,6 @@
 	private String[] includes;
 
 	private File importDestination;
-	private File targetDestination;
 
 	/*
 	 * (non-Javadoc)
@@ -73,7 +72,11 @@
 		Iterator i = dependencies.iterator();
 
 		if (dependencies.size() > 0) {
-
+			
+			getLog().debug("ImportDestination: " + getImportDestination());
+			getLog().debug("TargetDestination: " + target);
+			getLog().debug("Flatten: " + flatten);
+			
 			while (i.hasNext()) {
 				Artifact artifact = (Artifact) i.next();
 				Expand expandTask = new Expand();
@@ -87,6 +90,9 @@
 					}
 					expandTask.addPatternset(set);
 				}
+				getLog().info("Importing specified resources from "
+						+ artifact.getGroupId() + ":"
+						+ artifact.getArtifactId());
 				expandTask.execute();
 			}
 
@@ -100,7 +106,7 @@
 	private void flatten() {
 		Move moveTask = new Move();
 		moveTask.setProject(new Project());
-		moveTask.setTodir(getTargetDestination());
+		moveTask.setTodir(target);
 		moveTask.setFlatten(true);
 
 		if (includes != null) {
@@ -127,17 +133,10 @@
 			String base = project.getBasedir().getAbsolutePath();
 			if (flatten) {
 				importDestination = new File(base + File.separator + "temp");
+			} else {
+				importDestination = target;
 			}
-			importDestination = getTargetDestination();
 		}
 		return importDestination;
-	}
-
-	private File getTargetDestination() {
-		if (targetDestination == null) {
-			String base = project.getBasedir().getAbsolutePath();
-			targetDestination = new File(base + File.separator + targetPath);
-		}
-		return targetDestination;
 	}
 }



Mime
View raw message