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

Bug 312437

Summary: Improve usability of BND within build system
Product: z_Archived Reporter: Tom Ware <tom.ware>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: david.twelves, tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
ant extensions project - conditional messaging, and OSGi-like bundle selection
eric.gwin: review+
minor cleanup of compile cp to remove unused jars. none

Description Tom Ware CLA 2010-05-11 10:35:28 EDT
At the moment, the bnd library is specified by name in the build system.  i.e. you must have bnd-0.0.366.jar to run the build.

Bnd evolves fairly quickly and it is non intuitive to have to find that specific version.

We should either use a more generic name and instruct people to rename (e.g. bnd.jar), or detect jars that start with "bnd" and use the most recent one.
Comment 1 Eric Gwin CLA 2010-05-11 12:58:22 EDT
I was trying to do the latter, but am running into some limitations with ant. I think I'll need to write a custom task or javascript task to do this.
Comment 2 Eric Gwin CLA 2010-05-18 10:51:46 EDT
In the interim, will modify the searches to look for specific versioned jar, and if not found look for a bnd.jar in one of the two dirs. that way users won't have to modify thebuild, they could just rename a bnd jar file.
Comment 3 Eric Gwin CLA 2010-06-10 09:34:14 EDT
Working on an ant task that will load a found jar like OSGi does (with version criteria) since jarnames change with each build, and ideally all these checks should be automatic so we can move directly to to automated orbit dependencies, as well as providing flexability to bnd checks and other processes.
Comment 4 Eric Gwin CLA 2010-06-21 14:35:32 EDT
Created attachment 172353 [details]
ant extensions project - conditional messaging, and OSGi-like bundle selection

the following zip contains five (5) classes and two (2) ant buildfiles.
in the helper package is the version and version exception classes (sts define an OSGi version object), and a test class to validate them.
under taskdef are the two custom ant tasks: 
selectBundle - determines the filename of the 'best' filename match for a bundle given OSGi-like matching criteria
Say - a conditional Echo

antbuild.xml - builds the cutomizations jar.
the test.xml loads the tasks and them.

Some means to do this is necessary to both find the most appropriate bnd, but also to use when generating features, as well as identifying current jar dependencies from orbit, etc.
Comment 5 Mike Norman CLA 2010-06-22 08:51:18 EDT
Looks good
Comment 6 Eric Gwin CLA 2010-06-24 07:48:49 EDT
Created attachment 172592 [details]
minor cleanup of compile cp to remove unused jars.

obseletes the antbuild.xml file within the attached zip.
Comment 7 David Twelves CLA 2010-06-24 09:10:19 EDT
Code looks OK to me after the removal of the unused jars in antbuild.xml
Comment 8 Eric Gwin CLA 2010-06-24 09:25:28 EDT
Spoke with Peter about an additional review. He says two is enough especially since the contribution won't have any impact upon the build or other components.
Based upon his recommendation and the two reviews I am merging to trunk.

Once complete, I will begin working on changing the BND detection code to dynamically determine the bnd jar (rather than use a hard-coded default).
Comment 9 Eric Gwin CLA 2011-03-03 14:55:56 EST
This should have been marked resolved long ago.
Comment 10 Eclipse Webmaster CLA 2022-06-09 10:15:03 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 11 Eclipse Webmaster CLA 2022-06-09 10:27:34 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink