Bug 47910 - ajc -outjar jarfile does not contain MANIFEST.MF
Summary: ajc -outjar jarfile does not contain MANIFEST.MF
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.1.1   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 1.2   Edit
Assignee: Matthew Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-02 13:35 EST by Shawn Lauzon CLA
Modified: 2004-03-17 07:32 EST (History)
1 user (show)

See Also:


Attachments
Fix (5.87 KB, application/octet-stream)
2004-03-17 06:40 EST, Matthew Webster CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shawn Lauzon CLA 2003-12-02 13:35:01 EST
I call ajc -sourceroots <mydir> -outjar <my.jar> and an output file is created 
with a .jar extension, but it is not a valid jar file because there is no 
MANIFEST.MF file. I see that the text for ajc says:

-outjar <file>      put output classes in zip file <file>

which might imply that it is supposed to be a zip file, but a parameter called -
outjar which creates a zip file doesn't really make sense. If -outjar is used, 
the resulting file should be a valid jar file, i.e. with a META-INF/MANIFEST.MF 
file inside.
Comment 1 Adrian Colyer CLA 2003-12-04 10:47:38 EST
Matthew - another variation of the jar files and manifests problem, do you think 
you could take a look please? Thks :)
Comment 2 Matthew Webster CLA 2003-12-10 06:07:27 EST
When using the “-outjar” option and not binary weaving a simple default 
manifest, similar to that produced by other tools like jar and ant, should be 
generated:

    Manifest-Version: 1.0
    Created-By: AspectJ 1.2

If this is insuffiecent it can be replaced later by the user with:

    jar –mf …
Comment 3 Matthew Webster CLA 2004-03-17 06:40:59 EST
Created attachment 8628 [details]
Fix

When -outjar specified a manfiest is either copied from the FIRST JAR in
-injars/-inpath or one is created. If writing to a directory the manifest is
copied but one is NOT created.
Comment 4 Adrian Colyer CLA 2004-03-17 07:32:26 EST
Fixed by patch contributed by Matthew.