Bug 268116 - Some of the AspectJ project settings are ignored when running headless
Summary: Some of the AspectJ project settings are ignored when running headless
Status: NEW
Alias: None
Product: AJDT
Classification: Tools
Component: Core (show other bugs)
Version: 1.6.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: AJDT-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-11 10:21 EDT by Vladimir Piskarev CLA
Modified: 2010-04-28 19:20 EDT (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 Vladimir Piskarev CLA 2009-03-11 10:21:17 EDT
Build ID: M20080911-1700

Steps To Reproduce:
When running headless (i.e. without o.e.ajdt.ui) AJDT builder ignores "-X" project settings (e.g. "-XhasMember", "Xlint:adviceDidNotMatch").

More information:
It is caused by CoreCompilerConfiguration#getNonStandardOptions() always returning "". The "real" implementation is in UICompilerConfiguration. But it seems to have nothing to do with "UI"?
Comment 1 Andrew Eisenberg CLA 2009-03-12 18:37:03 EDT
Yes.  These preferences are stored in the o.e.ajdt.ui preference store.  I agree that the nonstandard options should be stored in core preferences.  

However, there may be a workaround if you specify the preferences in an aop.xml (for AJDT 1.6.4+ only).  I will find out if this is true and how to do it and get back to you.
Comment 2 Andrew Eisenberg CLA 2009-03-14 12:18:10 EDT
Try creating an aop.xml with the following contents.  I am not sure if the current version of AspectJ in AJDT uses the aop.xml for compile time weaving, but if not, it will be soon.

<aspectj>
<weaver options="-XhasMember -Xlint:adviceDidNotMatch" />
</aspectj>


Since the current version of AJDT is improperly divided between core and ui, the best solution might be to provide a different mechanism for specifying non standard ajc options.  Will look into this for 1.6.5.
Comment 3 Andrew Clement CLA 2009-03-14 15:01:51 EDT
The enhancement to support using aop.xml configured compilation is bug 124460.

I don't believe AJDT implements the necessary interface properly to pass aop.xml files across to the compiler.  And the compiler will not process the weaver part of the aop.xml file at the moment.  As the enhancement remarks, the only part supported is the <aspect> tag within the <aspects> section.

<aspectj>
 <aspects>
  <aspect name="A" scope="B"/>
 </aspects>
</aspectj>
Comment 4 Andrew Eisenberg CLA 2009-03-14 17:02:38 EDT
OK.  I misunderstood the enhancement request.  This is not expected to be handled by aop.xml.  Vladimir, you may want to raise another enhancement request for that.

It also makes sense for a non-UI version of AJDT to be able to specify all project settings.
Comment 5 Andrew Eisenberg CLA 2009-09-30 14:37:31 EDT
Move to the 2.0.2 release.
Comment 6 Andrew Eisenberg CLA 2010-04-28 19:20:31 EDT
No longer slated for the next release.