Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311394 - Download source bundles together with binaries
Summary: Download source bundles together with binaries
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Buckminster (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: buckminster.core-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 312582
  Show dependency tree
 
Reported: 2010-05-03 13:02 EDT by Carsten Reckord CLA
Modified: 2019-02-25 14:40 EST (History)
1 user (show)

See Also:


Attachments
add source dependencies to bundles (1.70 KB, patch)
2010-05-03 13:13 EDT, Carsten Reckord CLA
thomas: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carsten Reckord CLA 2010-05-03 13:02:13 EDT
Buckminster should support an option akin to maven's downloadSources that causes the resolution to include the matching source bundles for binary p2 bundles.

Currently, a buckminster provisioned target platform is not much use outside of an automated build process, because the lack of sources makes debugging etc rather painful. 

Running an additional query to get the appropriate source bundles also doesn't seem to be an option, because 
a) needing an additional query is rather unattractive, 
b) it's hard to guarantee that the source and binary bundle versions match when we have to run 2 separate materializations and 
c) in bucky 3.6 neither the source="true" provider option nor the deprecated ?importType=source seem to cause buckminster to download source packages from a p2 repository and install them into the target platform (which probably deserves its own ticket?).

I would suggest adding an optional synthetic dependency from each bundle (e.g. org.example.bundle#1.2.3.v201005031833) to its corresponding source bundle (org.example.bundle.source#1.2.3.v201005031833) and controlling their download with an additional filter expression on property buckminster.include.sources=true.
Comment 1 Carsten Reckord CLA 2010-05-03 13:13:08 EDT
Created attachment 166810 [details]
add source dependencies to bundles

First shot at an implementation.

I would've liked to only add the dependency if the property is set, but the CspecBuilder doesn't seem to have access to the properties.

Maybe it would also be nice to add the source bundle as bundle.source.jar to the materialized component's CSpec in CSpecFromBinary, but I have no idea how to check with the TP if the source bundle exists there.
Comment 2 Thomas Hallgren CLA 2010-05-06 07:58:01 EDT
This looks very interesting. I'm ready to commit it. Is it OK if I add this to the copyright notice?

 * Contributors:
 * - Cloudsmith Inc - initial API and implementation.
 * - Carsten Reckord, Yatta Solutions GmbH - Synthetic source bundle dependencies
Comment 3 Carsten Reckord CLA 2010-05-07 09:19:12 EDT
Hi Thomas,

That's great. Sure, go ahead. I'd have happily given my okay without attribution, but I won't say no to that either ;)
Comment 4 Thomas Hallgren CLA 2010-05-12 06:00:07 EDT
Comment on attachment 166810 [details]
add source dependencies to bundles

Released to trunk, revision 11426.
Comment 5 Thomas Hallgren CLA 2010-05-12 06:54:25 EDT
.