| Summary: | Provide a utility that extracts a repo in simili runnable form | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Pascal Rapicault <pascal> | ||||||
| Component: | Build | Assignee: | DJ Houghton <dj.houghton> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | aniefer, curtis.windatt.public, darin.eclipse, jeffmcaffer, john.arthorne, tjwatson | ||||||
| Version: | 3.5 | ||||||||
| Target Milestone: | 3.5 M5 | ||||||||
| Hardware: | PC | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Pascal Rapicault
I have a class (can be called from Java, as an Eclipse application, or from an Ant task) which does the following: Input: - source artifact repo URI - source metadata repo URI OR list of IUs - destination artifact repo - where to publish the artifacts - destination metadata repo (optional - if specified we publish the metadata here) Output: - The artifacts in the destination will have been processed to be in a runnable/compilable form. That is, directory-based bundles will be extracted into folders and packed JARs will be un-packed. - There will be a content.xml file with the metadata for the IUs, if requested Is there anything else that we need from the transformer? Originally I wrote this to be part of PDE/Build but I have since moved it into its own bundle. I'm not sure where it should live. I almost want to say in the p2.tools bundle but I think it will be used often enough that we shouldn't label it as an "extra tool which is nice to have". >- source metadata repo URI OR list of IUs
Should it not be possible to specify both?
If we specify a destination metadata repo, then we need a source metadata repo. But we could still only want a list of IUs out of that repo and not the whole thing.
Perhaps this is possible already and I'm just misreading your comment.
> - destination metadata repo (optional - if specified we publish the metadata here)
By default the metadata should be kept.
(In reply to comment #2) > >- source metadata repo URI OR list of IUs > > Should it not be possible to specify both? > If we specify a destination metadata repo, then we need a source metadata repo. > But we could still only want a list of IUs out of that repo and not the whole > thing. > > Perhaps this is possible already and I'm just misreading your comment. > I believe if you are specifying the list of IUs to process (instances of IInstallableUnit) then you don't need the metadata repository... you already have everything you need to populate the destination metadata repository. If we decide to allow a list of IUs via the command-line or from the Ant task (currently it is only available through Java APIs) then we will have to decide how to pass that info (String ID and String Version pairs?) in which case we would have to have access to a source repository to do the initial look-up. Re: comment #3 - I will make this change to the default behaviour Added Jeff to the CC for comment. Perhaps the code should live in the publisher? this feels a lot like a variation on the mirroring app. Something along the lines of the one that we were trying to do in the tools bundle some time ago. Yes I was thinking the same thing but the problem is that bundles in the SDK will be using this tool and the p2.tools bundle isn't currently shipped with the SDK. I don't think we should add it to the SDK so that's why I'm looking for a new home... unless we want to ship p2.tools? Created attachment 123304 [details]
Using the transformer into the build
This is an initial attempt at adding automatic transformation of repositories as part of PDE Build.
A few things to review for:
- the name of the variables and targets
- the preProcess target uses subant setting buildpath to .
- do we want to "hide" the transformedRepoLocation variable instead of exposing it directly in the scripts
- the syntax for the p2.transform task is not final and so genericTargets.xml may need updating.
Created attachment 123553 [details]
New patch using the newly renamed task
Andrew could you please take a look and release for the next I build.
After long discussions about where to put this application (publisher, pde.build, new bundle) we have decided to put it into a new bundle. bundle: org.eclipse.equinox.p2.repository.tools application.id: org.eclipse.equinox.p2.repository.repo2runnable ant task: p2.repo2runnable We decided that the function of the tool is to convert a repository to runnable form, so that's why we named it that. No its not great, and any suggestions for better names will be entertained. Map files, project set files, features, have all been updated. Leaving this bug open until the changes in PDE/Build are addressed. Released with the following small changes: - added an optional dependency on org.eclipse.equinox.p2.repository.tools - added inheritAll="true" to the subant calls transformedRepoLocation may need its own attribute in the future instead of going on pluginPath, build will need to pass repo locations to publisher. The other option is to try and check all pluginPath entries to see if they are a repo. see bug 262253 for the packager |