Bug 131728 - [plan] [ltw] Cannot use concrete-aspect with LTW launcher
Summary: [plan] [ltw] Cannot use concrete-aspect with LTW launcher
Status: NEW
Alias: None
Product: AJDT
Classification: Tools
Component: Core (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: 2.1.2   Edit
Assignee: AJDT-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-14 11:14 EST by Matthew Webster CLA
Modified: 2010-12-08 19:59 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Webster CLA 2006-03-14 11:14:16 EST
It is possible to edit the aop.xml generated by the launcher, to add a <weaver> section and options for example, but if a <concrete-aspect> element is added to the <aspects> section it will be removed when the launcher is run.

One solution would be to allow the user to supply their own aop.xml which will be automatically merged with the generated one by LTW. But having multiple META-INF/aop.xml files is problematic: it can cause warnings and because they are copied to the output folder, where they are on the classpath and picked by LTW, they can be overwritten. But using the System property "org.aspectj.weaver.loadtime.configuration" (see ClassLoaderWeavingAdaptor) allows multiple configuration files with different names. For example AJDT could generate aop.xml containing a warning that it should not be changed and create an empty user-aop.xml which the user is free to edit. The launcher would then simply add the follow to VM arguments:

-Dorg.aspectj.weaver.loadtime.configuration=META-INF/user-aop.xml;META-INF/aop.xml

The only drawback with this approach occurs when the user exports their application. They would either need to use this option themselves when launching the JVM or merge the aop.xml files by hand. An alternative approach would be to allow one aop.xml file to include another.
Comment 1 Andrew Eisenberg CLA 2009-02-13 17:46:58 EST
Will become more important when we start focusing on LTW support.
Comment 2 Andrew Eisenberg CLA 2009-06-08 17:13:35 EDT
Won't get to this for 2.0.
Comment 3 Andrew Eisenberg CLA 2009-09-30 14:37:43 EDT
Move to the 2.0.2 release.
Comment 4 Andrew Eisenberg CLA 2010-04-28 19:20:52 EDT
No longer slated for the next release.