Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325401 - case of letters (upper/lower) in Bundle-ClassPath in MANIFEST.MF affects 'eclipse.buildScript' Ant task
Summary: case of letters (upper/lower) in Bundle-ClassPath in MANIFEST.MF affects 'ecl...
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M5   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-15 19:27 EDT by John Cortell CLA
Modified: 2011-01-17 16:32 EST (History)
1 user (show)

See Also:


Attachments
Zip refrenced in repro steps (7.48 KB, application/zip)
2010-09-15 19:27 EDT, John Cortell CLA
no flags Details
Windows cmd file referenced in repro steps (248 bytes, application/octet-stream)
2010-09-15 19:28 EDT, John Cortell CLA
no flags Details
Ant script invoked by go.cmd (465 bytes, text/xml)
2010-09-15 19:29 EDT, John Cortell CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Cortell CLA 2010-09-15 19:27:13 EDT
I just spent the afternoon figuring out why a co-worker's feature wasn't building in a headless environment. To say the problem wasn't obvious is an understatement. It turned out to be that the PDE Ant task that generates build.xmls for a features/plugins is sensitive to the case of OSGI keywords: "Bundle-ClassPath", at a minimum. This inconsistency has great potential for sending someone on a long drive into the weeds.

This issue was discovered with Ganymede and reproduced with Helios.

Reproducibility Steps on Windows:
1. Launch Helios
2. Create a new workspace: {eclipse.home}\workspace_test
3. Unzip the attached archive to that directory. It contains three PDE projects.
4. Import the projects into the workspace via File > Import > General > Existing Projects into Workspace
5. Exit eclipse
6. Copy attached go.cmd.rename.me and genbuild.xml to {eclipse.home}. Rename the cmdfile
7. Open command window and run go.cmd
All the projects should now have a build.xml
8. Open {eclipse.home}\workspace_test\com.acme.dependsonsomething\build.xml
9. Search for "/../com.acme.something". It will take you to a <pathelement>
Note that "com.acme.something.jar" is being referenced. That's expected.
10. Open {eclipse.home}\workspace_test\com.acme.something\META-INF\MANIFEST.MF in a text editor
11. Change the 'P' in 'Bundle-ClassPath' to lowercase
12. Repeat steps 7-9
Note that 'com.acme.something.jar' is no longer referenced. The script now expects to find class files in bin and @dot folders instead of a jar. That is a major and unexpected change to the build behavior of that plugin.
Comment 1 John Cortell CLA 2010-09-15 19:27:47 EDT
Created attachment 178987 [details]
Zip refrenced in repro steps
Comment 2 John Cortell CLA 2010-09-15 19:28:22 EDT
Created attachment 178988 [details]
Windows cmd file referenced in repro steps
Comment 3 John Cortell CLA 2010-09-15 19:29:08 EDT
Created attachment 178989 [details]
Ant script invoked by go.cmd
Comment 4 John Cortell CLA 2010-09-15 19:36:11 EDT
I forgot to mention that other aspects of PDE don't seem to care about the case of Bundle-ClassPath (and other OSGi keywords?). E.g., regardless of case, the PDE Manifest editor interprets the keyword correctly. This is why I consider the Ant task behavior a bug.
Comment 5 DJ Houghton CLA 2010-09-16 15:49:57 EDT
I talked to Tom and OSGi bundle headers are indeed case-insensitive so this is possibly a problem with how PDE/Build reads the manifest when building. I'll ask Andrew to comment when he returns from holidays.
Comment 6 John Cortell CLA 2011-01-13 18:19:20 EST
(In reply to comment #5)
> I talked to Tom and OSGi bundle headers are indeed case-insensitive so this is
> possibly a problem with how PDE/Build reads the manifest when building. I'll
> ask Andrew to comment when he returns from holidays.

Just pinging to see if someone can take a look at this. The problem was a big time-waster for me and I think someone else will eventually experience the same if not addressed.
Comment 7 Andrew Niefer CLA 2011-01-17 16:32:12 EST
Made manifest header lookup non-case-sensitive.