When trying to add a Software Site (p2 plugin repository - either
one generated by p2 Publisher or Nexus with p2 support) to a target
definition via the "Target Definition Wizard" there seem to be "no items
available" preventing the site to be added.
The same problem has been reported e.g. here: https://docs.sonatype.org/display/Nexus/Nexus+OSGi+Experimental+Features+-+P2+Repository+Plugin?focusedCommentId=12943363#comment-12943363
Tycho and the https://github.com/ifedorenko/p2-browser are capable of
fetching the metadata and contents though, since the site contains a
number of bundles (in "plugins" dir) along with artifacts.xml and content.xml.
Is there a known limitation/bug of the UI related to this behaviour or
could you please point me to a workaround?
By default, the UI shows only "categorized" features. Uncheck the checkbox to see all features in the repository.
Related
When I set "Running Platform" as the Target Platform for my Eclipse e4 RCP application everything works fine.
Now, I want to provide a common target definition for the development team. The issue is that org.apache.commons.logging is a required bundle in one of my MANIFEST files.
Apparently this bundle cannot be found in any of the Software Site Locations that I use in my target definition.
As I don't have enough reputation to post images I'll give you the picpaste-link instead. The image shows my current target definition. http://picpaste.com/target-2BtZ4nMj.PNG (I'll update the post with the correct image as soon as possible.)
Is there an update site that can provide the Apache bundle. I see the plug-in/bundle in my local Eclipse installation, I just don't know where it came from, such that I could use it in my custom target platform definition.
I have used eclipse Features And Bundles Publisher to create a p2 metadata folder. But failed add the same folder as local site as eclipse keep on complaining Unable to find the site.
I could find content.xml and artifacts.xml but site.xml NOT generated through publisher command. I doubt if I have to create a site.xml manually.
FYI I am using eclipse KeplerSR2.
The p2 publisher should create a structure like this. Depending on pack attributed the content and artifact repository files [content and artifact] might be jared.
<repo-root-dir>
features
featureA.jar
...
plugins
pluginA.jar
...
content[.xml|.jar]
artifacts[.xml|.jar]
You won't get and won't require an update site file.
Make sure to clean the location you use from the Eclipse -> Preferences -> Available Softwares Sites. Eclipse is caching the repo metadata.
Yes you must have site.xml for update site from update_site
To create an update site you must develop a site.xml file and build the site. PDE provides an editor and project for creating sites. A site will contain one or more features organized into categories.
See how to create site.xml
In my eclipse project I have set a target platform via target definition file.
I've noticed that a specific plug-in is present in two different versions: 1.7.9 and 1.7.2. I checked this by doing "Window -> Show View -> Plug-in Development -> Target Platform State" and search for the plug-in name.
Both versions appear and they are located in .metadata\.plugins\org.eclipse.pde.core\.bundle_pool\plugins
I want to get rid of 1.7.2, but when I open the target definition file it does only refer to the 1.7.9 version:
<unit id="slf4j.api" version="1.7.9"/>
How can I find out where the plug-in originates from, in order to get rid of it?
Use version="0.0.0" which say use the latest version of the plug-in available.
See this bug and explanation here
About content.jar / content.xml
"content.xml" and "artifacts.xml" contain metadata for the exported files.
Read p2 concepts section in the blog p2 updates for Eclipse RCP applications for more details.
Check these links
update site
classic vs p2 update site
I am developing an RCP P2 update.
I created RCP Mail Template application. (com.project.app.mail)
I added product configuration file MailProduct.product
I added org.eclipse.equinox.p2.ui.sdk as a dependency in the dependency tab if my plugin project. After adding this, I got Intall New Software and Check for Update options under the help menu.
I added p2.inf file with following content.
instructions.configure=\
addRepository(type:0,location:http${#58}//localhost:8080/REPO/);\
addRepository(type:1,location:http${#58}//localhost:8080/REPO/);
I converter a product to feature based product.
I created a feature project (com.project.feature.mail)
I added com.project.app.mail in the plugin tab of feature com.project.feature.mail
I launched RCP product via product file. As it failed, I went to run configuration, added required plugin. Application launched successfully after that.
I exported the product. Exported product worked fine.
Now I made some changes to com.project.app.mail.
Updated com.project.feature.mail verstion to 1.0.100.quailfier (earlier version 1.0.0.quialifier)
Added an update site project. Added category with id com.project.category.mail. Added mail feature with version 1.0.100.qualifier.
Clicked on build all, moved generated features, plugin, artifact and repository.xml to a local http server (tomcat)
I tried to update the com.project.feature.mail via, check for update option.
It says no update found, while the install new software page shows the updated com.project.feature.mail with updated versio. In proceeding ahead with installation, it tells only update is possible while update cannot find the new update.
Kindly guild me how provide update for base product.
If you need any other infomation do let me know.
Dear Priyank what is your product(MailProduct.product) version?
Following suggestions will solve your problem.
You have to change MailProduct.product version too.
Re-export your product with Generate Metadata Repository option.
Use this Repository on your Web-Server to get updates.
With Update Site Project software updates not work so easily.
I'm using some 3rd party libraries to create my RCP application. These libraries are available as update site / p2 repository, and they are provided by eclipse (e.g., the RCP target, EMF) or by a third-party repository. Accordingly, I've created a target file to describe what I'm using to build my application.
Due to a recent outage of one of these repositories, I want to have a local mirror of all the stuff I'm using to build my application. Somebody told be to look at b3, but I need some additional help. Following the tutorial, I've copied from my target file the p2 repositories and created some validation rules (according to the feature I use).
However, when I start the build, it mirrors huge parts of the eclipse's indigo repository (including, for example, the JDT, WTP, and linuxTools, which are NOT required directly or indirectly by my RCP app).
Is it possible to limit the mirror to the features listed in my target file?
I have only the Helios version of b3 installed (not sure how it works in a newer one, but probably its similar), there I can add some child items to the Mapped repository elements to add an exclusion rule to remove some items, or add some specific features or plugins.