servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r400091 - in /incubator/servicemix/trunk/tooling: maven2-eclipse-plugin-plugin/ maven2-eclipse-plugin-plugin/src/main/java/org/apache/servicemix/maven/plugin/ servicemix-packaging-descriptors/ servicemix-packaging-eclipse-plugin/ servicemix...
Date Fri, 05 May 2006 15:22:43 GMT
Author: gnodet
Date: Fri May  5 08:22:40 2006
New Revision: 400091

URL: http://svn.apache.org/viewcvs?rev=400091&view=rev
Log:
Fix m2 build for eclipse plugins

Added:
    incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/resources/plugin.xml
      - copied unchanged from r400008, incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/plugin.xml
    incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/src/main/resources/settings.xml
      - copied unchanged from r400008, incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/settings.xml
Removed:
    incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/build.properties
    incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/plugin.xml
    incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/settings.xml
Modified:
    incubator/servicemix/trunk/tooling/maven2-eclipse-plugin-plugin/pom.xml
    incubator/servicemix/trunk/tooling/maven2-eclipse-plugin-plugin/src/main/java/org/apache/servicemix/maven/plugin/EclipsePluginMojo.java
    incubator/servicemix/trunk/tooling/servicemix-packaging-descriptors/pom.xml
    incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/pom.xml

Modified: incubator/servicemix/trunk/tooling/maven2-eclipse-plugin-plugin/pom.xml
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/tooling/maven2-eclipse-plugin-plugin/pom.xml?rev=400091&r1=400090&r2=400091&view=diff
==============================================================================
--- incubator/servicemix/trunk/tooling/maven2-eclipse-plugin-plugin/pom.xml (original)
+++ incubator/servicemix/trunk/tooling/maven2-eclipse-plugin-plugin/pom.xml Fri May  5 08:22:40
2006
@@ -21,14 +21,15 @@
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xmlns="http://maven.apache.org/POM/4.0.0">
 
+	<modelVersion>4.0.0</modelVersion>
+
 	<parent>
-		<groupId>incubator-servicemix</groupId>
+		<groupId>org.apache.servicemix</groupId>
 		<artifactId>servicemix</artifactId>
 		<version>3.0-SNAPSHOT</version>
 		<relativePath>../../pom.xml</relativePath>
 	</parent>
 
-	<modelVersion>4.0.0</modelVersion>
 	<groupId>org.apache.servicemix.plugins</groupId>
 	<artifactId>maven2-eclipse-plugin-plugin</artifactId>
 	<packaging>maven-plugin</packaging>

Modified: incubator/servicemix/trunk/tooling/maven2-eclipse-plugin-plugin/src/main/java/org/apache/servicemix/maven/plugin/EclipsePluginMojo.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/tooling/maven2-eclipse-plugin-plugin/src/main/java/org/apache/servicemix/maven/plugin/EclipsePluginMojo.java?rev=400091&r1=400090&r2=400091&view=diff
==============================================================================
--- incubator/servicemix/trunk/tooling/maven2-eclipse-plugin-plugin/src/main/java/org/apache/servicemix/maven/plugin/EclipsePluginMojo.java
(original)
+++ incubator/servicemix/trunk/tooling/maven2-eclipse-plugin-plugin/src/main/java/org/apache/servicemix/maven/plugin/EclipsePluginMojo.java
Fri May  5 08:22:40 2006
@@ -24,6 +24,7 @@
 import java.util.List;
 import java.util.Set;
 
+import org.apache.maven.model.Resource;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
 import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
@@ -64,9 +65,9 @@
 	/**
 	 * Directory where the plugin.xml file will be auto-generated.
 	 * 
-	 * @parameter expression="${project.build.directory}"
+	 * @parameter expression="${project.build.directory}/eclipse"
 	 */
-	private String projectBuildDirectory;
+	private File outputDir;
 
 	/**
 	 * The maven project.
@@ -82,12 +83,9 @@
 
 		try {
 
-			File metaInfDir = new File(project.getBasedir().getAbsolutePath()
-					+ "/META-INF");
+			File metaInfDir = new File(outputDir, "META-INF");
 			metaInfDir.mkdirs();
-			FileWriter fileWriter = new FileWriter(new File(metaInfDir
-					.getAbsolutePath()
-					+ "/MANIFEST.MF"));
+			FileWriter fileWriter = new FileWriter(new File(metaInfDir, "MANIFEST.MF"));
 
 			BufferedWriter writer = new BufferedWriter(fileWriter);
 
@@ -129,19 +127,16 @@
 			writer.close();
 			fileWriter.close();
 
-			FileWriter buildPropertiesFileWriter = new FileWriter(new File(
-					project.getBasedir().getAbsolutePath()
-							+ "/build.properties"));
-
-			BufferedWriter buildPropertiesWriter = new BufferedWriter(
-					buildPropertiesFileWriter);
-
+			FileWriter buildPropertiesFileWriter = new FileWriter(new File(outputDir, "build.properties"));
+			BufferedWriter buildPropertiesWriter = new BufferedWriter(buildPropertiesFileWriter);
 			buildPropertiesWriter.write("bin.includes = /META-INF");
-
 			buildPropertiesWriter.close();
-
 			buildPropertiesFileWriter.close();
 
+      Resource res = new Resource();
+      res.setDirectory(outputDir.toString());
+      project.addResource(res);
+
 		} catch (Exception e) {
 			throw new MojoFailureException(
 					"Unable to generate Eclipse 3.0 manifest, "
@@ -160,7 +155,7 @@
 		List uris = new ArrayList();
 		Set artifacts = project.getArtifacts();
 
-		File destinationDir = new File(projectBuildDirectory);
+    uris.add(".");
 		for (Iterator iter = artifacts.iterator(); iter.hasNext();) {
 			Artifact artifact = (Artifact) iter.next();
 			ArtifactFilter filter = new ScopeArtifactFilter(
@@ -169,9 +164,9 @@
 				if (!artifact.isOptional() && filter.include(artifact)) {
 					String type = artifact.getType();
 					if ("jar".equals(type)) {
-						uris.add("target/" + artifact.getFile().getName());
+						uris.add(artifact.getFile().getName());
 						FileUtils.copyFileToDirectory(artifact.getFile(),
-								destinationDir);
+								outputDir);
 					}
 				}
 			} catch (IOException e) {

Modified: incubator/servicemix/trunk/tooling/servicemix-packaging-descriptors/pom.xml
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/tooling/servicemix-packaging-descriptors/pom.xml?rev=400091&r1=400090&r2=400091&view=diff
==============================================================================
--- incubator/servicemix/trunk/tooling/servicemix-packaging-descriptors/pom.xml (original)
+++ incubator/servicemix/trunk/tooling/servicemix-packaging-descriptors/pom.xml Fri May  5
08:22:40 2006
@@ -21,22 +21,31 @@
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xmlns="http://maven.apache.org/POM/4.0.0">
 
+	<modelVersion>4.0.0</modelVersion>
+
 	<parent>
-		<groupId>incubator-servicemix</groupId>
+		<groupId>org.apache.servicemix</groupId>
 		<artifactId>servicemix</artifactId>
 		<version>3.0-SNAPSHOT</version>
 		<relativePath>../../pom.xml</relativePath>
 	</parent>
 
-	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.apache.servicemix.plugins</groupId>
 	<artifactId>servicemix-packaging-descriptors</artifactId>
 	<name>ServiceMix :: Packaging Descriptors</name>
 
 	<dependencies>
 		<dependency>
 			<groupId>com.sun.xml</groupId>
-			<artifactId>jaxb-xjc</artifactId>
-			<version>2.0-JAXWS-2.0-EA3</version>
+			<artifactId>jaxb-impl</artifactId>
+		</dependency>
+		<dependency>
+		  <groupId>stax</groupId>
+		  <artifactId>stax-api</artifactId>
+		</dependency>
+		<dependency>
+		  <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-activation_1.0.2_spec</artifactId>
 		</dependency>
 	</dependencies>
 
@@ -52,6 +61,39 @@
 				</configuration>
 			</plugin>
 			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>jaxb2-maven-plugin</artifactId>
+				<executions>
+				  <execution>
+				    <id>jbi</id>
+						<phase>generate-sources</phase>
+						<goals>
+							<goal>xjc</goal>
+						</goals>
+    				<configuration>
+    					<schemaDirectory>${basedir}/src/main/resources</schemaDirectory>
+    					<schemaFiles>jbi.xsd</schemaFiles>
+    					<packageName>org.apache.servicemix.descriptors.jbi</packageName>
+    					<staleFile>${project.build.directory}/jaxb-source/jbi.stale</staleFile>
+    				</configuration>
+    			</execution>
+				  <execution>
+				    <id>assets</id>
+						<phase>generate-sources</phase>
+						<goals>
+							<goal>xjc</goal>
+						</goals>
+    				<configuration>
+    					<schemaDirectory>${basedir}/src/main/resources</schemaDirectory>
+    					<schemaFiles>packaging-assets.xsd</schemaFiles>
+    					<packageName>org.apache.servicemix.descriptors.packaging.assets</packageName>
+    					<staleFile>${project.build.directory}/jaxb-source/assets.stale</staleFile>
+    				</configuration>
+    			</execution>
+    		</executions>
+			</plugin>
+			<!--
+			<plugin>
 				<artifactId>maven-antrun-plugin</artifactId>
 				<executions>
 					<execution>
@@ -85,6 +127,7 @@
 					</execution>
 				</executions>
 			</plugin>
+			-->
 		</plugins>
 	</build>
 </project>

Modified: incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/pom.xml
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/pom.xml?rev=400091&r1=400090&r2=400091&view=diff
==============================================================================
--- incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/pom.xml (original)
+++ incubator/servicemix/trunk/tooling/servicemix-packaging-eclipse-plugin/pom.xml Fri May
 5 08:22:40 2006
@@ -21,37 +21,38 @@
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xmlns="http://maven.apache.org/POM/4.0.0">
 
+	<modelVersion>4.0.0</modelVersion>
+
 	<parent>
-		<groupId>incubator-servicemix</groupId>
+		<groupId>org.apache.servicemix</groupId>
 		<artifactId>servicemix</artifactId>
 		<version>3.0-SNAPSHOT</version>
 		<relativePath>../../pom.xml</relativePath>
 	</parent>
 
-	<modelVersion>4.0.0</modelVersion>
 	<artifactId>servicemix-packaging-eclipse-plugin</artifactId>
 	<name>ServiceMix :: Packaging Eclipse Plugin</name>
+	
+	<repositories>
+	  <repository>
+      <id>servicemix-m1-repo</id>
+      <name>Servicemix Repository on Codehaus</name>
+      <url>http://www.servicemix.org/maven-repo</url>
+      <layout>legacy</layout>
+	  </repository>
+	</repositories>
+	
 	<dependencies>
 
 		<!--  ServiceMix Dependencies -->
 		<dependency>
-			<groupId>incubator-servicemix</groupId>
+		  <groupId>org.apache.servicemix</groupId>
 			<artifactId>servicemix-common</artifactId>
 		</dependency>
 		<dependency>
-			<groupId>incubator-servicemix</groupId>
+		  <groupId>org.apache.servicemix.plugins</groupId>
 			<artifactId>servicemix-packaging-descriptors</artifactId>
-			<version>3.0-SNAPSHOT</version>
-		</dependency>
-
-		<!-- JAXB2 -->
-		<dependency>
-			<groupId>com.sun.xml</groupId>
-			<artifactId>jaxb-impl</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>xfire</groupId>
-			<artifactId>jaxb-api</artifactId>
+			<version>${pom.version}</version>
 		</dependency>
 
 		<!-- XBean -->
@@ -59,15 +60,6 @@
 			<groupId>org.apache.xbean</groupId>
 			<artifactId>xbean-server</artifactId>
 		</dependency>
-		<dependency>
-			<groupId>org.apache.xbean</groupId>
-			<artifactId>xbean-spring</artifactId>
-		</dependency>
-
-		<dependency>
-			<groupId>commons-logging</groupId>
-			<artifactId>commons-logging</artifactId>
-		</dependency>
 
 		<!-- Plexus (for XMLWriter) -->
 		<dependency>
@@ -422,7 +414,7 @@
 				<artifactId>maven2-eclipse-plugin-plugin</artifactId>
 				<executions>
 					<execution>
-						<phase>compile</phase>
+						<phase>generate-sources</phase>
 						<goals>
 							<goal>create-manifest</goal>
 						</goals>
@@ -435,6 +427,15 @@
 					</pluginClass>
 				</configuration>
 			</plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestFile>${project.build.directory}/eclipse/META-INF/MANIFEST.MF</manifestFile>
+          </archive>
+        </configuration>
+      </plugin>
 		</plugins>
 	</build>
-</project>
\ No newline at end of file
+</project>



Mime
View raw message