Bug 39842 - allow use of an environment variable to set compiler arguments
Summary: allow use of an environment variable to set compiler arguments
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Ant (show other bugs)
Version: 1.1.0   Edit
Hardware: PC Windows XP
: P2 enhancement (vote)
Target Milestone: 1.1.1   Edit
Assignee: Wes Isberg CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-09 19:31 EDT by Ron Bodkin CLA
Modified: 2003-08-28 08:07 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ron Bodkin CLA 2003-07-09 19:31:03 EDT
I'm trying to create a special jsp compilation servlet in Tomcat 4.x that uses 
the aspectj compiler. I can plug in the compiler adapter, but I don't have 
control of the ant code they use to invoke the compiler, so I'd like to use 
an environment variable to do this (apparently the only mechanism they do 
support).

I'm doing this so I can pass an aspectpath in to weave aspects into the 
compiled jsp servlet.
Comment 1 Wes Isberg CLA 2003-07-26 00:07:24 EDT
Done for 1.1.1.  

To rewrite the command-line arguments, specify an ICommandEditor class name
either in the environment or dynamically in the task invocation.

i.e., implement ICommandEditor in com.company.CommandEditor...

------
package org.aspectj.tools.ant.taskdefs;

public interface ICommandEditor {
    String[] editCommand(String[]);
}
------

define the environment variable on the command line:
  -Dorg.aspectj.tools.ant.taskdefs.AjcTask.COMMAND_EDITOR=com.company.CommandEditor

or specify it in the task invocation:

   <iajc ... commandEditorClass="com.company.CommandEditor"

(task specifications take precedence)

Comment 2 Adrian Colyer CLA 2003-08-28 08:07:51 EDT
updated target milestone field to 1.1.1