Bug 111788 - [build] Unwanted additional files in aspectjtools.jar
Summary: [build] Unwanted additional files in aspectjtools.jar
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Build (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows XP
: P5 normal (vote)
Target Milestone: ---   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-06 10:57 EDT by Matthew Webster CLA
Modified: 2007-10-23 11:19 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 Matthew Webster CLA 2005-10-06 10:57:07 EDT
A quick look at the latest development version of AspectJ reveals a lot of 
files (.java, .aj, .html, ...) in aspectjtools.jar and asepctjweaver.jar which 
is built from it. This hints at a build process problem that may result in 
shipping what we shouldn't! It's also confusing for users and consumers like 
AJDT because there _are_ non-Java files like the messages properties that are 
required.
Comment 1 Wes Isberg CLA 2005-10-14 21:18:27 EDT
Not true of AspectJ-1.5.0_M4 or aspectj-DEVELOPMENT-20051014210353.jar. (What's
with all these UTR build bugs?)
Comment 2 Andrew Clement CLA 2005-10-28 09:39:32 EDT
Matthew - can you check if this is fixed to your satisfaction in recent
distributions?
Comment 3 Matthew Webster CLA 2005-10-28 10:50:04 EDT
It's much better. There are still a bunch of html files in org.apache.bcel and 
org.eclipse.jdt as well as GIFs. Not sure if we should be including these.
Comment 4 Andrew Clement CLA 2006-05-30 08:55:54 EDT
Build related - we should police what gets into these jars at build/packaging time.
Comment 5 Matthew Webster CLA 2006-07-06 08:11:07 EDT
Solution may lie with Bug 113948.
Comment 6 Wes Isberg CLA 2006-07-07 00:46:30 EDT
Why isn't this bug closed?  Exactly what files are included that shouldn't be?

When jars are assembled, the library jars included are not filtered (on the assumption the authors know what they're doing), and otherwise the included/excluded non-.class files are specified in Builder.properties:
-----------------
# files copied during module jar assembly
resource.pattern=**/*.txt,**/*.rsc,**/*.gif,**/*.properties,**/*.xml,**/*.dtd
# files not filtered when copied during product assembly
binarySource.pattern=**/*.rsc,**/*.gif,**/*.jar,**/*.zip
-----------------
We can update the build to police library jars as well (or at least JDT which is under our control), with these or other patterns.  It would be more work, but doable, to have jar/input-specific patterns.
Comment 7 Matthew Webster CLA 2006-07-07 06:53:43 EDT
The report has not been closed because the bug has not been fixed. Looking in AspectJ 1.5.2 Final I see in both aspectjweaver.jar and aspectjtools.jar several HTML files like

org/apache/bcel/classfile/package.html

In aspectjtools.jar several GIF files like:

org/aspectj/ajde/strucure/resources/adivice.gif

Also

ant_tasks/resources-ant.jar

Now there may be a good reason for their inclusion (although I fail to see one for the HTML files) and the situation was much worse when I open the report. I have 2 reasons to be concerned: 1. JAR bloat; 2. Unexpected files in the deliverable are symptomatic of a deeper problem. If the files are removed or their presence justified I will close the bug.

Comment 8 Wes Isberg CLA 2006-07-07 11:42:23 EDT
So can you specify or categorize which files should go?  The ajde gif files are needed for the command-line distribution, but I'd agree that unnecessary files (however defined) from both bcel and ant stuff could be trimmed.  Anything else? 
Comment 9 Wes Isberg CLA 2006-10-18 14:46:51 EDT
Still not sure why this is still open.  There has never been a build process problem; we police what gets in for our stuff, but include everything in the input jars, on the assumption that whoever creates the input jars knows what they are doing.  If not - e.g., it seems correct to pull out the  package.html files, but I'm not sure about the J2SE profiles or  ant_tasks/resources-ant.jar from jdtcore-for-aspectj.jar - then let's fix those jars.  If you want the build process to police the jars, then you'll have to come up with a list/rule for doing so.  Removing package.html is the only general rule I can think of, but again it seems like a much cleaner rule to say that what's in the input jars is delivered.