You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2014/04/24 04:09:21 UTC

svn commit: r1589556 - in /maven/plugins/trunk/maven-shade-plugin: ./ src/it/mini-jar-respect-includes/ src/it/mshade-123/ src/it/shading-with-java-8-sources/ src/it/shading-with-java-8-sources/src/ src/it/shading-with-java-8-sources/src/main/ src/it/s...

Author: olamy
Date: Thu Apr 24 02:09:20 2014
New Revision: 1589556

URL: http://svn.apache.org/r1589556
Log:
[MSHADE-166] maven-shade-plugin not compatible with Java 8

Added:
    maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/
    maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/invoker.properties   (with props)
    maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/pom.xml   (with props)
    maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/src/
    maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/src/main/
    maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/src/main/java/
    maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/src/main/java/org/
    maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/src/main/java/org/apache/
    maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/src/main/java/org/apache/maven/
    maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/src/main/java/org/apache/maven/plugins/
    maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/src/main/java/org/apache/maven/plugins/shade/
    maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/src/main/java/org/apache/maven/plugins/shade/its/
    maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/src/main/java/org/apache/maven/plugins/shade/its/App.java   (with props)
    maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/verify.groovy   (with props)
Modified:
    maven/plugins/trunk/maven-shade-plugin/pom.xml
    maven/plugins/trunk/maven-shade-plugin/src/it/mini-jar-respect-includes/pom.xml
    maven/plugins/trunk/maven-shade-plugin/src/it/mshade-123/pom.xml

Modified: maven/plugins/trunk/maven-shade-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/pom.xml?rev=1589556&r1=1589555&r2=1589556&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-shade-plugin/pom.xml Thu Apr 24 02:09:20 2014
@@ -63,6 +63,7 @@ under the License.
     <mavenVersion>3.0</mavenVersion>
     <currentVersion>${project.version}</currentVersion>
     <mavenPluginVersion>3.2</mavenPluginVersion>
+    <asmVersion>5.0.2</asmVersion>
   </properties>
 
   <contributors>
@@ -122,14 +123,14 @@ under the License.
 
     <!-- Others -->
     <dependency>
-      <groupId>asm</groupId>
+      <groupId>org.ow2.asm</groupId>
       <artifactId>asm</artifactId>
-      <version>3.3.1</version>
+      <version>${asmVersion}</version>
     </dependency>
     <dependency>
-      <groupId>asm</groupId>
+      <groupId>org.ow2.asm</groupId>
       <artifactId>asm-commons</artifactId>
-      <version>3.3.1</version>
+      <version>${asmVersion}</version>
     </dependency>
     <dependency>
       <groupId>org.jdom</groupId>
@@ -144,7 +145,7 @@ under the License.
     <dependency>
       <groupId>org.vafer</groupId>
       <artifactId>jdependency</artifactId>
-      <version>0.7</version>
+      <version>0.9-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>

Modified: maven/plugins/trunk/maven-shade-plugin/src/it/mini-jar-respect-includes/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/it/mini-jar-respect-includes/pom.xml?rev=1589556&r1=1589555&r2=1589556&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/it/mini-jar-respect-includes/pom.xml (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/it/mini-jar-respect-includes/pom.xml Thu Apr 24 02:09:20 2014
@@ -46,10 +46,10 @@ under the License.
     </dependency>
     
     <dependency>
-      <groupId>asm</groupId>
+      <groupId>org.ow2.asm</groupId>
       <artifactId>asm</artifactId>
-      <version>3.3.1</version>
-    </dependency>    
+      <version>@asmVersion@</version>
+    </dependency>
   </dependencies>
 
   <build>

Modified: maven/plugins/trunk/maven-shade-plugin/src/it/mshade-123/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/it/mshade-123/pom.xml?rev=1589556&r1=1589555&r2=1589556&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/it/mshade-123/pom.xml (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/it/mshade-123/pom.xml Thu Apr 24 02:09:20 2014
@@ -2,100 +2,100 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <name>test</name>
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>org.test</groupId>
-    <artifactId>test</artifactId>
-    <version>0.0.1-SNAPSHOT</version>
-    <packaging>jar</packaging>
+  <name>test</name>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.test</groupId>
+  <artifactId>test</artifactId>
+  <version>0.0.1-SNAPSHOT</version>
+  <packaging>jar</packaging>
 
-    <parent>
-        <groupId>org.sonatype.oss</groupId>
-        <artifactId>oss-parent</artifactId>
-        <version>7</version>
-    </parent>
+  <parent>
+    <groupId>org.sonatype.oss</groupId>
+    <artifactId>oss-parent</artifactId>
+    <version>7</version>
+  </parent>
 
-    <dependencies>
+  <dependencies>
 
-        <dependency>
-            <groupId>commons-lang</groupId>
-            <artifactId>commons-lang</artifactId>
-            <version>2.6</version>
-            <scope>compile</scope>
-        </dependency>
-    </dependencies>
+    <dependency>
+      <groupId>commons-lang</groupId>
+      <artifactId>commons-lang</artifactId>
+      <version>2.6</version>
+      <scope>compile</scope>
+    </dependency>
+  </dependencies>
 
-    <build>
+  <build>
 
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.3.2</version>
-                <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <version>2.1.2</version>
-                <executions>
-                    <execution>
-                        <id>attach-sources</id>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-shade-plugin</artifactId>
-                <version>@project.version@</version>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>shade</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <minimizeJar>true</minimizeJar>
-                    <artifactSet>
-                        <includes>
-                            <include>commons-lang:commons-lang</include>
-                        </includes>
-                    </artifactSet>
-                    <relocations>
-                        <relocation>
-                            <pattern>com.apache.commons.lang</pattern>
-                            <shadedPattern>org.test.common.lang</shadedPattern>
-                        </relocation>
-                    </relocations>
-                </configuration>
-            </plugin>
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>2.3</version>
-                <configuration>
-                    <appendAssemblyId>false</appendAssemblyId>
-                    <outputDirectory>${project.build.directory}/releases/</outputDirectory>
-                    <descriptors>
-                        <descriptor>${basedir}/assembly.xml</descriptor>
-                    </descriptors>
-                </configuration>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.3.2</version>
+        <configuration>
+          <source>1.6</source>
+          <target>1.6</target>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-source-plugin</artifactId>
+        <version>2.1.2</version>
+        <executions>
+          <execution>
+            <id>attach-sources</id>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <version>@project.version@</version>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <minimizeJar>true</minimizeJar>
+          <artifactSet>
+            <includes>
+              <include>commons-lang:commons-lang</include>
+            </includes>
+          </artifactSet>
+          <relocations>
+            <relocation>
+              <pattern>com.apache.commons.lang</pattern>
+              <shadedPattern>org.test.common.lang</shadedPattern>
+            </relocation>
+          </relocations>
+        </configuration>
+      </plugin>
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <version>2.3</version>
+        <configuration>
+          <appendAssemblyId>false</appendAssemblyId>
+          <outputDirectory>${project.build.directory}/releases/</outputDirectory>
+          <descriptors>
+            <descriptor>${basedir}/assembly.xml</descriptor>
+          </descriptors>
+        </configuration>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>single</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
 </project>
\ No newline at end of file

Added: maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/invoker.properties?rev=1589556&view=auto
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/invoker.properties (added)
+++ maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/invoker.properties Thu Apr 24 02:09:20 2014
@@ -0,0 +1,2 @@
+invoker.java.version = 1.8+
+invoker.goals=clean verify
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/invoker.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/invoker.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/pom.xml?rev=1589556&view=auto
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/pom.xml (added)
+++ maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/pom.xml Thu Apr 24 02:09:20 2014
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.shade.its</groupId>
+  <artifactId>shading-with-java-8-sources</artifactId>
+  <version>1.0-SNAPSHOT</version>
+
+  <name>users-shader-impl</name>
+
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.7</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <configuration>
+            <source>1.8</source>
+            <target>1.8</target>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <version>@project.version@</version>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-shade-plugin</artifactId>
+            <version>@project.version@</version>
+            <classifier>tests</classifier>
+          </dependency>
+        </dependencies>
+        <executions>
+          <execution>
+            <id>create-shaded-artifact</id>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <configuration>
+              <shadedArtifactAttached>true</shadedArtifactAttached>
+              <shadedClassifierName>shaded</shadedClassifierName>
+              <createDependencyReducedPom>false</createDependencyReducedPom>
+              <relocations>
+                <relocation>
+                  <pattern>org.apache.maven.plugins.shade.its</pattern>
+                  <shadedPattern>hidden</shadedPattern>
+                </relocation>
+              </relocations>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>exec-maven-plugin</artifactId>
+        <version>1.1.1</version>
+        <executions>
+          <execution>
+            <id>run</id>
+            <phase>verify</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <executable>java</executable>
+              <arguments>
+                <argument>-classpath</argument>
+                <argument>${project.build.directory}/shading-with-java-8-sources-1.0-SNAPSHOT-shaded.jar </argument>
+                <argument>hidden.App</argument>
+              </arguments>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+    </plugins>
+  </build>
+</project>

Propchange: maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/src/main/java/org/apache/maven/plugins/shade/its/App.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/src/main/java/org/apache/maven/plugins/shade/its/App.java?rev=1589556&view=auto
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/src/main/java/org/apache/maven/plugins/shade/its/App.java (added)
+++ maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/src/main/java/org/apache/maven/plugins/shade/its/App.java Thu Apr 24 02:09:20 2014
@@ -0,0 +1,30 @@
+package org.apache.maven.plugins.shade.its;
+
+/**
+ * Hello world!
+ */
+public class App
+{
+    public static void main( String[] args )
+    {
+        System.out.println( "=== RunnableTest ===" );
+
+        // Anonymous Runnable
+        Runnable r1 = new Runnable()
+        {
+
+            @Override
+            public void run()
+            {
+                System.out.println( "Hello world one!" );
+            }
+        };
+
+        // Lambda Runnable
+        Runnable r2 = () -> System.out.println( "Hello world two!" );
+
+        // Run em!
+        r1.run();
+        r2.run();
+    }
+}

Propchange: maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/src/main/java/org/apache/maven/plugins/shade/its/App.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/src/main/java/org/apache/maven/plugins/shade/its/App.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/verify.groovy
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/verify.groovy?rev=1589556&view=auto
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/verify.groovy (added)
+++ maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/verify.groovy Thu Apr 24 02:09:20 2014
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+assert new File(basedir, 'build.log').exists();
+
+content = new File(basedir, 'build.log').text;
+assert content.contains( '=== RunnableTest ===');
+assert content.contains( 'Hello world one!');
+assert content.contains( 'Hello world two!');

Propchange: maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/verify.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-shade-plugin/src/it/shading-with-java-8-sources/verify.groovy
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision