Bug 9888

Summary: JAR exorter problems with META-INF in projects with no source folder
Product: [Eclipse Project] JDT Reporter: Unknown User <unknown>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P2 CC: fokaefs
Version: 2.0   
Target Milestone: 2.0 M4   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
.log none

Description Unknown User CLA 2002-02-15 05:42:27 EST
Steps:

1) Creat a project without a source folder and add a package. 
2) Add a directory META-INF and populate it with files. A file 'manifest.mf' 
should (could) also be included.
3)Export to a jar.

Note that the additional files (those not named 'manifest.mf') were not 
exported.

->20020212. JRT.
Comment 1 Unknown User CLA 2002-02-15 06:12:07 EST
After another test I've found that the problem remains. Am reopening PR.

1)Create project with source folder.
2)create META-INF folder in source folder and populate with files 
including 'manifest.mf'
3)export to jar.

Notice that the path names of files other than 'manifest.mf' are still 
incorrect.
->20020212. JRT.
Comment 2 Dani Megert CLA 2002-02-15 06:50:11 EST
General bug which was fixed:

and now is back and results in strange behavior all over the place in JDT UI.
e.g. create a Project with source folder 'src'
'TEST' can only be added via Navigator (creating a package fails, see attached log)
==> can't be seen in the Packages view
create classs Foo in TEST with "package TEST;"
==> compiles  without error but can't be seen in the Packages view

Reason is that Java model does not accept all-uppercase names as Java package
name and hence returns null if we ask the file for the package fragment.

Moving to JCore. Please test your fix against the test case of this BR.
Comment 3 Dani Megert CLA 2002-02-15 06:50:57 EST
Created attachment 368 [details]
.log
Comment 4 Jerome Lanneluc CLA 2002-02-25 17:46:16 EST
Verified the above scenario is fixed in 20020214

*** This bug has been marked as a duplicate of 9479 ***
Comment 5 Marios Fokaefs CLA 2010-04-25 03:17:07 EDT
I got the same problem 

(Java Model Exception: Java Model Status [Invalid name specified: HelloWorld]) 

when I tried to create an ICompilationUnit. I used the 

IPackageFragment.createCompilationUnit(String name, String contents, boolean force, IProgressMonitor monitor) 

method. Could this be the same bug?