You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2008/03/24 14:18:01 UTC
svn commit: r640405 [4/4] - in /maven/plugins/trunk/maven-shade-plugin: ./
src/main/java/org/apache/maven/plugins/shade/
src/main/java/org/apache/maven/plugins/shade/filter/
src/main/java/org/apache/maven/plugins/shade/mojo/
src/main/java/org/apache/ma...
Modified: maven/plugins/trunk/maven-shade-plugin/src/test/projects/no-relocation-project/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/test/projects/no-relocation-project/pom.xml?rev=640405&r1=640404&r2=640405&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/test/projects/no-relocation-project/pom.xml (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/test/projects/no-relocation-project/pom.xml Mon Mar 24 06:17:58 2008
@@ -1,66 +1,66 @@
-<?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/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.maven.plugins.shade</groupId>
- <artifactId>no-relocation-project</artifactId>
- <name>no-relocation-project</name>
- <packaging>jar</packaging>
- <version>1.0-SNAPSHOT</version>
- <url>http://maven.apache.org</url>
- <dependencies>
- <dependency>
- <groupId>org.apache.maven.plugins.shade</groupId>
- <artifactId>test-project</artifactId>
- <version>${pom.version}</version>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- <configuration>
- <artifactSet>
- <excludes>
- <exclude>classworlds:classworlds</exclude>
- <exclude>junit:junit</exclude>
- <exclude>jmock:jmock</exclude>
- <exclude>xml-apis:xml-apis</exclude>
- </excludes>
- </artifactSet>
- <transformers>
- <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer"/>
- </transformers>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
+<?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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.maven.plugins.shade</groupId>
+ <artifactId>no-relocation-project</artifactId>
+ <name>no-relocation-project</name>
+ <packaging>jar</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <url>http://maven.apache.org</url>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.plugins.shade</groupId>
+ <artifactId>test-project</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <artifactSet>
+ <excludes>
+ <exclude>classworlds:classworlds</exclude>
+ <exclude>junit:junit</exclude>
+ <exclude>jmock:jmock</exclude>
+ <exclude>xml-apis:xml-apis</exclude>
+ </excludes>
+ </artifactSet>
+ <transformers>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer"/>
+ </transformers>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/plugins/trunk/maven-shade-plugin/src/test/projects/no-relocation-project/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-shade-plugin/src/test/projects/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-shade-plugin/src/test/projects/shaded-attached-project/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/test/projects/shaded-attached-project/pom.xml?rev=640405&r1=640404&r2=640405&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/test/projects/shaded-attached-project/pom.xml (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/test/projects/shaded-attached-project/pom.xml Mon Mar 24 06:17:58 2008
@@ -1,78 +1,78 @@
-<?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/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.maven.plugins.shade</groupId>
- <artifactId>shaded-attached-project</artifactId>
- <name>shaded-attached-project</name>
- <packaging>jar</packaging>
- <version>1.0-SNAPSHOT</version>
- <url>http://maven.apache.org</url>
- <dependencies>
- <dependency>
- <groupId>org.apache.maven.plugins.shade</groupId>
- <artifactId>test-project</artifactId>
- <version>${pom.version}</version>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- <configuration>
- <shadedArtifactId>shaded-artifact</shadedArtifactId>
- <shadedArtifactAttached>true</shadedArtifactAttached>
- <shadedClassifierName>jackofall</shadedClassifierName> <!-- Any name that makes sense -->
- <artifactSet>
- <excludes>
- <exclude>classworlds:classworlds</exclude>
- <exclude>junit:junit</exclude>
- <exclude>jmock:jmock</exclude>
- <exclude>xml-apis:xml-apis</exclude>
- </excludes>
- </artifactSet>
- <relocations>
- <relocation>
- <pattern>org.codehaus.plexus.util</pattern>
- <excludes>
- <exclude>org.codehaus.plexus.util.xml.Xpp3Dom</exclude>
- <exclude>org.codehaus.plexus.util.xml.pull.*</exclude>
- </excludes>
- </relocation>
- </relocations>
- <transformers>
- <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer"/>
- </transformers>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
+<?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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.maven.plugins.shade</groupId>
+ <artifactId>shaded-attached-project</artifactId>
+ <name>shaded-attached-project</name>
+ <packaging>jar</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <url>http://maven.apache.org</url>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.plugins.shade</groupId>
+ <artifactId>test-project</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <shadedArtifactId>shaded-artifact</shadedArtifactId>
+ <shadedArtifactAttached>true</shadedArtifactAttached>
+ <shadedClassifierName>jackofall</shadedClassifierName> <!-- Any name that makes sense -->
+ <artifactSet>
+ <excludes>
+ <exclude>classworlds:classworlds</exclude>
+ <exclude>junit:junit</exclude>
+ <exclude>jmock:jmock</exclude>
+ <exclude>xml-apis:xml-apis</exclude>
+ </excludes>
+ </artifactSet>
+ <relocations>
+ <relocation>
+ <pattern>org.codehaus.plexus.util</pattern>
+ <excludes>
+ <exclude>org.codehaus.plexus.util.xml.Xpp3Dom</exclude>
+ <exclude>org.codehaus.plexus.util.xml.pull.*</exclude>
+ </excludes>
+ </relocation>
+ </relocations>
+ <transformers>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer"/>
+ </transformers>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/plugins/trunk/maven-shade-plugin/src/test/projects/shaded-attached-project/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-shade-plugin/src/test/projects/shaded-project/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/test/projects/shaded-project/pom.xml?rev=640405&r1=640404&r2=640405&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/test/projects/shaded-project/pom.xml (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/test/projects/shaded-project/pom.xml Mon Mar 24 06:17:58 2008
@@ -1,76 +1,76 @@
-<?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/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.maven.plugins.shade</groupId>
- <artifactId>shaded-project</artifactId>
- <name>shaded-project</name>
- <packaging>jar</packaging>
- <version>1.0-SNAPSHOT</version>
- <url>http://maven.apache.org</url>
- <dependencies>
- <dependency>
- <groupId>org.apache.maven.plugins.shade</groupId>
- <artifactId>test-project</artifactId>
- <version>${pom.version}</version>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- <configuration>
- <artifactSet>
- <excludes>
- <exclude>classworlds:classworlds</exclude>
- <exclude>junit:junit</exclude>
- <exclude>jmock:jmock</exclude>
- <exclude>xml-apis:xml-apis</exclude>
- </excludes>
- </artifactSet>
- <relocations>
- <relocation>
+<?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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.maven.plugins.shade</groupId>
+ <artifactId>shaded-project</artifactId>
+ <name>shaded-project</name>
+ <packaging>jar</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <url>http://maven.apache.org</url>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.plugins.shade</groupId>
+ <artifactId>test-project</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <artifactSet>
+ <excludes>
+ <exclude>classworlds:classworlds</exclude>
+ <exclude>junit:junit</exclude>
+ <exclude>jmock:jmock</exclude>
+ <exclude>xml-apis:xml-apis</exclude>
+ </excludes>
+ </artifactSet>
+ <relocations>
+ <relocation>
<pattern>org.codehaus.plexus.util</pattern>
- <shadedPattern>org.shaded.plexus.util</shadedPattern>
- <excludes>
- <exclude>org.codehaus.plexus.util.xml.Xpp3Dom</exclude>
- <exclude>org.codehaus.plexus.util.xml.pull.*</exclude>
- </excludes>
- </relocation>
- </relocations>
- <transformers>
- <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer"/>
- </transformers>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
+ <shadedPattern>org.shaded.plexus.util</shadedPattern>
+ <excludes>
+ <exclude>org.codehaus.plexus.util.xml.Xpp3Dom</exclude>
+ <exclude>org.codehaus.plexus.util.xml.pull.*</exclude>
+ </excludes>
+ </relocation>
+ </relocations>
+ <transformers>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer"/>
+ </transformers>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/plugins/trunk/maven-shade-plugin/src/test/projects/shaded-project/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-shade-plugin/src/test/projects/shaded-renamed-project/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-shade-plugin/src/test/projects/test-project/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/test/projects/test-project/pom.xml?rev=640405&r1=640404&r2=640405&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/test/projects/test-project/pom.xml (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/test/projects/test-project/pom.xml Mon Mar 24 06:17:58 2008
@@ -1,48 +1,48 @@
-<?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/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.maven.plugins.shade</groupId>
- <artifactId>test-project</artifactId>
- <name>test-project</name>
- <packaging>jar</packaging>
- <version>1.0-SNAPSHOT</version>
- <url>http://maven.apache.org</url>
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>test-artifact</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-utils</artifactId>
- <version>1.4.1</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
+<?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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.maven.plugins.shade</groupId>
+ <artifactId>test-project</artifactId>
+ <name>test-project</name>
+ <packaging>jar</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <url>http://maven.apache.org</url>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>test-artifact</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>1.4.1</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
Propchange: maven/plugins/trunk/maven-shade-plugin/src/test/projects/test-project/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-shade-plugin/src/test/projects/test-project/src/main/java/org/apache/maven/plugins/shade/App.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/test/projects/test-project/src/main/java/org/apache/maven/plugins/shade/App.java?rev=640405&r1=640404&r2=640405&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/test/projects/test-project/src/main/java/org/apache/maven/plugins/shade/App.java (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/test/projects/test-project/src/main/java/org/apache/maven/plugins/shade/App.java Mon Mar 24 06:17:58 2008
@@ -1,35 +1,35 @@
-/*
- * 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.
- */
-package org.apache.maven.plugins.shade;
-
-import org.codehaus.plexus.util.*;
-
-/**
- * Hello world!
- *
- */
-public class App
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
-
- StringUtils.isEmpty( "foo" );
- }
-}
+/*
+ * 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.
+ */
+package org.apache.maven.plugins.shade;
+
+import org.codehaus.plexus.util.*;
+
+/**
+ * Hello world!
+ *
+ */
+public class App
+{
+ public static void main( String[] args )
+ {
+ System.out.println( "Hello World!" );
+
+ StringUtils.isEmpty( "foo" );
+ }
+}
Propchange: maven/plugins/trunk/maven-shade-plugin/src/test/projects/test-project/src/main/java/org/apache/maven/plugins/shade/App.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-shade-plugin/src/test/projects/test-project/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/test/projects/test-project/src/main/resources/META-INF/plexus/components.xml?rev=640405&r1=640404&r2=640405&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/test/projects/test-project/src/main/resources/META-INF/plexus/components.xml (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/test/projects/test-project/src/main/resources/META-INF/plexus/components.xml Mon Mar 24 06:17:58 2008
@@ -1,209 +1,209 @@
-<!--
-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.
--->
-
-<component-set>
- <components>
- <component>
- <role>org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout</role>
- <role-hint>default</role-hint>
- <implementation>org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout</implementation>
- </component>
-
- <component>
- <role>org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout</role>
- <role-hint>legacy</role-hint>
- <implementation>org.apache.maven.artifact.repository.layout.LegacyRepositoryLayout</implementation>
- </component>
-
- <!--
- |
- | ArtifactHandlerManager
- |
- -->
- <component>
- <role>org.apache.maven.artifact.handler.manager.ArtifactHandlerManager</role>
- <implementation>org.apache.maven.artifact.handler.manager.DefaultArtifactHandlerManager</implementation>
- <requirements>
- <requirement>
- <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
- <field-name>artifactHandlers</field-name>
- </requirement>
- </requirements>
- </component>
-
- <component>
- <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
- <role-hint>ejb</role-hint>
- <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
- <configuration>
- <type>ejb</type>
- <extension>jar</extension>
- <language>java</language>
- <addedToClasspath>true</addedToClasspath>
- </configuration>
- </component>
-
- <component>
- <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
- <role-hint>jar</role-hint>
- <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
- <configuration>
- <type>jar</type>
- <language>java</language>
- <addedToClasspath>true</addedToClasspath>
- </configuration>
- </component>
-
- <component>
- <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
- <role-hint>test-jar</role-hint>
- <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
- <configuration>
- <classifier>tests</classifier>
- <extension>jar</extension>
- <type>test-jar</type>
- <packaging>jar</packaging>
- <language>java</language>
- <addedToClasspath>true</addedToClasspath>
- </configuration>
- </component>
-
- <component>
- <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
- <role-hint>maven-plugin</role-hint>
- <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
- <configuration>
- <type>maven-plugin</type>
- <extension>jar</extension>
- <language>java</language>
- <addedToClasspath>true</addedToClasspath>
- </configuration>
- </component>
-
- <component>
- <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
- <role-hint>pom</role-hint>
- <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
- <configuration>
- <type>pom</type>
- </configuration>
- </component>
-
- <component>
- <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
- <role-hint>java-source</role-hint>
- <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
- <configuration>
- <classifier>sources</classifier>
- <type>java-source</type>
- <extension>jar</extension>
- <language>java</language>
- <addedToClasspath>false</addedToClasspath>
- </configuration>
- </component>
-
- <component>
- <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
- <role-hint>javadoc</role-hint>
- <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
- <configuration>
- <classifier>javadoc</classifier>
- <type>javadoc</type>
- <extension>jar</extension>
- <language>java</language>
- <addedToClasspath>true</addedToClasspath>
- </configuration>
- </component>
-
- <component>
- <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
- <role-hint>war</role-hint>
- <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
- <configuration>
- <type>war</type>
- <includesDependencies>true</includesDependencies>
- <language>java</language>
- <addedToClasspath>false</addedToClasspath>
- </configuration>
- </component>
-
- <component>
- <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
- <role-hint>ear</role-hint>
- <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
- <configuration>
- <type>ear</type>
- <includesDependencies>true</includesDependencies>
- <language>java</language>
- <addedToClasspath>false</addedToClasspath>
- </configuration>
- </component>
-
- <component>
- <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
- <role-hint>ejb-client</role-hint>
- <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
- <configuration>
- <type>ejb-client</type>
- <extension>jar</extension>
- <packaging>ejb</packaging>
- <classifier>client</classifier>
- <language>java</language>
- <addedToClasspath>true</addedToClasspath>
- </configuration>
- </component>
-
- <component>
- <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
- <role-hint>par</role-hint>
- <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
- <configuration>
- <type>par</type>
- <language>java</language>
- <addedToClasspath>true</addedToClasspath>
- </configuration>
- </component>
-
- <component>
- <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
- <role-hint>ejb3</role-hint>
- <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
- <configuration>
- <type>ejb3</type>
- <language>java</language>
- <addedToClasspath>true</addedToClasspath>
- </configuration>
- </component>
-
- <component>
- <role>org.apache.maven.artifact.factory.ArtifactFactory</role>
- <implementation>org.apache.maven.artifact.factory.DefaultArtifactFactory</implementation>
- <requirements>
- <requirement>
- <role>org.apache.maven.artifact.handler.manager.ArtifactHandlerManager</role>
- </requirement>
- </requirements>
- </component>
-
- <component>
- <role>org.apache.maven.artifact.resolver.ArtifactCollector</role>
- <implementation>org.apache.maven.artifact.resolver.DefaultArtifactCollector</implementation>
- </component>
- </components>
-</component-set>
+<!--
+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.
+-->
+
+<component-set>
+ <components>
+ <component>
+ <role>org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout</role>
+ <role-hint>default</role-hint>
+ <implementation>org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout</implementation>
+ </component>
+
+ <component>
+ <role>org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout</role>
+ <role-hint>legacy</role-hint>
+ <implementation>org.apache.maven.artifact.repository.layout.LegacyRepositoryLayout</implementation>
+ </component>
+
+ <!--
+ |
+ | ArtifactHandlerManager
+ |
+ -->
+ <component>
+ <role>org.apache.maven.artifact.handler.manager.ArtifactHandlerManager</role>
+ <implementation>org.apache.maven.artifact.handler.manager.DefaultArtifactHandlerManager</implementation>
+ <requirements>
+ <requirement>
+ <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+ <field-name>artifactHandlers</field-name>
+ </requirement>
+ </requirements>
+ </component>
+
+ <component>
+ <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+ <role-hint>ejb</role-hint>
+ <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
+ <configuration>
+ <type>ejb</type>
+ <extension>jar</extension>
+ <language>java</language>
+ <addedToClasspath>true</addedToClasspath>
+ </configuration>
+ </component>
+
+ <component>
+ <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+ <role-hint>jar</role-hint>
+ <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
+ <configuration>
+ <type>jar</type>
+ <language>java</language>
+ <addedToClasspath>true</addedToClasspath>
+ </configuration>
+ </component>
+
+ <component>
+ <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+ <role-hint>test-jar</role-hint>
+ <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
+ <configuration>
+ <classifier>tests</classifier>
+ <extension>jar</extension>
+ <type>test-jar</type>
+ <packaging>jar</packaging>
+ <language>java</language>
+ <addedToClasspath>true</addedToClasspath>
+ </configuration>
+ </component>
+
+ <component>
+ <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+ <role-hint>maven-plugin</role-hint>
+ <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
+ <configuration>
+ <type>maven-plugin</type>
+ <extension>jar</extension>
+ <language>java</language>
+ <addedToClasspath>true</addedToClasspath>
+ </configuration>
+ </component>
+
+ <component>
+ <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+ <role-hint>pom</role-hint>
+ <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
+ <configuration>
+ <type>pom</type>
+ </configuration>
+ </component>
+
+ <component>
+ <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+ <role-hint>java-source</role-hint>
+ <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
+ <configuration>
+ <classifier>sources</classifier>
+ <type>java-source</type>
+ <extension>jar</extension>
+ <language>java</language>
+ <addedToClasspath>false</addedToClasspath>
+ </configuration>
+ </component>
+
+ <component>
+ <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+ <role-hint>javadoc</role-hint>
+ <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
+ <configuration>
+ <classifier>javadoc</classifier>
+ <type>javadoc</type>
+ <extension>jar</extension>
+ <language>java</language>
+ <addedToClasspath>true</addedToClasspath>
+ </configuration>
+ </component>
+
+ <component>
+ <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+ <role-hint>war</role-hint>
+ <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
+ <configuration>
+ <type>war</type>
+ <includesDependencies>true</includesDependencies>
+ <language>java</language>
+ <addedToClasspath>false</addedToClasspath>
+ </configuration>
+ </component>
+
+ <component>
+ <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+ <role-hint>ear</role-hint>
+ <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
+ <configuration>
+ <type>ear</type>
+ <includesDependencies>true</includesDependencies>
+ <language>java</language>
+ <addedToClasspath>false</addedToClasspath>
+ </configuration>
+ </component>
+
+ <component>
+ <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+ <role-hint>ejb-client</role-hint>
+ <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
+ <configuration>
+ <type>ejb-client</type>
+ <extension>jar</extension>
+ <packaging>ejb</packaging>
+ <classifier>client</classifier>
+ <language>java</language>
+ <addedToClasspath>true</addedToClasspath>
+ </configuration>
+ </component>
+
+ <component>
+ <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+ <role-hint>par</role-hint>
+ <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
+ <configuration>
+ <type>par</type>
+ <language>java</language>
+ <addedToClasspath>true</addedToClasspath>
+ </configuration>
+ </component>
+
+ <component>
+ <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+ <role-hint>ejb3</role-hint>
+ <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
+ <configuration>
+ <type>ejb3</type>
+ <language>java</language>
+ <addedToClasspath>true</addedToClasspath>
+ </configuration>
+ </component>
+
+ <component>
+ <role>org.apache.maven.artifact.factory.ArtifactFactory</role>
+ <implementation>org.apache.maven.artifact.factory.DefaultArtifactFactory</implementation>
+ <requirements>
+ <requirement>
+ <role>org.apache.maven.artifact.handler.manager.ArtifactHandlerManager</role>
+ </requirement>
+ </requirements>
+ </component>
+
+ <component>
+ <role>org.apache.maven.artifact.resolver.ArtifactCollector</role>
+ <implementation>org.apache.maven.artifact.resolver.DefaultArtifactCollector</implementation>
+ </component>
+ </components>
+</component-set>
Propchange: maven/plugins/trunk/maven-shade-plugin/src/test/projects/test-project/src/main/resources/META-INF/plexus/components.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-shade-plugin/src/test/projects/test-project/src/test/java/org/apache/maven/plugins/shade/AppTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/test/projects/test-project/src/test/java/org/apache/maven/plugins/shade/AppTest.java?rev=640405&r1=640404&r2=640405&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/test/projects/test-project/src/test/java/org/apache/maven/plugins/shade/AppTest.java (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/test/projects/test-project/src/test/java/org/apache/maven/plugins/shade/AppTest.java Mon Mar 24 06:17:58 2008
@@ -1,56 +1,56 @@
-/*
- * 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.
- */
-package org.apache.maven.plugins.shade;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Unit test for simple App.
- */
-public class AppTest
- extends TestCase
-{
- /**
- * Create the test case
- *
- * @param testName name of the test case
- */
- public AppTest( String testName )
- {
- super( testName );
- }
-
- /**
- * @return the suite of tests being tested
- */
- public static Test suite()
- {
- return new TestSuite( AppTest.class );
- }
-
- /**
- * Rigourous Test :-)
- */
- public void testApp()
- {
- assertTrue( true );
- }
-}
+/*
+ * 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.
+ */
+package org.apache.maven.plugins.shade;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public AppTest( String testName )
+ {
+ super( testName );
+ }
+
+ /**
+ * @return the suite of tests being tested
+ */
+ public static Test suite()
+ {
+ return new TestSuite( AppTest.class );
+ }
+
+ /**
+ * Rigourous Test :-)
+ */
+ public void testApp()
+ {
+ assertTrue( true );
+ }
+}
Propchange: maven/plugins/trunk/maven-shade-plugin/src/test/projects/test-project/src/test/java/org/apache/maven/plugins/shade/AppTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-shade-plugin/static-remapper.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/static-remapper.txt?rev=640405&r1=640404&r2=640405&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/static-remapper.txt (original)
+++ maven/plugins/trunk/maven-shade-plugin/static-remapper.txt Mon Mar 24 06:17:58 2008
@@ -1,62 +1,62 @@
- /*
- ClassVisitor cv = null;
- Remapper remapper = null;
-
- RemappingClassAdapter a = new RemappingClassAdapter( cv, remapper )
- {
- protected MethodVisitor createRemappingMethodAdapter( int access,
- String newDesc,
- MethodVisitor mv )
- {
- final MethodVisitor rmv = super.createRemappingMethodAdapter( access, newDesc, mv );
- return new MethodNode()
- {
- public void visitEnd()
- {
- Analyzer an = new Analyzer( new SourceInterpreter() );
- try
- {
- Frame[] frames = an.analyze( className, this );
- // Elements of the frames array now contains info for each instruction
- // from the analyzed method.
- for ( int i = 0; i < frames.length; i++ )
- {
- Frame frame = frames[i];
- AbstractInsnNode insn = instructions.get( i );
- if ( insn.getOpcode() == Opcodes.INVOKEVIRTUAL )
- {
- MethodInsnNode minsn = (MethodInsnNode) insn;
- if ( minsn.name.equals( "getResource" ) && minsn.owner.equals( "java/lang/Class" ) )
- {
- // now check where params come from (top of the stack)
- SourceValue value = (SourceValue) frames[i].getStack( 0 );
- Set sources = value.insns; // instructions that produced this value
- for ( Iterator it = sources.iterator(); it.hasNext(); )
- {
- AbstractInsnNode source = (AbstractInsnNode) it.next();
- if ( source.getOpcode() == Opcodes.LDC )
- {
- LdcInsnNode constant = (LdcInsnNode) source;
- // can change constant.cst value here
- }
- else
- {
- // can log something about value that came not from the constant
- }
- }
- }
- }
- }
- // got your mapping. can remap now. replaying recorded method
- accept( rmv );
- }
- catch ( AnalyzerException ex )
- {
- // TODO Auto-generated catch block
- ex.printStackTrace();
- }
- }
- };
- }
- };
+ /*
+ ClassVisitor cv = null;
+ Remapper remapper = null;
+
+ RemappingClassAdapter a = new RemappingClassAdapter( cv, remapper )
+ {
+ protected MethodVisitor createRemappingMethodAdapter( int access,
+ String newDesc,
+ MethodVisitor mv )
+ {
+ final MethodVisitor rmv = super.createRemappingMethodAdapter( access, newDesc, mv );
+ return new MethodNode()
+ {
+ public void visitEnd()
+ {
+ Analyzer an = new Analyzer( new SourceInterpreter() );
+ try
+ {
+ Frame[] frames = an.analyze( className, this );
+ // Elements of the frames array now contains info for each instruction
+ // from the analyzed method.
+ for ( int i = 0; i < frames.length; i++ )
+ {
+ Frame frame = frames[i];
+ AbstractInsnNode insn = instructions.get( i );
+ if ( insn.getOpcode() == Opcodes.INVOKEVIRTUAL )
+ {
+ MethodInsnNode minsn = (MethodInsnNode) insn;
+ if ( minsn.name.equals( "getResource" ) && minsn.owner.equals( "java/lang/Class" ) )
+ {
+ // now check where params come from (top of the stack)
+ SourceValue value = (SourceValue) frames[i].getStack( 0 );
+ Set sources = value.insns; // instructions that produced this value
+ for ( Iterator it = sources.iterator(); it.hasNext(); )
+ {
+ AbstractInsnNode source = (AbstractInsnNode) it.next();
+ if ( source.getOpcode() == Opcodes.LDC )
+ {
+ LdcInsnNode constant = (LdcInsnNode) source;
+ // can change constant.cst value here
+ }
+ else
+ {
+ // can log something about value that came not from the constant
+ }
+ }
+ }
+ }
+ }
+ // got your mapping. can remap now. replaying recorded method
+ accept( rmv );
+ }
+ catch ( AnalyzerException ex )
+ {
+ // TODO Auto-generated catch block
+ ex.printStackTrace();
+ }
+ }
+ };
+ }
+ };
*/
Propchange: maven/plugins/trunk/maven-shade-plugin/static-remapper.txt
------------------------------------------------------------------------------
svn:eol-style = native