Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 189371 - No source for some OSGi bundles?
Summary: No source for some OSGi bundles?
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 RC4   Edit
Assignee: equinox.framework-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-28 03:05 EDT by David Williams CLA
Modified: 2007-06-05 17:27 EDT (History)
2 users (show)

See Also:
jeffmcaffer: pmc_approved+
pascal: review+
tjwatson: review+
aniefer: review+


Attachments
patch for services and util (19.78 KB, patch)
2007-06-01 14:20 EDT, DJ Houghton CLA
no flags Details | Diff
patch for services and util (19.78 KB, patch)
2007-06-01 15:04 EDT, DJ Houghton CLA
no flags Details | Diff
updated patch for services and util (19.56 KB, patch)
2007-06-01 16:36 EDT, Andrew Niefer CLA
no flags Details | Diff
alternative patch (19.63 KB, patch)
2007-06-01 16:42 EDT, Andrew Niefer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Williams CLA 2007-05-28 03:05:04 EDT
In Eclipse SDK, that is. 

org.eclipse.osgi seems to have source

But, these two don't. 
org.eclipse.osgi.services
org.eclipse.osgi.util
Comment 1 Jeff McAffer CLA 2007-05-28 08:23:05 EDT
they likely come from Orbit and are suffering the same fate as all other bundles from Orbit.  Should be corrected soon.
Comment 2 DJ Houghton CLA 2007-05-28 11:09:28 EDT
These bundles aren't in Orbit.
Comment 3 Pascal Rapicault CLA 2007-05-28 12:51:21 EDT
Those two plug-ins did not have source in 3.2.1 either.
Comment 4 Jeff McAffer CLA 2007-05-28 20:54:21 EDT
Yeah but that was likely a bug then too...

the Platform source feature does include dirs for the services and utils bundles but there is no source there.  That does seem like an error that should be corrected for 3.3.
Comment 5 Kim Moir CLA 2007-05-31 17:03:53 EDT
The issue in this case is that the src.zip is deleted in the clean target of the generated build.xml. For example, here's this target from a recent build

 <target name="clean" depends="init" description="Clean the plug-in: org.eclipse.osgi.services of all the zips, jars and logs created.">
                <delete dir="${build.result.folder}/@dot"/>
                <delete file="${build.result.folder}/src.zip"/>
                <delete file="${plugin.destination}/org.eclipse.osgi.services_3.1.100.v20060918.jar"/>
                <delete file="${plugin.destination}/org.eclipse.osgi.services_3.1.100.v20060918.zip"/>
                <delete dir="${temp.folder}"/>
        </target>

Thus when the gather.sources target runs, the src.zip no longer exists on the filesystem and so it is not included in the build.

You should be able to use a customCallback to avoid this problem.
Comment 6 David Williams CLA 2007-05-31 18:16:42 EDT
FYI, After I opened this bug, Wassim, in bug 189972 #c5
implies these were intentionally omitted before because they "wouldn't compile" if pulled in as source. 

(And, not that I understand why that would be ... I'm just the messenger connecting bugzillas). 

Comment 7 DJ Houghton CLA 2007-06-01 14:20:43 EDT
Created attachment 69746 [details]
patch for services and util

Here is a patch for the osgi.services and osgi.util bundles. Along with the patch, you must rename the source zips to be services_src.zip and util_src.zip, respectively.
Comment 8 Pascal Rapicault CLA 2007-06-01 14:31:57 EDT
The patch should do the rename in the pre.gather.source
Comment 9 Jeff McAffer CLA 2007-06-01 14:42:14 EDT
+1 for the idea of finally fixing this for 3.3
Comment 10 DJ Houghton CLA 2007-06-01 15:04:41 EDT
Created attachment 69759 [details]
patch for services and util

Good catch, Pascal. Thanks.
Comment 11 Thomas Watson CLA 2007-06-01 15:22:00 EDT
+1 to fix, but I'm deferring my code review to Andrew who will be more helpful
in custom pde build scripts.
Comment 12 DJ Houghton CLA 2007-06-01 15:29:17 EDT
Note that the "rename the source zips" step from comment #7 is still necessary with the new patch.
Comment 13 Andrew Niefer CLA 2007-06-01 16:36:04 EDT
Created attachment 69794 [details]
updated patch for services and util

The src.includes property should include src.zip not services_src or util_src
The build.properties also needs a customBuildCallbacks=customBuildCallbacks.xml

This still requires the src.zip to be renamed to services_src.zip in cvs.
Comment 14 Andrew Niefer CLA 2007-06-01 16:42:31 EDT
Created attachment 69796 [details]
alternative patch

This alternative instead uses the pre.clean and post.clean to temporarily rename and then restore the src.zip so that it doesn't get deleted on the clean.

This does not require the src.zip to be renamed in cvs.
Comment 15 DJ Houghton CLA 2007-06-04 10:34:37 EDT
+1 for Andrew's alternative patch. Was able to construct a test build and it works well. 
Comment 16 Pascal Rapicault CLA 2007-06-05 10:15:40 EDT
+1 for Andrew's patch.
Comment 17 Andrew Niefer CLA 2007-06-05 16:53:25 EDT
+1 for the alternative patch over the other one
Comment 18 DJ Houghton CLA 2007-06-05 17:27:44 EDT
Released to HEAD.