[jboss-user] [JBoss AOP] - Re: org.apache.xml excluded from precompilation?

Tom Cunningham do-not-reply at jboss.com
Wed Sep 19 11:15:37 EDT 2012

Tom Cunningham [https://community.jboss.org/people/tcunning] created the discussion

"Re: org.apache.xml excluded from precompilation?"

To view the discussion, visit: https://community.jboss.org/message/760398#760398


Thanks for the reply - I took a look, and I'm pretty sure the format I'm using is correct for an ant build.xml - it doesn't work the other way around and I see the code in AopC.java (logAndAddFilesToCompile) where it is specifically looking for file names ending in .class rather than package name/class name.

Just in case anyone runs into something like this in the future where they want to advise a class that's in the list of packages that are specifically excluded, here's how I solved it : 

                <aopc compilerclasspathref="build.classpath" verbose="true">
                        <classpath path="${aopc.xbean.classes.dir}"/>
                        <src path="${aopc.xbean.classes.dir}"/>
                        <include name="org/apache/xmlbeans/impl/store/Xobj.class"/>
                        <sysproperty key="jboss.aop.include" value="org.apache.xmlbeans.impl.store.Xobj"/>

                        <aoppath path="${aop.resources.dir}/META-INF/jboss-aop.xml"/>
                        <aopclasspath path="${aop.classes.dir}"/>

Adding the <sysproperty/> line gets the jboss.aop.include passed into AopC.java's system property which are passed through java on to Compiler.java and then into AspectManager.java's list of specifically included classes.

Reply to this message by going to Community

Start a new discussion in JBoss AOP at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120919/0a068712/attachment-0001.html 

More information about the jboss-user mailing list