| Summary: | additional goal to call org.eclipse.equinox.p2.publisher.CategoryPublisher from tycho-p2-extras-plugin | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Lars Fischer <reschifl> | ||||||
| Component: | Tycho | Assignee: | Project Inbox <tycho-inbox> | ||||||
| Status: | NEW --- | QA Contact: | |||||||
| Severity: | enhancement | ||||||||
| Priority: | P3 | CC: | anthony.dahanne, t-oberlies, vincent.guignot | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 197761 [details]
new patch based on f6e13aea310f136e20c0dcd5489faf17227bb38e
Why do you need this? You could just use eclipse-repository for defining categories. Just set up a second reactor that references the result of the FeaturesAndBundlesPublisher, and define the categories you need there. (In reply to comment #2) > Why do you need this? You could just use eclipse-repository for defining > categories. Just set up a second reactor that references the result of the > FeaturesAndBundlesPublisher, and define the categories you need there. Some months ago, I asked for a way to use categories when publishing self build bundles/features. The answer was, that this could be done by the Eclipse CategoryPublisher. But at this time there was no Mojo to call it easily from a Tycho build and some one has to provide an implementation of such a Mojo. Now, here it is. But I will have a look at the way you mentioned. I tried to use a second reactor with packaging=eclipse-repository. But this does not solve my goal to create a P2 repository, containing features and bundles from pom-first-dependencies and have them categorized. With eclipse-repository, only bundles in existing P2 repositories could be resolved. Unfortunately, there is no way to use a file based URL when defining P2 repositories. So I would need to make the local created and temp-repository available through http. I think this is the wrong direction. Why not keep things simple? Providing a way to call the Eclipse CategoryPublisher from a Tycho build, we could update an existing P2 repo with a packaging=eclipse-feature project containing pom-first-dependencies and put the feature into a category. (In reply to comment #4) > I tried to use a second reactor with packaging=eclipse-repository. But this does > not solve my goal to create a P2 repository, containing features and bundles > from pom-first-dependencies and have them categorized. This was indeed an issue in 0.11 and 0.12, but it has been fixed in 0.13.0-SNAPSHOT (see bug 342851): It is now possible to include bundles via pomDependency=consider in an eclipse-repository. What do you mean with a feature from pom-first-dependency? A feature built by Tycho and referenced from a second reactor through a POM dependency? (This works.) Or a feature built with a different Maven build tool? (This probably doesn't work today.) > This was indeed an issue in 0.11 and 0.12, but it has been fixed in > 0.13.0-SNAPSHOT (see bug 342851): It is now possible to include bundles via > pomDependency=consider in an eclipse-repository. Yes, but maven pom dependencies are not allowed to have two different versions at the same time. > What do you mean with a feature from pom-first-dependency? A feature built by > Tycho and referenced from a second reactor through a POM dependency? (This > works.) Yes this works for a single feature. But I would like to create a larger p2 repository using maven. This repository should contain different versions of the same feature. There is no way to specify such pom dependencies. My way would be: - create separate features using packaging=eclipse-feature from pom dependencies - publish them into a p2 repository using the "publish-features-and-bundles" goal - then additional use the new CategoryPublisher to add category information to this repository (In reply to comment #4) > > With eclipse-repository, only bundles in existing P2 repositories could be > resolved. Unfortunately, there is no way to use a file based URL when defining > P2 repositories. > I think this restriction is very unhandy. It would be much easier, if I can create a local temp-repository, which is accessible as file without the need to use a http access. (In reply to comment #6) > Yes this works for a single feature. But I would like to create a larger p2 > repository using maven. This repository should contain different versions of the > same feature. There is no way to specify such pom dependencies. Will it be possible to install these features into one eclipse installation, or will they be mutually exclusive? I am asking, because Tycho is currently limited to the former - and changing this is probably beyond the two large changes bug 348586 and bug 353889. Another use case for a CategoryPublisher or UpdateSitePublisher is the use case of converting an update site to a p2 repository including the categories [1] @Lars: Are you still interested in contributing your patch? If yes, please push it to Gerrit [2]. This saves us from having to go through the IP process manually. [1] http://dev.eclipse.org/mhonarc/lists/tycho-user/msg05605.html [2] http://wiki.eclipse.org/Tycho/Contributor_Guide Eclipse Tycho is moving away from this bugs.eclipse.org issue tracker to https://github.com/eclipse/tycho/issues/ instead. If this issue is relevant to you, your action is required. 0. Verify this issue is still happening with latest Tycho 2.4.0-SNAPSHOT if issue has disappeared, please change status of this issue to "CLOSED WORKFORME" with some details about your testing environment and how you did verify the issue; and you're done if issue is still present when latest release: * Create a new issue at https://github.com/eclipse/tycho/issues/ ** Use as title in GitHub the title of this Bugzilla ticket (may include the bug number or not, at your own convenience) ** In the GitHub description, start with a link to this bugzilla ticket ** Optionally add new content to the description if it can helps towards resolution ** Submit GitHub issue * Update bugzilla ticket ** Add to "See also" property (up right column) the link to the newly created GitHub issue ** Add a comment "Migrated to <link-to-newly-created-GitHub-issue>" ** Set status as CLOSED MOVED ** Submit All issues that remain open will be automatically closed next week or so. Then the Bugzilla component for Tycho will be archived and made read-only. |
Created attachment 196654 [details] a patch adding the new PublishCategoryMojo to provide the new goal "publish-category" The tycho-p2-extras-plugin provides a goal to call the org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher from a Tycho build. Eclipse provides the org.eclipse.equinox.p2.publisher.CategoryPublisher to apply the content of a category.xml file on a P2 repository. With an additional goal of the tycho-p2-extras-plugin, the CategoryPublisher could also be used to have categories on repositories created by Tycho.