Bug 73369 - Create a jar file that can be used for load-time weaving...
Summary: Create a jar file that can be used for load-time weaving...
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.2.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 1.2.1   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-07 10:13 EDT by Adrian Colyer CLA
Modified: 2004-10-21 09:09 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Colyer CLA 2004-09-07 10:13:16 EDT
Several folks have asked for a jar file as part of the aspectj distribution that 
contains just the subset of aspectjtools.jar needed for load-time weaving. 

I've got a patch for build/build.xml (non-committed) that creates this 
(aspectjwt.jar - the name could be changed) and have verified that this 
lighter-weight jar (1.1MB vs 6MB) does indeed contain everything that is needed.

Three questions for us to resolve:
1) Do we want to do this?  [the presence of a number of requests leads me to 
think yes]
2) What is the right name for the jar? I've called it aspectjwt.jar by default.
3) How should it be packaged and distributed? I've included it for now as part 
of the AspectJ distribution (ie. it gets installed in the ASPECTJ_HOME/lib dir) 
- another option would be a separate download from the AspectJ site for those 
that want it, but this would mean more maintenance work on the download page.
 
Oh, and I suppose a fourth question:
4) Currently aspectjwt.jar duplicates contents in aspectjtools.jar. I am not 
proposing to remove content from aspectjtools.jar because that would require all 
scripts etc. out there (esp. ant build scripts) to put both aspectjtools.jar and 
aspectjwt.jar in their classpath and that change seems to painful to me. If 
someone feels strongly that we should do otherwise I'm prepared to entertain the 
thought.
Comment 1 Arno Schmidmeier CLA 2004-09-07 10:45:23 EDT
Just my comments:

1) Why not, if the work has already been done, and somebody may find that 
usefull
2) Why not call it aspectjltw.jar (Load Time Weaving) instead of aspectjwt.jar?
Or for what abreviation does wt stand for?
3) Packaging it in the standard distribution is fine IMHO.
4) Having only one extra file, which contains everything I need for the ajc 
compiler is IMHO agreat plus. 

Cheers
   Arno
Comment 2 Wes Isberg CLA 2004-09-07 19:09:38 EDT
Yay! (finally?)

1) yes, but
2) I'd prefer the jar target all in-process weaving, one of which is ltw (others
include IDE extensions, etc.), i.e., just the weaver -- henace "aspectj-weaver.jar"?
3) {aspectj}/lib dir is fine, though I still think there should be a main class
that does the launch - j4 -jar aspectj-weaver.jar {normal java command line}.  I
had this at one point and don't recall the objection.
4) Agreed on not stripping aspectjtools.jar until at least a major release.

Also should consider a harness step for ltw just using this jar.

otw, I'd be interested in seeing the build script.  It *should* just involve
building the weaver module with all antecedants (i.e., and require no
custom/wrapper task for fixup) and aliasing in the output, but...
Comment 3 Adrian Colyer CLA 2004-10-21 08:57:34 EDT
Fix checked in to build aspectjweaver.jar. This uses the horrible custom/wrapper
task for fixup (in the style of aspectjtools.jar). Both of these hacks should be
cleaned up in the build script, but I didn't want to hold up 1.2.1 while we do it.

The aj script has been updated to use aspectjweaver.jar in its classpath, as has
the tracing-lt example in docs/examples.
Comment 4 Adrian Colyer CLA 2004-10-21 09:09:57 EDT
forgot to mark as target 1.2.1...