geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r484826 - /geronimo/server/branches/1.2/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java
Date Fri, 08 Dec 2006 22:27:30 GMT
Author: jdillon
Date: Fri Dec  8 14:27:28 2006
New Revision: 484826

URL: http://svn.apache.org/viewvc?view=rev&rev=484826
Log:
Adding legal files to META-INF/

Modified:
    geronimo/server/branches/1.2/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java

Modified: geronimo/server/branches/1.2/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.2/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java?view=diff&rev=484826&r1=484825&r2=484826
==============================================================================
--- geronimo/server/branches/1.2/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java
(original)
+++ geronimo/server/branches/1.2/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java
Fri Dec  8 14:27:28 2006
@@ -26,7 +26,6 @@
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
 import java.util.Set;
 
 import org.apache.geronimo.deployment.PluginBootstrap2;
@@ -55,7 +54,7 @@
 import org.apache.maven.archiver.MavenArchiver;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.project.MavenProject;
+
 import org.codehaus.plexus.archiver.jar.JarArchiver;
 import org.codehaus.plexus.util.FileUtils;
 
@@ -98,6 +97,15 @@
     private JarArchiver jarArchiver = null;
 
     /**
+     * The module base directory.
+     *
+     * @parameter expression="${project.basedir}"
+     * @required
+     * @readonly
+     */
+    private File baseDirectory = null;
+
+    /**
      * Directory containing the generated archive.
      *
      * @parameter expression="${project.build.directory}"
@@ -344,6 +352,24 @@
             if (classesDirectory.isDirectory()) {
                 archiver.getArchiver().addDirectory(classesDirectory);
             }
+
+            //
+            // HACK: Include legal files here for sanity
+            //
+
+            //
+            // NOTE: Would be nice to share this with the copy-legal-files mojo
+            //
+            String[] includes = {
+                "LICENSE.txt",
+                "LICENSE",
+                "NOTICE.txt",
+                "NOTICE",
+                "DISCLAIMER.txt",
+                "DISCLAIMER"
+            };
+
+            archiver.getArchiver().addDirectory(baseDirectory, "META-INF/", includes, new
String[0]);
 
             if (classpath != null) {
                 archive.addManifestEntry("Class-Path", getClassPath());



Mime
View raw message