Typically an eclipse p2 update site is created inside eclipse through the process of creating a feature project containing one or more plugins/bundles and adding this feature to an eclipse update site project. Finally the update site is build and can be referenced through the update manager in eclipse.
But is it possible to create a p2 update site outside eclipse from a folder only containing a set of already build plugins?
I have looked at:
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/p2_publisher.html
but it assumes that both the bundles AND features are already created.
I have also looked at:
http://wiki.eclipse.org/Equinox_p2_director_application
http://wiki.eclipse.org/Equinox_p2_Getting_Started_for_Releng
but that does not describe how to create a p2 site from a list of bundles.
To simplify my question:
Is it possible to create a full working p2 update site from a local folder containing osgi bundles?
Publisher is the one to generate the p2 repository from bundles.
Update:
If you want to let your product showing in p2 UI, you can create p2.inf in your top feature,
properties.1.name=org.eclipse.equinox.p2.type.group
properties.1.value=true
Of course, you also could add it to a category via p2 advice file.
Related
I have created one Alfresco project in Eclipse. I want to use one uploader-plus AMP file in my newly created Alfresco project in Eclipse.
How can I achieve this?
can we use multiple amps in single alfresco project in eclipse or can we create single amp file by combining 2 different amp files???
Independently from the IDE you are using, it is possible to setup an All-In-One project to fetch and apply several extra amps before starting up (either from a local or a remote maven repo) :
Create a new amp (Optional)
Build a release for your amp (Optional)
Add dependency for your amp in your project (You may need to add a repository as well)
Add an overlay for your amp to either share or repo (depending on the nature of your amp)
Run and enjoy
To learn more about this process please check the official documentation here
UPDATE : In the case of uploader-plus amps, you need either to fetch projects from here and install them locally (using mvn clean install) or add reference in your pom to this maven repo :
https://oss.sonatype.org/content/repositories/releases/ but I can see only v1.2 is released there so you probably would want to stick to option 1 !
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
We have a RCP application which includes domain specific configuration files(properties file, and few folders containing xml's) in its installation directory. We have provided update support through P2 framework which works for plug-ins and features, But now we are planning to provide update support for the configuration files as well.
Is it possible to update the configuration files with P2 framework?
Any link to do the same would be helpful.
What you need is the so-called "root files" (do not mix up with "root IU").
An example of those is org.eclipse.equinox.executable feature which includes the .exe/.so files which are installed to the root directory of your product.
There are several ways to achieve it, here the simplest one:
create a feature project named xyz.feature
place all files you want to have in the root of your product into the /xyz.feature/root.files/ directory
create the following entry in the /xyz.feature/build.properties:
root=root.files
Include this feature in your main feature / product configuration
Export the feature/product into a p2 repository
You can examine the resulting p2 repo to see what p2 does exactly with this magic "root=" property key on export.
I'm trying to implement the p2 update mechanism into an RCP application that contains DLLs (integrated via JNI). The whole RCP application (including these DLLs) has to be kept up to date.
Currently the PDE build is not aware of the DLLs - make/gcc generates and copies them into the delivery in the end.
How to make p2 aware of the DLLs? They have to be added to the p2 repository and p2 within the RCP application has to update them, when newer versions are available.
Include the DLLs in your plugin.
After you have gnerated them, copy them into a folder in your plugin project. Then add the folder containing the DLLs to the Binary Build section in your plugin.xml editor. You can make the plugin aware of the DLLS using the Bundle-NativeCode: entry in the Mainfest.mf of the plugin. This way the DLLs are included inside your plugin's jar and are therefore automatically included in your p2 repository.
I am trying to deploy a version of Eclipse and would like control over the default repository list. See my earlier question.
In my other question, I learned that this is stored in the user's home directory under ".eclipse\org.eclipse.platform_3.7.0_525061626\p2\org.eclipse.equinox.p2.engine\profileRegistry\epp.package.cpp.profile\.data\.settings\org.eclipse.equinox.p2.metadata.repository.prefs".
I would rather not deploy this file to a user specific location because there might already be one from another Eclipse installation and there could be more than one user account.
Is there any way that I can avoid the user profile?
I did find an equivelent file under the main Eclipse folder "eclipse\p2\org.eclipse.equinox.p2.engine\profileRegistry\epp.package.cpp.profile\.data\.settings\org.eclipse.equinox.p2.metadata.repository.prefs" but changing this didn't make any difference.
Thanks,
Alan
You can use p2 touchpoints and the p2 director to install your feature to customize the version of eclipse you are trying to deploy.
See p2.inf for an example of touchpoint configuration instructions that add p2 repositories to the default install. This one is part of an sdk.product generation. If you are starting with an eclipse that already has a product, your touchpoint instructions would have to remove the repositories that were already included and then add your own.
instructions.configure=\
addRepository(type:0,location:http${#58}//download.eclipse.org/eclipse/updates/3.8,name:The Eclipse Project Updates);\
addRepository(type:1,location:http${#58}//download.eclipse.org/eclipse/updates/3.8,name:The Eclipse Project Updates);\
addRepository(type:0,location:http${#58}//download.eclipse.org/releases/juno,name:Juno);\
addRepository(type:1,location:http${#58}//download.eclipse.org/releases/juno,name:Juno);
The way that I ended up doing this was to create a lightweight plugin that starts when Eclipse loads. This then programatically adds the update site as detailed here: https://stackoverflow.com/a/7384954/101642