[
http://jira.jboss.com/jira/browse/JBAOP-355?page=comments#action_12352241 ]
Kabir Khan commented on JBAOP-355:
----------------------------------
Kabir Khan wrote:
> <snip>
>
>>> aopclasspath -- Huh???
>> A folder to the annotated classes
>
> How is that different from src or classpath?
By default we do not browse for annotations (it is time-consuming to
look inside every file), so if you have annotations you want parsed
you need to specify them.
OK, that makes sense. When I reread the doc and actually followed the link to the
"Annotation Bindings" chapter I figured that was it. ;) But this is confusing:
"aopclasspath - This should mirror your class path and contain all
JARs/directories..."
The "mirror class path" thing threw me off, as to me "mirror" implies
"duplicate". Perhaps
"aopclasspath -- A subset of the JARs/directories in classpath or classpathref that
includes all JARs/directories that may have annotated aspects (See Chapter
"Annotation Bindings"). The AOPC compiler will browse each class file in this
path to determine if any of them are annotated with @Aspect. Browsing for annotations is
time consuming, so only classes in the JARs/directories listed in aopclasspath will be
scanned."
The next sentence "This gets used for the jboss.aop.class.path optional system
property which is described in the "Command Line" section." is really
confusing. Is it necessary? (No need to reply to that question.
Or to any of this :) )
btw src, (which I agree is craply named, but created before my time)
specifies the files that you want to transform - there may be a LOT of
other things on the classpath which you do not want to transform...
Yeah, it's pretty clear what it is and how to use it (other than the
docs should say "A directory containing class files to be transformed",
not just "containing files". There's just a mental disconnect because
of the name that I expect affects people looking at the PojoCache
examples.
IIRC you can specify multiple src entries, but I agree using
includes would be nicer
Yep, you can have multiple src entries. You've got includes as well;
it's just that for some reason they are at the same level as src rather
than being nested.
Improve aopc
------------
Key: JBAOP-355
URL:
http://jira.jboss.com/jira/browse/JBAOP-355
Project: JBoss AOP
Issue Type: Task
Security Level: Public(Everyone can see)
Reporter: Kabir Khan
Assigned To: Kabir Khan
Fix For: 2.0.0.alpha3
Hey Kabir,
Some hopefully more constructive inputs on aopc:
1) It appears that if any jboss-aop.xml is on the classpath defined by the
"classpath" element, it gets applied. In the testsuite, I used a broad
classpath, and it picks up a file with the same bindings as the file I name in aoppath.
This causes aopc to fail; javaassist complains about seeing the same field twice. The
workaround is to not specify anything in aoppath. But that's confusing. Seems to me
that if aoppath is used, only bindings specified on the files in that path should be
applied.
2) When trying to figure the above out, I look at the Reference Guide and then get really
confused.
classpath/classpathref -- simple enough.
src -- isn't really source (i.e. .java) it's class files. It's basically a
subset of classpath, right? This isn't spelled out clearly in the docs and the name of
the element is confusing.
aopclasspath -- Huh???
3) Also, having "include" as a nested element within src would be more
consistent with normal ant usage.
Cheers,
Brian Stansberry
Lead, AS Clustering
JBoss, a division of Red Hat
Ph: 510-396-3864
skype: bstansberry
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira