Bundle pooling and p2 director - eclipse

I am experimenting with using bundle pools with p2 director and not having a lot of luck. Here is the command that I am running:
java
-Xmx512m
-cp
[launcher-path]
org.eclipse.core.launcher.Main
-application
org.eclipse.equinox.p2.director
-metadataRepository
[repo]
-artifactRepository
[repo]
-destination
[destination]
-bundlepool
[pool]
-installIU
[iu]
This does indeed place installed bundles in the separate pool location. However, when I run this command again, the plugins and features already in the pool are not re-used. Based on the time it takes for the command to run and the fact that files in the pool have new time stamps, it looks like p2 director re-downloads and re-writes exact same bundles and features into the pool.
What am I missing?

Below link contains very good explanation for the same thing.
https://ekkescorner.wordpress.com/2008/06/29/eclipse-ganymede-p2-shared-installations-bundle-pool/
https://wiki.eclipse.org/Equinox/p2/Getting_Started
I am not sure but may be below is usefull.
You can also use an own extra dropins folder: simply add a parameter into eclipse.ini (/your_path/Eclipse.app/Contents/MacOS):
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory= /your_path/e34shared_dropin

Related

HTTP Preview at localhost [Stopped, Syncronized]

I'm new to programming and I'm currently facing this problem.
[I leave here some pictures](https://i.stack.imgur.com/G35lr.png)
I tried downloading some files that I find on Internet searching the problem but it remained the same.
This are the files
Thanks for the help
There's a strange dependency problem happening as the platform moves to packaging SLF4J directly from Maven and recommended everyone else not require the bundle be present in their own features, resulting in some installations not having it when they should. Don't worry if that doesn't explain anything to you, a possible workaround is to manually install the bundle using the CLI, after exiting the IDE:
eclipse.exe -application org.eclipse.equinox.p2.director -repository https://download.eclipse.org/releases/latest -installIU org.slf4j.api

How to uninstall eclipse core components?

I will be glad, if my eclipse didn't have the mylyn and the cvs modules. I don't want them, I want them to get out. But the eclipse package management doesn't let me their removal.
I tried already to remove them from the packages & features directory, but it didn't work.
An ideal solution were, if existed some flag or settings in the eclipse packages, which contained the information from a package if it is removable.
Yes, I know that eclipse loads these packages only on need, but I want to remove, delete them forever and sow their place with salt.
Harsh. The simplest thing to do then is to start with the bare Eclipse Platform Runtime Binary download then add the things you do want.
http://download.eclipse.org/eclipse/downloads/drops4/R-4.3.1-201309111000/
Build your custom installation by using the p2.director application (from an SDK download) to install exactly those features you like to have. p2.director help
General description (accessing all kepler simultaneous release repos). Mind the the appendix <.feature.group> for features you want to install.
c:\<eclipse-sdk>\eclipsec.exe -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/eclipse/updates/4.3,http://download.eclipse.org/releases/kepler,http://download.eclipse.org/technology/epp/packages/kepler -installIU <feature1>.feature.group,<feature1>.feature.group,<bundleX>,<bundleY> -destination c:/eclipse -profile SDKProfile
concrete example installing only the SDK on windows (be patient for the download)
F:\__TEST\eclipse-SDK-4.3-win32-x86_64\eclipse\eclipsec.exe -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/eclipse/updates/4.3,http://download.eclipse.org/releases/kepler,http://download.eclipse.org/technology/epp/packages/kepler -installIU org.eclipse.sdk.ide -destination c:/eclipse -profile SDKProfile
You find the resulting installed product inside the destination c:/eclipse.

weird behaviour of eclipse osgi bundle

I'm trying to deploy a few bundles I implemented along all the required bundles from Eclipse in order to run my own. Let's say, include the Equinox container also with my bundles so it is like an executable old-school JAR.
That said, when I try to run
java -jar org.eclipse.osgi_3.8.1.v20120830-144521.jar
Nothing happens...it just stays there doing nothing...even if I copy just that bundle to some other place and try the same, nothing happens...is this usual? I mean, I have done this successfully with older versions of this bundle (3.6) and it worked flawlessly.
Alas, I tried -debug flag to see if I could get some output, but only a complain about mission .options file is happening, nothing else.
Thanks,
Alex
Just in case someone has the same problem...having checked this link: http://docs.codehaus.org/spaces/flyingpdf/pdfpageexport.action?pageId=82903240, I created the configuration folder, a config.ini in it with the following contents:
osgi.bundles=org.eclipse.equinox.common#start, org.eclipse.update.configurator#start,
org.eclipse.core.runtime#start, org.eclipse.core.jobs#start,
org.eclipse.equinox.registry#start, org.eclipse.equinox.preferences#start,
org.eclipse.core.contenttype#start, org.apache.felix.gogo.runtime#start,
org.apache.felix.gogo.shell#start,
org.eclipse.equinox.app#start,org.eclipse.equinox.console#start,
eclipse.ignoreApp=true
osgi.noShutdown=true
This seems to work. I believe this is the minimum set of bundles required to run the Equinox OSGi container...from there, you can use the osgi shell to play with your bundles
You havent included -console option, that is the one that will open up the console view right?

Plugins in dropins-catalog are not found

What could cause Eclipse to ignore plugins in the dropins catalog?
I've created a dummyplugin based on the Eclipse wizard, exported it to a jar. When dropping it into the drop-ins catalog of a fresh Eclipse installation, it works fine.
When I do the same thing but on a custom Eclipse installation, it doesn't work. The plugin doesn't even show up in the plugin registry view. No error messages or anything like that.
I've tried:
Running with -clean
Running with -clean -consoleLog but no errors were printed
Starting up with -console, and checking if the plugin is seen with the command ss, no luck.
Running with -Dorg.eclipse.equinox.p2.reconciler.dropins.directory=C:\Program\Eclipse\eclipse3.6\dropins\
Changing name of the eclipse catalog from eclipse3.6 to eclipse, in case I had run into a variation of an Eclipse bug
It's not due to dependency issues (like this question), since the plugin isn't even found
Update Copied the eclipse.ini from the working eclipse installation to the custom one, with the same result; The plugin wasn't found. So the issue isn't in the ini file
Update Thought the issue might be some rights issue, since I my user wasn't the owner of the custom installation. So I made a copy of the entire dir of the custom installation to make sure I was the owner with full rights. No change
Update Starting with a new workspace doesn't make any difference
Is it possible to define that Eclipse should ignore the dropins catalog? How?
The custom version of Eclipse defines a lot of variables, but nothing that seems related to p2 or the behaviour of dropins.
The dropins/ folder is a best effort, totally optional, silently failing legacy leftover. Not big on the diagnostics, as you've found.
If you use the director to install your bundle into your custom eclipse, at least you'll be able to get an error message that will tell you what the problem is.
I'd suggest exporting your jar with some minimal p2 metadata.
Then you use something like:
eclipse/eclipse \
-application org.eclipse.equinox.p2.director \
-noSplash \
-repository \
file://$HOME/eclipseUpdate \
-installIUs \
org.dojotoolkit/1.6.1.v201105210659
If p2 can't find some dependency, it should spew out the confusing error messages it can generate.
Hi #Fredrick I've made my own plugin and I've added to my eclipse in this way:
Export the plugin as Deployable plug-ins and fragements.
(Right click on the plugin project - Export - Plugin Development - Deployable plug-ins and fragements)
That will generate a .jar file that file you have to copied into \eclipse\plugins
Restart eclipse.
I'd say that will be all.

Target Platform for PDE Headless build does not work

I am currently trying to get my headless pde-build working but I am stuck on a point where I do not know how to continue.
The problem is how to define the related target platform to compile the plugins against.
I have a build.bat with the following call (all in one line!):
java -jar D:\target\eclipse\plugins\org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
-application org.eclipse.ant.core.antRunner
-f D:\target\eclipse\plugins\org.eclipse.pde.build_3.5.2.R35x_20100114\scripts\productBuild\productBuild.xml
-Dbuilder=c:\pde-build\scripts %*
I tried to create the target eclipse platform from different parts: The eclipse SDK, RCP SDK, Delta Pack, PDE-SDK in all combinations but none of them worked well.
I got the following error:
BUILD FAILED
D:\target\eclipse\plugins\org.eclipse.pde.build_3.5.2.R35x_20100114\scripts\productBuild\productBuild.xml:18: Cannot fin
d ${eclipse.pdebuild.scripts}/build.xml imported from D:\target\eclipse\plugins\org.eclipse.pde.build_3.5.2.R35x_2010011
4\scripts\productBuild\productBuild.xml
where the variable ${eclipse.pdebuild.scripts} does not got resolved. I also tried to give this parameter via the command line but then I got another error regarding missing svn task which is absolutely confusing as this is working with my local eclipse installation referenced.
When I replace the path from d:/target/eclipse to my local eclipse installation the pde build works as expected!
This leads my to the point that the configuration of the target eclipse is not correct but in the moment I have no idea how to configure this!
My goal is the automate the pde build first on my local site without referencing my local eclipse and later on integrate this building process into our running cruisecontrol instance.
As I saw already another question about defining the target eclipse I would be happy if anyone can contribute hints or facts regarding the problem.
Regards,
Andreas
When performing a headless build, the target can be separate from the eclipse that is actually running the build itself. The problem you had here is that the eclipse that you were using to run the build did not have PDE/Build properly installed.
This is why the ${eclipse.pdebuild.scripts} was not set, because PDE/Build was not installed into that eclipse instance, the org.eclipse.pde.build bundle was not resolved and the code that sets this property never got called. Similarly, the necessary ant classpath entries for PDE/Build tasks would not have been set up properly either.
You need the Eclipse with PDE installed inside to run the build, but the target for the build can be separate from this.
In the build.properties file found under -Dbuilder=c:\pde-build\scripts you can set several properties:
baseLocation This is a path to an eclipse that is your target.
buildDirectory This is where the build will actually take place, source is fetched to plugins/ and features/ subfolders, but if there are already binary plugins located here then those become part of the target as well.
pluginPath This is a list of paths (separated with ';' on windows or ':' on linux) containing other locations that should be considered as part of your target. These locations can be several things:
The root of an eclipse-like install with plugins/ and features/ subfolders. This is a good way to provide the delta-pack instead of just unzipping it on top of an eclipse install.
The root of a workspace-like folder, where all subfolders are treated as plugins or features depending on the presence of a manifest or feature.xml.
The root of a bundle or feature, or the jar for a bundle.
If you are doing a p2 build (p2.gathering = true) you can also provide p2 repositories under a ${repoBaseLocation} which will be transformed and placed under ${transformedRepoLocation} and will become part of your target, and the p2 metadata there will get reused during the build.
after some more time of investigation I found out, what I did wrong so far. As I mentioned above defining the target platform is not that easy as copying the SDK and plugins in into one location (as it was in early times of eclipse dev).
The working solution by now is the following: Copying the eclipse SDK into the target location and run this version. Install inside this the neccessary PDE-Tools to enable plugin development. After that, close the IDE and copy the delta pack + the respective svn plugin (I used org.eclipse.pde.build.svn-1.0.1RC2 from sourceforge) into the target platform and you're done.
Now my automated PDE build is running as expected.
Only minor issue now is the following: The result product contains eclipse-specific menu entries which are not there when I ran this from inside my dev-eclipse.
Any hints on that?
I just posted an answer to my question on this kind of topics, may be this can help you:
Plugin product VS Feature product