Eclipse: Include required features to update site - eclipse

I am developing an Eclipse plug-in that requires a third-party plug-in such as the AJDT (AspectJ Development Tools) plug-in.
When a user wants to install my plug-in from the update site and does not have AJDT installed or enabled in his list of available update sites the installation will fail.
I created a file associateSites.xml next to the site.xml and included the reference in site.xml: tag:
<site
associateSitesURL="associateSites.xml">
The content of associateSites.xml looks like this:
<associateSites>
<associateSite url="..."/>
</associateSites>
This does not seem to have the wanted effect. Is there any other way to do so?

Using associateSitesURL seems to be deprecated.
This can help:
Include an external update site in my update site in Eclipse
together with
Feature Export Wizard
You have to add the
<repository-reference location=...>
tag in the category.xml and export the features as described in Feature Export Wizard, checking the option "Categorize repository".

Try making the associateSitesURL an absolute URL (eg, http://www.yourdomain.com/updates/associateSites.xml)

Related

is site.xml compulsory for eclipse update site?

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

Repackage update site into one feature

I have an update site that contains some 100 - 200 features and many more plugins. For some users all of these are needed, so I'd like to simplify the installation process by creating one feature that they can install. This feature would then contain all the contents of the update site.
I've created a new feature project and my plan is to add the contents of the original update site as included features and plugins in this project.
Problems is; In my feature project, when adding feature in the "included features" tab, I can only add features that are currently installed in my Eclipse platform. I'd rather not install those 200 features just so I can add them.
Is there a way to work around this?
Without the features installed in your target platform, you will need to edit the feature.xml file directly. All you need to do is to add the following for each feature that you want to include:
<includes
id="<add_feature_id>"
version="0.0.0"/>
Your build process (PDE or tycho) should add the proper version numbers for you.
I think you should have a detailed look at the Eclipse target platform concept. The features don't need to be installed in your current Eclipse platform (i.e. the IDE), they need to be installed in the target platform to be available for an update site.
If you never defined a target platform, your currently running application will be taken as IDE, and that is where your confusion might come from.
When I try to manipulate a feature I only need to have them in my workspace. No reason to install them.

RCP P2 Update for base productin

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.

Install multiple Eclipse plugins via update site

I want to create a bundled Eclipse update site for a single install of multiple plugins using the Eclipse Update Manager.
Our developers use the following common plugins for development, all of which I'd like bundled:
EGit - Git Team Provider
<url><update label="Eclipse EGit Update Site" url="http://download.eclipse.org/egit/updates"/></url>
Maven SCM Plugin
<url><update label="Maven Integration Extras" url="http://m2eclipse.sonatype.org/sites/m2e-extras/"/></url>
Maven SCM Handler for Subversive
<url><update label="objectledge.org m2e connectors" url="http://objectledge.github.com/maven-extensions/connectors/updates/"/></url>
Maven Integration for Eclipse
http://download.eclipse.org/technology/m2e/releases/1.0/1.0.200.20111228-1245<url>
Subversive -SVN team Leader
<update url="http://download.eclipse.org/technology/subversive/1.0/update-site/" label="Subversive update site 1.0.x"/>
<discovery url="http://download.eclipse.org/technology/subversive/1.0/update-site/" label="Subversive update site 1.0.x"/></url>
Subversive SVN Connectors
<url><update label="Subversive connectors update site 2.3.x" url="http://community.polarion.com/projects/subversive/download/eclipse/3.0/update-site/"/>
SVN Kit 1.3.7
<discovery label="Subversive connectors update site 2.3.x" url="http://community.polarion.com/projects/subversive/download/eclipse/3.0/update-site/"/>
</url>
Alternative 1: Composite repositories
With a composite repository you have basically a "super" update site, pointing to all the other update sites. You only need to take the 2 files from the Eclipse help and add all your update site locations as child location at the bottom.
Drawback: When you go to this update site, you can install all the plugins from all the sites, not only the ones you wanted.
Alternative 2: Update site mirroring
With the deprecated update command line manager application in Eclipse you can mirror single features from remote update sites to a local update site. I've not yet found that ability in the new P2 director application.
Benefit: That way your developers really only get the features you want.
Drawback: You need to do some more scripting.
Alternative 3: Manually import the listed features in one step (click "Install/Update" link afterwards)
If you have installed those features on one machine, you can use File -> Export -> Installation -> From existing installation to create a small text file containing those features and their update sites. Your other developers can import those using File -> Import -> Installation -> Install software items from file.
Benefit: No scripting, no update site hosting necessary. You can manage that export file in a version control system easily.
Drawback: Not started from update manager UI (but uses the same underlying P2 techniques).

Modifying Existing Eclipse Plugin and Correctly Installing it

I downloaded the source code for the EMF based UML2 Plugin and changed a class in the org.eclipse.uml2.uml.edit project to remove special characters when returning string representations. Now when I export the projects and place the jar files either in the dropins directory or replace my current uml2 plugin jar files in plugins directory, The UML files are no longer recognized, in short my modified plugin does not install correctly (no error is thrown and I can see the files being picked up under Plugins->Target Platform) .
However, When I run the plugin as an eclipse application (from the workspace) I can see the changes I made being reflected in the new instance of eclipse.
What can I do to ensure that the plugin installs correctly?
Is there a documented procedure of how to build the uml2 plugin (or any comparable plugin) after modification?
Select the project and open the context menu. There is an entry PDE near the bottom of the menu. In there, you can find an entry to build the plugin for deployment. This gives you the features and plugins directory with the fixed files. Copy both into your Eclipse install.
Unless the UML2 plugins require some kind of magic build script, exporting the one plugin you changed and overwriting the original in your Eclipse installation should be the easiest solution. One potential problem which comes to mind is conflicting plugin version numbers: make sure you don't have two identical versions of your modified plugin in your Eclipse installation.
When debugging plugins which apparently don't work properly at runtime, I always look at Help > About Eclipse Platform > Configuration Details. This lists all the plugins found by Equinox during startup, along with their status (see the Javadoc of the org.osgi.framework.Bundle interface for explanation).
I faced the exact same problem as you describe here . I dont have any answer to your problem but i am sharing what worked for me .
I created a local update site of the plugin on my system. Create update site for your plug-in article explains very very nicely the steps needed to accomplish this .