Updated jetty-annotation module to use ASM 5, to support JDK 8.
diff --git a/jetty-aggregate/jetty-all-server/pom.xml b/jetty-aggregate/jetty-all-server/pom.xml
index 9642c24..31f9d0c 100644
--- a/jetty-aggregate/jetty-all-server/pom.xml
+++ b/jetty-aggregate/jetty-all-server/pom.xml
@@ -100,8 +100,8 @@
javax.xml.parsers,
javax.net.ssl,
!org.mortbay.*,
- org.objectweb.asm;version="3.1.0";resolution:=optional,
- org.objectweb.asm.commons;version="3.1.0";resolution:=optional,
+ org.objectweb.asm;version="5.0.1";resolution:=optional,
+ org.objectweb.asm.commons;version="5.0.1";resolution:=optional,
javax.security.auth.message*;resolution:=optional,
*
</Import-Package>
diff --git a/jetty-annotations/pom.xml b/jetty-annotations/pom.xml
index 3ef66b4..57cfe9d 100644
--- a/jetty-annotations/pom.xml
+++ b/jetty-annotations/pom.xml
@@ -102,8 +102,12 @@
<artifactId>javax.annotation</artifactId>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty.orbit</groupId>
- <artifactId>org.objectweb.asm</artifactId>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm-commons</artifactId>
</dependency>
</dependencies>
</project>
diff --git a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java
index a6d394c..24ce26a 100644
--- a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java
+++ b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java
@@ -38,9 +38,10 @@
import org.eclipse.jetty.webapp.JarScanner;
import org.objectweb.asm.AnnotationVisitor;
import org.objectweb.asm.ClassReader;
+import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.FieldVisitor;
import org.objectweb.asm.MethodVisitor;
-import org.objectweb.asm.commons.EmptyVisitor;
+import org.objectweb.asm.Opcodes;
/**
* AnnotationParser
@@ -280,13 +281,14 @@
*
* ASM Visitor for Annotations
*/
- public class MyAnnotationVisitor implements AnnotationVisitor
+ public class MyAnnotationVisitor extends AnnotationVisitor
{
List<Value> _annotationValues;
String _annotationName;
public MyAnnotationVisitor (String annotationName, List<Value> values)
{
+ super(Opcodes.ASM5);
_annotationValues = values;
_annotationName = annotationName;
}
@@ -354,7 +356,7 @@
*
* ASM visitor for a class.
*/
- public class MyClassVisitor extends EmptyVisitor
+ public class MyClassVisitor extends ClassVisitor
{
String _className;
int _access;
@@ -363,6 +365,10 @@
String[] _interfaces;
int _version;
+ public MyClassVisitor()
+ {
+ super(Opcodes.ASM5);
+ }
public void visit (int version,
final int access,
@@ -429,7 +435,7 @@
final String[] exceptions)
{
- return new EmptyVisitor ()
+ return new MethodVisitor(Opcodes.ASM5)
{
public AnnotationVisitor visitAnnotation(String desc, boolean visible)
{
@@ -463,7 +469,7 @@
final Object value)
{
- return new EmptyVisitor ()
+ return new FieldVisitor(Opcodes.ASM5)
{
public AnnotationVisitor visitAnnotation(String desc, boolean visible)
{
@@ -907,7 +913,7 @@
* <li> it isn't a dot file or in a hidden directory </li>
* <li> the name of the class at least begins with a valid identifier for a class name </li>
* </ul>
- * @param path
+ * @param name
* @return
*/
private boolean isValidClassFileName (String name)
diff --git a/jetty-distribution/pom.xml b/jetty-distribution/pom.xml
index 431f67b..6229cd8 100644
--- a/jetty-distribution/pom.xml
+++ b/jetty-distribution/pom.xml
@@ -158,7 +158,20 @@
</goals>
<configuration>
<includeGroupIds>org.eclipse.jetty.orbit</includeGroupIds>
- <includeArtifactIds>javax.annotation,org.objectweb.asm</includeArtifactIds>
+ <includeArtifactIds>javax.annotation,org.ow2.asm</includeArtifactIds>
+ <includeTypes>jar</includeTypes>
+ <outputDirectory>${assembly-directory}/lib/annotations</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-lib-asm-deps</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <includeGroupIds>org.ow2.asm</includeGroupIds>
+ <includeArtifactIds>asm,asm-commons</includeArtifactIds>
<includeTypes>jar</includeTypes>
<outputDirectory>${assembly-directory}/lib/annotations</outputDirectory>
</configuration>
@@ -292,10 +305,6 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.orbit</groupId>
- <artifactId>org.objectweb.asm</artifactId>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty.orbit</groupId>
<artifactId>javax.activation</artifactId>
</dependency>
<dependency>
diff --git a/pom.xml b/pom.xml
index 2f1a3d3..18908b3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -386,9 +386,14 @@
<version>1.1.0.v201108011116</version>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty.orbit</groupId>
- <artifactId>org.objectweb.asm</artifactId>
- <version>3.1.0.v200803061910</version>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm</artifactId>
+ <version>5.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm-commons</artifactId>
+ <version>5.0.1</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.orbit</groupId>