Community
Participate
Working Groups
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.
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.
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
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 on attachment 166810 [details] add source dependencies to bundles Released to trunk, revision 11426.
.