Carry own version of asm for those who exclude asm from the net.java.html.boot dependency
1.1 --- a/boot/pom.xml Fri Jan 24 08:59:32 2014 +0100
1.2 +++ b/boot/pom.xml Fri Jan 24 10:18:40 2014 +0100
1.3 @@ -34,7 +34,6 @@
1.4 <dependency>
1.5 <groupId>org.ow2.asm</groupId>
1.6 <artifactId>asm</artifactId>
1.7 - <version>4.1</version>
1.8 <type>jar</type>
1.9 </dependency>
1.10 <dependency>
2.1 --- a/html4j-maven-plugin/pom.xml Fri Jan 24 08:59:32 2014 +0100
2.2 +++ b/html4j-maven-plugin/pom.xml Fri Jan 24 10:18:40 2014 +0100
2.3 @@ -60,11 +60,16 @@
2.4 <version>3.0.2</version>
2.5 <type>jar</type>
2.6 </dependency>
2.7 - <dependency>
2.8 - <groupId>org.testng</groupId>
2.9 - <artifactId>testng</artifactId>
2.10 - <scope>test</scope>
2.11 - <type>jar</type>
2.12 - </dependency>
2.13 + <dependency>
2.14 + <groupId>org.ow2.asm</groupId>
2.15 + <artifactId>asm</artifactId>
2.16 + <type>jar</type>
2.17 + </dependency>
2.18 + <dependency>
2.19 + <groupId>org.testng</groupId>
2.20 + <artifactId>testng</artifactId>
2.21 + <scope>test</scope>
2.22 + <type>jar</type>
2.23 + </dependency>
2.24 </dependencies>
2.25 </project>
3.1 --- a/html4j-maven-plugin/src/main/java/org/apidesign/html/mojo/ProcessJsAnnotationsMojo.java Fri Jan 24 08:59:32 2014 +0100
3.2 +++ b/html4j-maven-plugin/src/main/java/org/apidesign/html/mojo/ProcessJsAnnotationsMojo.java Fri Jan 24 10:18:40 2014 +0100
3.3 @@ -67,6 +67,7 @@
3.4 import org.apache.maven.plugins.annotations.Parameter;
3.5 import org.apache.maven.plugins.annotations.ResolutionScope;
3.6 import org.apache.maven.project.MavenProject;
3.7 +import org.objectweb.asm.ClassReader;
3.8
3.9 @Mojo(
3.10 name="process-js-annotations",
3.11 @@ -86,9 +87,13 @@
3.12 @Override
3.13 public void execute() throws MojoExecutionException, MojoFailureException {
3.14 List<URL> arr = new ArrayList<URL>();
3.15 + boolean foundAsm = false;
3.16 for (Artifact a : prj.getArtifacts()) {
3.17 final File f = a.getFile();
3.18 if (f != null) {
3.19 + if (a.getArtifactId().equals("asm")) {
3.20 + foundAsm = true;
3.21 + }
3.22 try {
3.23 arr.add(f.toURI().toURL());
3.24 } catch (MalformedURLException ex) {
3.25 @@ -96,6 +101,10 @@
3.26 }
3.27 }
3.28 }
3.29 + if (!foundAsm) {
3.30 + URL loc = ClassReader.class.getProtectionDomain().getCodeSource().getLocation();
3.31 + arr.add(loc);
3.32 + }
3.33 URLClassLoader l = new URLClassLoader(arr.toArray(new URL[arr.size()]));
3.34 try {
3.35 processClasses(l, classes);
4.1 --- a/pom.xml Fri Jan 24 08:59:32 2014 +0100
4.2 +++ b/pom.xml Fri Jan 24 10:18:40 2014 +0100
4.3 @@ -185,6 +185,11 @@
4.4 <version>20080701</version>
4.5 </dependency>
4.6 <dependency>
4.7 + <groupId>org.ow2.asm</groupId>
4.8 + <artifactId>asm</artifactId>
4.9 + <version>4.1</version>
4.10 + </dependency>
4.11 + <dependency>
4.12 <groupId>org.netbeans.api</groupId>
4.13 <artifactId>org-netbeans-modules-classfile</artifactId>
4.14 <version>${netbeans.version}</version>