Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 27687

Summary: Jar export: Cannot export java project as a jar when manifest file is present
Product: [Eclipse Project] JDT Reporter: Jennifer Gluck <jengluck>
Component: UIAssignee: Dani Megert <daniel_megert>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.1   
Target Milestone: 2.1 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Jennifer Gluck CLA 2002-12-04 13:30:30 EST
Steps to reproduce:

1. Create a java project
2. Create a simple folder in your project.  Call it "META-INF".
3. Create a simple file in the META-INF folder.  Call it "MANIFEST.MF".
4. In the context menu of your java project, click "Export" and select JAR 
file.
5. Fill in the export destination path and click Next.
6. Click Next again to go to the JAR Manifest Specification page of the wizard.

The same thing happens whether you choose "Generate the manifest file" or "Use 
existing manifest from workspace" and select the file, then click Finish.  The 
popup appears:

Confirm Replace

The file 'E:\eclipse_workbench\eclipse\workspace\Test.jar' already exists.
Do you want to overwrite it?

Yes    No


No: takes you back to the JAR Manifest Specification page of the JAR Export 
wizard.

Yes: brings up the following error popup:


JAR Export

JAR creation failed.  See details for additional information

Details:
Problem writing /<project name>/META-INF/MANIFEST.MF to JAR: duplicate entry: 

META-INF/MANIFEST.MF
Comment 1 Tod Creasey CLA 2002-12-05 09:42:52 EST

*** This bug has been marked as a duplicate of 25608 ***
Comment 2 Tod Creasey CLA 2002-12-05 09:44:26 EST
Incorrect duplicate notifiaction. Reopening
Comment 3 Dani Megert CLA 2002-12-12 11:00:52 EST
Please note that there are two cases
- you select to generate the manifest
    in this case the manifest is generated, yours is ignored and warning is shown
- you select to provide the manifest (from META-INF/MANIFEST.MF)
    in this case META-INF/MANIFEST.MF will be in the JAR