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

Bug 350040

Summary: OSGi facet does not generate correct build.properties for Persistent Bundles
Product: z_Archived Reporter: Kaloyan Raev <kaloyan>
Component: LibraAssignee: Alexander Silgidjian <alexander.silgidjian>
Status: CLOSED FIXED QA Contact: Kaloyan Raev <kaloyan>
Severity: normal    
Priority: P3 CC: alexander.silgidjian
Version: unspecifiedFlags: kaloyan: iplog+
kaloyan: review+
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
URL: https://jtrack/browse/NGPBUG-990
Whiteboard:

Description Kaloyan Raev CLA 2011-06-22 08:31:31 EDT
Steps to reproduce: 
1. Create new JPA project with OSGi facet.
2. Add a JPA Entity. 
3. Export the bundle using Export > Deployable plug-ins and feature. 
4. Open the exported JAR file - the JPA entity's class is missing. 

The reason for this is that the build.properties file is incorrectly generated. It contains only this line: 

    bin.includes = META-INF/

while it should contain something like:

    bin.includes = ., META-INF/
    source.. = src/
    output.. = build/classes/
Comment 1 Alexander Silgidjian CLA 2011-07-06 10:58:00 EDT
Patch is proposed here: https://github.com/asilgidjian/libra/commit/8a7d9baa5381a76201c56b02a8df70f2948cd1a0

I wrote all this code and have the rights to contribute it to Eclipse under the eclipse.org web site terms of use.
Comment 2 Kaloyan Raev CLA 2011-07-07 14:57:57 EDT
Alex, thanks for the patch and the test. Your changes are not only valid for Persistent Bundles, but also for plain OSGI Bundles. Therefore, I change the patch to cover the latter case too. 

Patch is committed to the indigo branch:
http://git.eclipse.org/c/libra/org.eclipse.libra.git/commit/?h=indigo&id=8c0ee3537a8f1d57403c486189e8039ddae33c14

and merged to the master branch:
http://git.eclipse.org/c/libra/org.eclipse.libra.git/commit/?id=5b0d74234376f62e729f5f030cea97b922595aae
Comment 3 Kaloyan Raev CLA 2011-07-15 06:03:07 EDT
Verified with the latest build from http://download.eclipse.org/libra/maintenance/snapshot/