-Djboss.modules.system.pkgs=org.jboss.byteman,org.aspectj,test.aspectj,org.jboss.logmanager
-javaagent:c:/dev/tmp/jboss-eap-7.0.0/modules/system/layers/base/org/aspectj/main/aspectjweaver-1.8.10.jar
-Dorg.aspectj.weaver.showWeaveInfo=true"
-Dorg.aspectj.weaver.loadtime.configuration=file:c:/tmp/poc/aop.xml
-cp C:/dev/Projects/jms/mixed-arch/ear-app/aspectj/target/aspectj-0.0.1-SNAPSHOT.jar
So in it, I've defined an additional classpath pointing to my aspectj.jar file. My /tmp/poc/aop.xml contains the aspect definition of "test.aspectj.TestAspect".
I can now see that the AJ agent is looking for test.aspectj.TestAspect class. But it still isn't able to find it; I get the following errors thrown my the AspectJ Weaver:
2017-10-26 12:11:39,889 ERROR [stderr] (MSC service thread 1-7) [ModuleClassLoader@336f62a1] info register aspect test.aspectj.TestAspect
2017-10-26 12:11:54,632 ERROR [stderr] (MSC service thread 1-7) [ModuleClassLoader@336f62a1] error The specified aspect 'test.aspectj.TestAspect' cannot be found
I've confirmed that my class (test.aspectj.TestAspect) is indeed in the aspectj-0.0.1-SNAPSHOT.jar.
So I get the impression that the aspectj-SNAPSHOT jar is not being made visible to the individual module classloaders. I've tried to debug the weaver, and can see that it does indeed do the following:
private URL toURL(String className) {
URL url = "" nameMap.get(className);
if (url == null) {
String classFile = className.replace('.', '/');
url = "" class="">Resource(classFile + ".class");
nameMap.put(className, url);
}
return url;
}