Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimone Bordet2014-10-17 09:51:36 +0000
committerSimone Bordet2014-10-17 09:51:36 +0000
commitf6eb19396a87a762d121f828b2ef308683929816 (patch)
treec63acfffdcc0fc665df6855945614849d3a2beea
parentd05a6e690284b7b460eeaa9cd5acadd30271d58c (diff)
downloadorg.eclipse.jetty.project-f6eb19396a87a762d121f828b2ef308683929816.tar.gz
org.eclipse.jetty.project-f6eb19396a87a762d121f828b2ef308683929816.tar.xz
org.eclipse.jetty.project-f6eb19396a87a762d121f828b2ef308683929816.zip
Updated jetty-annotation module to use ASM 5, to support JDK 8.
-rw-r--r--jetty-aggregate/jetty-all-server/pom.xml4
-rw-r--r--jetty-annotations/pom.xml8
-rw-r--r--jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java18
-rw-r--r--jetty-distribution/pom.xml19
-rw-r--r--pom.xml11
5 files changed, 42 insertions, 18 deletions
diff --git a/jetty-aggregate/jetty-all-server/pom.xml b/jetty-aggregate/jetty-all-server/pom.xml
index 9642c2446f..31f9d0ca5d 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 3ef66b4ac3..57cfe9d952 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 a6d394cfc4..24ce26ad2d 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.util.resource.Resource;
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 @@ public class AnnotationParser
*
* 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 @@ public class AnnotationParser
*
* ASM visitor for a class.
*/
- public class MyClassVisitor extends EmptyVisitor
+ public class MyClassVisitor extends ClassVisitor
{
String _className;
int _access;
@@ -363,6 +365,10 @@ public class AnnotationParser
String[] _interfaces;
int _version;
+ public MyClassVisitor()
+ {
+ super(Opcodes.ASM5);
+ }
public void visit (int version,
final int access,
@@ -429,7 +435,7 @@ public class AnnotationParser
final String[] exceptions)
{
- return new EmptyVisitor ()
+ return new MethodVisitor(Opcodes.ASM5)
{
public AnnotationVisitor visitAnnotation(String desc, boolean visible)
{
@@ -463,7 +469,7 @@ public class AnnotationParser
final Object value)
{
- return new EmptyVisitor ()
+ return new FieldVisitor(Opcodes.ASM5)
{
public AnnotationVisitor visitAnnotation(String desc, boolean visible)
{
@@ -907,7 +913,7 @@ public class AnnotationParser
* <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 431f67b076..6229cd8d80 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 2f1a3d3420..18908b3b5a 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>

Back to the top