Am stuck - I need to pass -noverify to my build for one module, but another module requires that it not be there.
I'm running into a problem with my build which includes an AspectJ 1.8
module, and not sure how to resolve this.
I have a multi-module maven build. One of my modules requires running an
ant task (using the antrun-maven-plugin) with the jvm -noverify flag.
Consequently, I run the entire maven build using the -noverify flag.
But my last module being build is a module of aspects. When I try to
compile & weave using the aspectj-maven-plugin, I get the following error
[ERROR] Failed to execute goal
org.codehaus.mojo:aspectj-maven-plugin:1.10:compile (default) on project
adams-aspects: AJC compiler errors:
[ERROR] abort ABORT -- (BCException) Unable to find Asm for stackmap
generation (Looking for 'aj.org.objectweb.asm.ClassReader'). Stackmap
generation for woven code is required to avoid verify errors on a Java 1.7
or higher runtime
[ERROR] when weaving type webapp.tiles.AthleteBasedForm
[ERROR] when weaving classes
[ERROR] when weaving
[ERROR] when batch building BuildConfig[null] #Files=8 AopXmls=#0
So I'm a bit in a bind. I can't figure out any way to reconcile both
requirements - that module1 needs to run an antrun plugin with the
-noverify parameter, and the aspectj plugin that needs to run it without.
I've looked to see if there is any way to fork either plugin, but don't see
an ability to do that.
Is there some way I can fork the antrun plugin and append the -noverify
parameter to the jvm params? I've looked at updating the build.xml, but it
uses a custom Taskdef, so I'm not 100% how that can be done.