geronimo-xbean-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r778900 - in /geronimo/xbean/trunk: ./ xbean-asm-shaded/ xbean-finder-shaded/ xbean-finder/ xbean-finder/src/main/java/org/apache/xbean/finder/ xbean-reflect-shaded/ xbean-reflect/ xbean-reflect/src/main/java/org/apache/xbean/recipe/
Date Tue, 26 May 2009 21:47:38 GMT
Author: djencks
Date: Tue May 26 21:47:37 2009
New Revision: 778900

URL: http://svn.apache.org/viewvc?rev=778900&view=rev
Log:
XBEAN-128 alternate shading scheme that provides xbean jars that don't use the shaded asm
classes

Added:
    geronimo/xbean/trunk/xbean-finder-shaded/
      - copied from r778787, geronimo/xbean/trunk/xbean-asm-shaded/
    geronimo/xbean/trunk/xbean-reflect-shaded/
      - copied from r778787, geronimo/xbean/trunk/xbean-asm-shaded/
Modified:
    geronimo/xbean/trunk/pom.xml
    geronimo/xbean/trunk/xbean-asm-shaded/pom.xml
    geronimo/xbean/trunk/xbean-finder-shaded/pom.xml
    geronimo/xbean/trunk/xbean-finder/pom.xml
    geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/ClassFinder.java
    geronimo/xbean/trunk/xbean-reflect-shaded/pom.xml
    geronimo/xbean/trunk/xbean-reflect/pom.xml
    geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/AsmParameterNameLoader.java

Modified: geronimo/xbean/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/pom.xml?rev=778900&r1=778899&r2=778900&view=diff
==============================================================================
--- geronimo/xbean/trunk/pom.xml (original)
+++ geronimo/xbean/trunk/pom.xml Tue May 26 21:47:37 2009
@@ -244,6 +244,11 @@
         <pluginManagement>
             <plugins>
                 <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-shade-plugin</artifactId>
+                    <version>1.2.1</version>
+                </plugin>
+                <plugin>
                     <groupId>org.apache.xbean</groupId>
                     <artifactId>maven-xbean-plugin</artifactId>
                     <version>${pom.version}</version>
@@ -271,16 +276,6 @@
 
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-idea-plugin</artifactId>
-                <configuration>
-                    <jdkName>1.5</jdkName>
-                     <jdkLevel>1.5</jdkLevel>
-                    <linkModules>true</linkModules>
-                </configuration>
-            </plugin>
-            
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-release-plugin</artifactId>
                 <version>2.0-beta-7</version>
                 <configuration>
@@ -416,6 +411,8 @@
         <module>xbean-telnet</module>
         <module>maven-xbean-plugin</module>
         <module>xbean-asm-shaded</module>
+        <module>xbean-finder-shaded</module>
+        <module>xbean-reflect-shaded</module>
     </modules>
     
     <repositories>

Modified: geronimo/xbean/trunk/xbean-asm-shaded/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-asm-shaded/pom.xml?rev=778900&r1=778899&r2=778900&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-asm-shaded/pom.xml (original)
+++ geronimo/xbean/trunk/xbean-asm-shaded/pom.xml Tue May 26 21:47:37 2009
@@ -54,23 +54,6 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <goals>
-              <goal>run</goal>
-	    </goals>
-            <configuration>
-              <tasks>
-                <unzip src="${project.build.directory}/xbean-asm-shaded-${pom.version}.jar"
dest="${project.build.directory}/classes" />
-	      </tasks>
-	    </configuration>
-	  </execution>
-	</executions>
-      </plugin>
     </plugins>
   </build>
   <dependencies>

Modified: geronimo/xbean/trunk/xbean-finder-shaded/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-finder-shaded/pom.xml?rev=778900&r1=778787&r2=778900&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-finder-shaded/pom.xml (original)
+++ geronimo/xbean/trunk/xbean-finder-shaded/pom.xml Tue May 26 21:47:37 2009
@@ -29,9 +29,9 @@
     <groupId>org.apache.xbean</groupId>
     <version>3.6-SNAPSHOT</version>
   </parent>
-  <artifactId>xbean-asm-shaded</artifactId>
+  <artifactId>xbean-finder-shaded</artifactId>
   <packaging>bundle</packaging>
-  <name>Apache XBean :: ASM shaded (repackaged)</name>
+  <name>Apache XBean :: Finder shaded (repackaged)</name>
   <build>
     <plugins>
       <plugin>
@@ -50,39 +50,39 @@
                   <shadedPattern>org.apache.xbean.asm</shadedPattern>
                 </relocation>
               </relocations>
+              <!-- this doesn't seem to work... what am I doing wrong? -->
+              <artifactSet>
+                <excludes>
+                  <exclude>org.apache.xbean:xbean-asm-shaded</exclude>
+                </excludes>
+              </artifactSet>
             </configuration>
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <goals>
-              <goal>run</goal>
-	    </goals>
-            <configuration>
-              <tasks>
-                <unzip src="${project.build.directory}/xbean-asm-shaded-${pom.version}.jar"
dest="${project.build.directory}/classes" />
-	      </tasks>
-	    </configuration>
-	  </execution>
-	</executions>
-      </plugin>
     </plugins>
   </build>
   <dependencies>
     <dependency>
-      <groupId>asm</groupId>
-      <artifactId>asm</artifactId>
-      <version>3.1</version>
-    </dependency>
-    <dependency>
-      <groupId>asm</groupId>
-      <artifactId>asm-commons</artifactId>
-      <version>3.1</version>
+      <groupId>org.apache.xbean</groupId>
+      <artifactId>xbean-finder</artifactId>
+      <version>${version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>asm</groupId>
+          <artifactId>asm</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>asm</groupId>
+          <artifactId>asm-commons</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
+    <!-- see above note in shade plugin configuration -->
+    <!--<dependency>-->
+      <!--<groupId>org.apache.xbean</groupId>-->
+      <!--<artifactId>xbean-asm-shaded</artifactId>-->
+      <!--<version>${version}</version>-->
+    <!--</dependency>-->
   </dependencies>
 </project>

Modified: geronimo/xbean/trunk/xbean-finder/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-finder/pom.xml?rev=778900&r1=778899&r2=778900&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-finder/pom.xml (original)
+++ geronimo/xbean/trunk/xbean-finder/pom.xml Tue May 26 21:47:37 2009
@@ -33,11 +33,17 @@
   <packaging>bundle</packaging>
   <name>Apache XBean :: Classpath Resource Finder</name>
   <dependencies>
-    <dependency>
-      <groupId>org.apache.xbean</groupId>
-      <artifactId>xbean-asm-shaded</artifactId>
-      <version>${version}</version>
-      <scope>provided</scope>
-    </dependency>
+      <dependency>
+        <groupId>asm</groupId>
+        <artifactId>asm</artifactId>
+        <version>3.1</version>
+        <scope>provided</scope>
+      </dependency>
+      <dependency>
+        <groupId>asm</groupId>
+        <artifactId>asm-commons</artifactId>
+        <version>3.1</version>
+        <scope>provided</scope>
+      </dependency>
   </dependencies>
 </project>

Modified: geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/ClassFinder.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/ClassFinder.java?rev=778900&r1=778899&r2=778900&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/ClassFinder.java
(original)
+++ geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/ClassFinder.java
Tue May 26 21:47:37 2009
@@ -16,11 +16,11 @@
  */
 package org.apache.xbean.finder;
 
-import org.apache.xbean.asm.AnnotationVisitor;
-import org.apache.xbean.asm.ClassReader;
-import org.apache.xbean.asm.FieldVisitor;
-import org.apache.xbean.asm.MethodVisitor;
-import org.apache.xbean.asm.commons.EmptyVisitor;
+import org.objectweb.asm.AnnotationVisitor;
+import org.objectweb.asm.ClassReader;
+import org.objectweb.asm.FieldVisitor;
+import org.objectweb.asm.MethodVisitor;
+import org.objectweb.asm.commons.EmptyVisitor;
 
 import java.io.File;
 import java.io.IOException;
@@ -152,25 +152,29 @@
         List<Package> packages = new ArrayList<Package>();
         for (Class clazz : classes) {
 
-            Package aPackage = clazz.getPackage();
-            if (aPackage != null && !packages.contains(aPackage)){
-                infos.add(new PackageInfo(aPackage));
-                packages.add(aPackage);
-            }
+            try {
+                Package aPackage = clazz.getPackage();
+                if (aPackage != null && !packages.contains(aPackage)){
+                    infos.add(new PackageInfo(aPackage));
+                    packages.add(aPackage);
+                }
 
-            ClassInfo classInfo = new ClassInfo(clazz);
-            infos.add(classInfo);
-            classInfos.add(classInfo);
-            for (Method method : clazz.getDeclaredMethods()) {
-                infos.add(new MethodInfo(classInfo, method));
-            }
+                ClassInfo classInfo = new ClassInfo(clazz);
+                infos.add(classInfo);
+                classInfos.add(classInfo);
+                for (Method method : clazz.getDeclaredMethods()) {
+                    infos.add(new MethodInfo(classInfo, method));
+                }
 
-            for (Constructor constructor : clazz.getConstructors()) {
-                infos.add(new MethodInfo(classInfo, constructor));
-            }
+                for (Constructor constructor : clazz.getConstructors()) {
+                    infos.add(new MethodInfo(classInfo, constructor));
+                }
 
-            for (Field field : clazz.getDeclaredFields()) {
-                infos.add(new FieldInfo(classInfo, field));
+                for (Field field : clazz.getDeclaredFields()) {
+                    infos.add(new FieldInfo(classInfo, field));
+                }
+            } catch (NoClassDefFoundError e) {
+                throw new NoClassDefFoundError("Could not fully load class: " + clazz.getName()
+ "\n due to:" + e.getMessage() + "\n in classLoader: \n" + clazz.getClassLoader());
             }
         }
 

Modified: geronimo/xbean/trunk/xbean-reflect-shaded/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-reflect-shaded/pom.xml?rev=778900&r1=778787&r2=778900&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-reflect-shaded/pom.xml (original)
+++ geronimo/xbean/trunk/xbean-reflect-shaded/pom.xml Tue May 26 21:47:37 2009
@@ -29,9 +29,9 @@
     <groupId>org.apache.xbean</groupId>
     <version>3.6-SNAPSHOT</version>
   </parent>
-  <artifactId>xbean-asm-shaded</artifactId>
+  <artifactId>xbean-reflect-shaded</artifactId>
   <packaging>bundle</packaging>
-  <name>Apache XBean :: ASM shaded (repackaged)</name>
+  <name>Apache XBean :: Reflect shaded (repackaged)</name>
   <build>
     <plugins>
       <plugin>
@@ -50,39 +50,39 @@
                   <shadedPattern>org.apache.xbean.asm</shadedPattern>
                 </relocation>
               </relocations>
+              <!-- this doesn't seem to work... what am I doing wrong? -->
+              <artifactSet>
+                <excludes>
+                  <exclude>org.apache.xbean:xbean-asm-shaded</exclude>
+                </excludes>
+              </artifactSet>
             </configuration>
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <goals>
-              <goal>run</goal>
-	    </goals>
-            <configuration>
-              <tasks>
-                <unzip src="${project.build.directory}/xbean-asm-shaded-${pom.version}.jar"
dest="${project.build.directory}/classes" />
-	      </tasks>
-	    </configuration>
-	  </execution>
-	</executions>
-      </plugin>
     </plugins>
   </build>
   <dependencies>
     <dependency>
-      <groupId>asm</groupId>
-      <artifactId>asm</artifactId>
-      <version>3.1</version>
-    </dependency>
-    <dependency>
-      <groupId>asm</groupId>
-      <artifactId>asm-commons</artifactId>
-      <version>3.1</version>
+      <groupId>org.apache.xbean</groupId>
+      <artifactId>xbean-reflect</artifactId>
+      <version>${version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>asm</groupId>
+          <artifactId>asm</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>asm</groupId>
+          <artifactId>asm-commons</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
+    <!-- see above note in shade plugin configuration -->
+    <!--<dependency>-->
+      <!--<groupId>org.apache.xbean</groupId>-->
+      <!--<artifactId>xbean-asm-shaded</artifactId>-->
+      <!--<version>${version}</version>-->
+    <!--</dependency>-->
   </dependencies>
 </project>

Modified: geronimo/xbean/trunk/xbean-reflect/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-reflect/pom.xml?rev=778900&r1=778899&r2=778900&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-reflect/pom.xml (original)
+++ geronimo/xbean/trunk/xbean-reflect/pom.xml Tue May 26 21:47:37 2009
@@ -33,13 +33,18 @@
   <packaging>bundle</packaging>
   <name>Apache XBean :: Reflect</name>
   <dependencies>
-    <dependency>
-      <groupId>org.apache.xbean</groupId>
-      <artifactId>xbean-asm-shaded</artifactId>
-      <version>${version}</version>
-      <scope>provided</scope>
-      <optional>true</optional>
-    </dependency>
+      <dependency>
+        <groupId>asm</groupId>
+        <artifactId>asm</artifactId>
+        <version>3.1</version>
+        <scope>provided</scope>
+      </dependency>
+      <dependency>
+        <groupId>asm</groupId>
+        <artifactId>asm-commons</artifactId>
+        <version>3.1</version>
+        <scope>provided</scope>
+      </dependency>
     <dependency>
       <groupId>log4j</groupId>
       <artifactId>log4j</artifactId>

Modified: geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/AsmParameterNameLoader.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/AsmParameterNameLoader.java?rev=778900&r1=778899&r2=778900&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/AsmParameterNameLoader.java
(original)
+++ geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/AsmParameterNameLoader.java
Tue May 26 21:47:37 2009
@@ -30,11 +30,11 @@
 import java.util.WeakHashMap;
 import java.util.Arrays;
 
-import org.apache.xbean.asm.ClassReader;
-import org.apache.xbean.asm.Label;
-import org.apache.xbean.asm.MethodVisitor;
-import org.apache.xbean.asm.Type;
-import org.apache.xbean.asm.commons.EmptyVisitor;
+import org.objectweb.asm.ClassReader;
+import org.objectweb.asm.Label;
+import org.objectweb.asm.MethodVisitor;
+import org.objectweb.asm.Type;
+import org.objectweb.asm.commons.EmptyVisitor;
 
 /**
  * Implementation of ParameterNameLoader that uses ASM to read the parameter names from the
local variable table in the



Mime
View raw message