camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r1457242 - /camel/trunk/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageMojo.java
Date Sat, 16 Mar 2013 12:23:19 GMT
Author: jstrachan
Date: Sat Mar 16 12:23:19 2013
New Revision: 1457242

URL: http://svn.apache.org/r1457242
Log:
fixed maven plugin so that it includes the component.properties inside the jar

Modified:
    camel/trunk/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageMojo.java

Modified: camel/trunk/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageMojo.java
URL: http://svn.apache.org/viewvc/camel/trunk/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageMojo.java?rev=1457242&r1=1457241&r2=1457242&view=diff
==============================================================================
--- camel/trunk/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageMojo.java
(original)
+++ camel/trunk/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageMojo.java
Sat Mar 16 12:23:19 2013
@@ -19,6 +19,8 @@ package org.apache.camel.maven.packaging
 import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Properties;
 
 import org.apache.maven.plugin.AbstractMojo;
@@ -98,7 +100,10 @@ public class PackageMojo extends Abstrac
                     getLog().info("Generated " + outFile + " containing the Camel " + (files.length
> 1 ? "components " : "component ") + names);
 
                     if (projectHelper != null) {
-                        projectHelper.attachArtifact( this.project, "properties", "camelComponent",
outFile);
+                        List<String> includes = new ArrayList<String>();
+                        includes.add("**/component.properties");
+                        projectHelper.addResource(this.project, outDir.getPath(), includes,
new ArrayList<String>());
+                        projectHelper.attachArtifact(this.project, "properties", "camelComponent",
outFile);
                     }
                 } catch (IOException e) {
                     throw new MojoExecutionException("Failed to write properties to " + outFile
+ ". Reason: " + e, e);



Mime
View raw message