servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r539298 - /incubator/servicemix/branches/servicemix-3.1/build/src/main/java/org/apache/servicemix/maven/plugin/legal/LegalMojo.java
Date Fri, 18 May 2007 07:29:02 GMT
Author: gnodet
Date: Fri May 18 00:28:59 2007
New Revision: 539298

URL: http://svn.apache.org/viewvc?view=rev&rev=539298
Log:
Fix the build to include the legal files inside source and javadoc jars

Modified:
    incubator/servicemix/branches/servicemix-3.1/build/src/main/java/org/apache/servicemix/maven/plugin/legal/LegalMojo.java

Modified: incubator/servicemix/branches/servicemix-3.1/build/src/main/java/org/apache/servicemix/maven/plugin/legal/LegalMojo.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.1/build/src/main/java/org/apache/servicemix/maven/plugin/legal/LegalMojo.java?view=diff&rev=539298&r1=539297&r2=539298
==============================================================================
--- incubator/servicemix/branches/servicemix-3.1/build/src/main/java/org/apache/servicemix/maven/plugin/legal/LegalMojo.java
(original)
+++ incubator/servicemix/branches/servicemix-3.1/build/src/main/java/org/apache/servicemix/maven/plugin/legal/LegalMojo.java
Fri May 18 00:28:59 2007
@@ -20,6 +20,7 @@
 import java.io.IOException;
 import java.net.URL;
 
+import org.apache.maven.model.Resource;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
@@ -69,12 +70,20 @@
                 copyLegalFiles(new File(project.getBasedir(), "target/classes/"));
                 copyLegalFiles(new File(project.getBasedir(), "target/" + project.getArtifactId()
+ "-" + project.getVersion() + "-installer/"));
             }
+
+            File outDir = new File(project.getBasedir(), "target/maven-shared-archive-resources");
+            copyLegalFiles(outDir);
+            Resource resource = new Resource();
+            resource.setDirectory(outDir.getAbsolutePath());
+            project.getResources().add(resource);
+            project.getTestResources().add(resource);
+            
         } catch (IOException e) {
             throw new MojoExecutionException("Unable to copy legal files", e);
         }
-  	}
-  	
-  	protected void copyLegalFiles(File outputDir) throws IOException {
+    }
+
+    protected void copyLegalFiles(File outputDir) throws IOException {
         String[] names = { "/META-INF/DISCLAIMER", "/META-INF/NOTICE", "/META-INF/LICENSE"};
         for (int i = 0; i < names.length; i++) {
             URL res = getClass().getResource(names[i]);



Mime
View raw message