export CATALINA_OPTS="$CATALINA_OPTS -javaagent:/tmp/aspectjweaver.jar -Daj.weaving.loadersToSkip=org.apache.felix.framework.ModuleImpl$ModuleClassLoader,org.springframework.osgi.util.BundleDelegatingClassLoader"
ModuleClassLoader@6e662159] info AspectJ Weaver Version DEVELOPMENT built on Tuesday Jul 30, 2013 at 14:56:29 GMT
[ModuleClassLoader@6e662159] info register classloader org.apache.felix.framework.ModuleImpl$ModuleClassLoader@6e662159
[ModuleClassLoader@6e662159] info using configuration file:/Library/Tomcat/apache-tomcat-6.0.35-jira/webapps/jira/WEB-INF/lib/ia-aspects-0.0.1-SNAPSHOT.jar!/META-INF/aop.xml
[ModuleClassLoader@6e662159] info no longer creating weavers for these classloaders: [org.apache.felix.framework.ModuleImpl, org.springframework.osgi.util.BundleDelegatingClassLoader]
that the info message about what it is excluding clearly has lost the ModuleClassLoader piece, presumably evaluating $ModuleClassLoader on the way in to be blank. When you tried with escaping the dollar did you get the info message in aspectj to name the right classloader?
There is no way to specify inclusion only for classloaders. This new skipping loaders feature would be what you need to avoid a classloader you want to ignore. I guess I need to add a testcase for classloaders that are nested classes.
Andy