Community
Participate
Working Groups
The category editor should allow for references to be specified.
I believe bug 391033 is a DUP of this one (or vice-versa).
(In reply to Mickael Istria from comment #1) > I believe bug 391033 is a DUP of this one (or vice-versa). Yes, I think this is the same bug, but there was some detailed discussion of Tycho issues in the other bug, so I don't want to make it a duplicate.
Pushed a first pass at https://git.eclipse.org/r/27678 https://git.eclipse.org/r/27679 (I apologize, there was a forced merge here and I should have squashed my commit or used the same gerrit id). Pulling the second change should get both, I think. This is not ready for PDE review, but is placed here for testing and feedback for anyone interested in the problem. Some issues I see: - I am using "Repository Reference" language in the UI to distinguish it from associated sites in the old site model. However, I'm not sure this is the terminology we want to use or not. - I made the "add repo" UI work very similarly to the Product Editor UI for adding repository references. That UI did expose enable/disable but did not expose repository nicknames. I also am not exposing metadata/artifact, but instead assuming colocation as is done in associate sites. In theory, we could decide to expose the repository nickname and/or let the user specify the repository type (artifact/metadata).
Thanks Susan for looking at it. Sorry, I don't have time to give a try to the patch right now, so I'll ask here: How does the UI behave if the given repository doesn't exist ? Does it freeze UI, hang on a progress monitor or anything else that can be a bit annoying? As for our (JBoss Tools/JBoss Developer Studio) use-case, I don't think the nickname concept adds value for us. Plain URL would be sufficient.
It is the same UI than what is already available in the product editor. It simply allows the user to enter a URL. The URL is not contacted.
This is ready for PDE review. I've kept the language "referenced repositories" with a definition and explanation for enabled/disabled similar to what we did in product editor. After reviewing with Pascal, we want the UI to be as close as possible to the already-released repository UI in the product editor. The UI side can be tested by examining the generated category.xml. Note that the p2 code in bug 436318 must be released in order for this new info in the category.xml to be published by publisher. With that code loaded, you can test that the references are published by doing the following: 1) Create a project containing a feature 2) Specify categories in a category.xml 3) Choose File > export > Deployable features and specify the category.xml in the "options" tab of the wizard. This will generate a repository and you can see that the repository references specified in the category.xml are in the repository metadata.
Created attachment 244094 [details] screenshot of new functionality An additional page is added to the category editor, "Repository Properties." In this bug we add repository references, and in bug 426532 we add more information for download stats collection.
The p2 code has been merged in master.
The UI works exactly the same as the product editor, so I have no issues with it. The code changes are also acceptable. It would be nice to have javadoc on the model interfaces describing what they represent. My only issue is with the text: 1) Repository References Is this a p2 vocabulary? I would have expected "Referenced Repositories" or "Additional Repositories". 2) "This repository" The user is editing a category.xml, not a repository, but the text says 'this one' or 'this repository'. The category definition page says 'to be published in the repository'. Shouldn't we therefore be using language like 'The list of referenced repositories will be published in the repository where they will be contacted when repository content is requested.' Here is what I came up with, could still use some improving "Specify additional repositories that can be searched for content. The list of repository references will be published into the repository and searched when content from this repository is requested." 3) Enablement Should be more like the product page, keeping (2) in mind "Enabled repositories are always contacted when searching for content. Disabled repositories must be explicitly enabled by the user in order to be contacted."
(In reply to Curtis Windatt from comment #9) Your terminology points are all well taken. I used "Additional Repositories" and changed the references to be "the repository" as you suggest. I started with your verbage and tweaked it just a little bit. New change posted to Gerrit. Thanks.
http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=c987b864313a8ca6e97def60345a9dcaf5a06ca6 Approved the change, merged with master.
I am having trouble getting this to work. Used the editor to modify the category file then used Mars M1 publisher to generate the repo. What should I look for in the repo metadata to know that the referenced repositories are indeed referenced?
(In reply to Konstantin Komissarchik from comment #12) > I am having trouble getting this to work. Used the editor to modify the > category file then used Mars M1 publisher to generate the repo. What should > I look for in the repo metadata to know that the referenced repositories are > indeed referenced? Two things to check. First make sure that the references were indeed saved to the category file. You should see some repository-reference elements: <repository-reference location="http://download.eclipse.org/eclipse/updates/4.5milestones" enabled="true" /> <repository-reference location="http://download.eclipse.org/eclipse/updates/4.4-M-builds" enabled="true" /> And in the generated metadata (content.xml) you should see a <references> element with repository elements underneath. You'll see two entries for each repository specified in the category editor, because we add both a metadata and an artifact repository reference when we generate the metadata. <?xml version='1.0' encoding='UTF-8'?> <?metadataRepository version='1.1.0'?> <repository name='Exported Repository' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1.0.0'> <properties size='2'> <property name='p2.timestamp' value='1404060876554'/> <property name='p2.compressed' value='true'/> </properties> <references size=‘4’> <repository uri='http://download.eclipse.org/eclipse/updates/4.5milestones' url='http://download.eclipse.org/eclipse/updates/4.5milestones' type='0' options='1'/> <repository uri='http://download.eclipse.org/eclipse/updates/4.4-M-builds' url='http://download.eclipse.org/eclipse/updates/4.4-M-builds' type='1' options='1'/> <repository uri='http://download.eclipse.org/eclipse/updates/4.5milestones' url='http://download.eclipse.org/eclipse/updates/4.5milestones' type='1' options='1'/> <repository uri='http://download.eclipse.org/eclipse/updates/4.4-M-builds' url='http://download.eclipse.org/eclipse/updates/4.4-M-builds' type='0' options='1'/> </references>
I have the "repository-reference" elements in my site.xml, but I get no "references" element in content.xml when its generated. The old associateSites method does produce the "references" element. Could the issue be in the p2 tool that I use to generate the metadata? I am calling this one... org.eclipse.equinox.p2.publisher.UpdateSitePublisher
(In reply to Konstantin Komissarchik from comment #14) > I have the "repository-reference" elements in my site.xml, but I get no > "references" element in content.xml when its generated. The old > associateSites method does produce the "references" element. > > Could the issue be in the p2 tool that I use to generate the metadata? I am > calling this one... > > org.eclipse.equinox.p2.publisher.UpdateSitePublisher Sorry for not being more specific! You want to use the PDE export: File > export > Deployable features and specify the category.xml in the "options" tab of the wizard.
> You want to use the PDE export: > File > export > Deployable features and specify the category.xml > in the "options" tab of the wizard. So, is this not implemented yet in p2 command-line tools? Is there a bug tracking that work?
AFAIK everything is committed and working both on the p2 and PDE side. Please provide a standalone example that we can use to reproduce the issue.
Here is the ant macro that I use to generate the repository metadata. <macrodef name="p2.publish.UpdateSite"> <attribute name="location"/> <attribute name="name" default="repository"/> <sequential> <java classname="org.eclipse.core.launcher.Main" fork="true" failonerror="true"> <classpath> <fileset dir="${bootstrap.platform}/plugins"> <include name="**/org.eclipse.equinox.launcher_*.jar"/> </fileset> </classpath> <arg line="-application org.eclipse.equinox.p2.publisher.UpdateSitePublisher"/> <arg line="-metadataRepository file:@{location}"/> <arg line="-artifactRepository file:@{location}"/> <arg line="-metadataRepositoryName "@{name}""/> <arg line="-artifactRepositoryName "@{name}""/> <arg line="-source @{location}"/> <arg line="-compress"/> <arg line="-publishArtifacts"/> </java> </sequential> </macrodef>
*** Bug 391033 has been marked as a duplicate of this bug. ***
Verified on Version: Mars (4.5) Build id: N20140901-2000