maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r631833 - in /maven/plugins/trunk/maven-shade-plugin: pom.xml src/main/java/org/apache/maven/plugins/shade/DefaultShader.java src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java
Date Thu, 28 Feb 2008 03:49:39 GMT
Author: dkulp
Date: Wed Feb 27 19:49:38 2008
New Revision: 631833

URL: http://svn.apache.org/viewvc?rev=631833&view=rev
Log:
[MSHADE-14, MSHADE-17, MSHADE-16] Move the "project" jars to the front of the lists so the
stuff there always "wins"
Side affect of moving should allow writing a Transformer that acts on the MANIFESTS (I might
need to merge OSGi entries)
Update to asm 3.1 (need to test if this fixes MSHADE-9 or not)


Modified:
    maven/plugins/trunk/maven-shade-plugin/pom.xml
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/DefaultShader.java
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java

Modified: maven/plugins/trunk/maven-shade-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/pom.xml?rev=631833&r1=631832&r2=631833&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-shade-plugin/pom.xml Wed Feb 27 19:49:38 2008
@@ -45,8 +45,18 @@
     <!-- Others -->
     <dependency>
       <groupId>asm</groupId>
-      <artifactId>asm-all</artifactId>
-      <version>20070324</version>
+      <artifactId>asm</artifactId>
+      <version>3.1</version>
+    </dependency>
+     <dependency>
+      <groupId>asm</groupId>
+      <artifactId>asm-util</artifactId>
+      <version>3.1</version>
+    </dependency>
+     <dependency>
+      <groupId>asm</groupId>
+      <artifactId>asm-commons</artifactId>
+      <version>3.1</version>
     </dependency>
     <dependency>
       <groupId>jdom</groupId>
@@ -78,4 +88,4 @@
       </plugin>
     </plugins>
   </build>
-</project>
\ No newline at end of file
+</project>

Modified: maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/DefaultShader.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/DefaultShader.java?rev=631833&r1=631832&r2=631833&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/DefaultShader.java
(original)
+++ maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/DefaultShader.java
Wed Feb 27 19:49:38 2008
@@ -83,16 +83,6 @@
                     continue;
                 }
 
-                if ( "META-INF/MANIFEST.MF".equals( name ) ) 
-                {
-                    // Ignore MANIFEST for jars except the last one, which is
-                    // the project artifact. Ideally, we could create a new one later
-                    if ( i.hasNext() )
-                    {
-                        continue;
-                    }
-                }
-
                 String mappedName = remapper.map( name );
 
                 InputStream is = jarFile.getInputStream( entry );

Modified: maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java?rev=631833&r1=631832&r2=631833&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java
(original)
+++ maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java
Wed Feb 27 19:49:38 2008
@@ -231,6 +231,17 @@
         Set artifactIds = new LinkedHashSet();
         Set sourceArtifacts = new LinkedHashSet();
 
+        artifacts.add( project.getArtifact().getFile() );
+
+        if ( createSourcesJar )
+        {
+            File file = shadedSourcesArtifactFile();
+            if ( file.exists() )
+            {
+                sourceArtifacts.add( file );
+            }
+        }
+        
         for ( Iterator it = project.getArtifacts().iterator(); it.hasNext(); )
         {
             Artifact artifact = (Artifact) it.next();
@@ -258,16 +269,6 @@
             }
         }
 
-        artifacts.add( project.getArtifact().getFile() );
-
-        if ( createSourcesJar )
-        {
-            File file = shadedSourcesArtifactFile();
-            if ( file.exists() )
-            {
-                sourceArtifacts.add( file );
-            }
-        }
 
         File outputJar = shadedArtifactFileWithClassifier();
         File sourcesJar = shadedSourceArtifactFileWithClassifier();



Mime
View raw message