We have an Eclipse RCP product, for automation purpose, we'd like to export this product through the command line.
Actually, I found someone asked the similar questions before, such as Building Eclipse plugins and features on the command line. I followed the Eclipse PDE help guides, and built the product successfully by command line. But there is no executale file in the builded zip file.
How can I, by command line, get the same exported the RCP product as we get with the help of PDE UI? Thanks!
Calvin
Eclipse Tycho is a great way to produce Eclipse RCP products. I am using it to build both eclipse update-sites and a product. There are lots of examples online for how to setup your project files, like this one and this one.
Related
I am trying to automate the build process of RCP application. Currenty I'm having "ApplicationName.product" file im my RCP project. With the help of the file am exporting product. But I want to export the product through command line.
anyone have any idea on this?????
Thanks in advance.
You can use Tycho http://eclipse.org/tycho/ to manage your RCP projects by using Apache Maven, then you can test & build your RCP application from build automation system or command line by calling something like mvn package.
If you don't want to use Maven: the old-fashioned way to build RCP products is the ant-based PDE build. A good description how to set up your own build is Markus Barchfeld's article - it's quite old, but PDE build hasn't changed much since Eclipse 3.0.
How do I build and install an Eclipse plugin using ant? I want to build a plugin as a zip file and then install the plugin on 32bit or 64bit eclipse. What am I supposed to do here?
Indeed, using PDE/Build to achieve a so-called headless build is difficult, but not impossible.
We are still building our RCP this way.
I recommend reading Paulin's and Sharma's tutorials on the issue.
The Eclipse PDE has its own builder which is built on ant. I'm not sure from your question if you are looking to simply build/export your plugin within eclipse or generate ant build scripts that can be run outside of eclipse. The latter is more difficult. Inside eclipse you can simple go to file -> export -> Plugin-Development -> Deployable plugin and the export wizard will walk you through it, you can select to deploy a zip or exploded directory and then select output location and presto you have your plugin built as a jar that can be dropped into an eclipse instance. If you are looking to use ant outside of eclipse to build you need to go through a series of steps that are complicated to get a 'headless build", if this is what you need to do Google "pde headless" build. I've tried it but gave up. There is also a good book "Building highly modular systems with OSGI/Equinox that has a chapter devoted to this. - Duncan
I am developing a new plugin in eclipse. I need a plugin from internet (for eclipse, of course) which I can dissect and understand its implementation (by looking into plugin.xml etc.). It would help me create my own plugin.
I want your help in suggesting some plug-ins which I download and dissect, so that i can use that logic to make my own plugin?
I will now give an insight to my proposed plugin:::
My plugin would take in some input via a GUI interface from the user and then I should be able to convert all the user input into a text file and trigger a perl script. It sounds sloppy, but I am completely new to Eclipse and Plugins.
I just need some suggestions from you experts.
Thanks a lot!!!
If you download either the Eclipse Classic package or the Eclipse for RCP Developers package, they include source for Eclipse itself. You can use the Eclipse plugins themselves as examples.
I have a complex Eclipse Rich Client Platform GUI with 4 Eclipse plug-ins that I developed. I'm constructing it on Eclipse 3.5.2, Build id: M20100211-1343
It works just fine when I run it from inside of Eclipse as an Eclipse Application.
When I try to export the Eclipse Product using the export wizard on the Overview panel of the product file, I get this error:
'Export Product' has encountered a problem.
C:\BOPEclipse3.5RabId\.metadata\.plugins\org.eclipse.pde.core\temp\org.eclipse.pde.container.feature\package.org.eclipse.pde.container.feature.win32.win32.x86.xml:100:
The following error occurred while executing this line:
C:\BOPEclipse3.5RabId\.metadata\.plugins\org.eclipse.pde.core\temp\org.eclipse.pde.container.feature\package.org.eclipse.pde.container.feature.win32.win32.x86.xml:345:
C:\BOPEclipse3.5RabId\.metadata\.plugins\org.eclipse.pde.core\temp\assemblyLocation\tmp\gui\plugins\org.eclipse.equinox.launcher_1.0.201.R35x_v20090715 not found.
The following error occurred while executing this line:
C:\BOPEclipse3.5RabId\.metadata\.plugins\org.eclipse.pde.core\temp\org.eclipse.pde.container.feature\package.org.eclipse.pde.container.feature.win32.win32.x86.xml:345:
C:\BOPEclipse3.5RabId\.metadata\.plugins\org.eclipse.pde.core\temp\assemblyLocation\tmp\gui\plugins\org.eclipse.equinox.launcher_1.0.201.R35x_v20090715 not found.
I looked at the directory location given in the error. The equinox launcher plug-in is there.
The version 1.0.201.R35x_v20090715 matches the version in the error message.
I have the equinox launcher plug-in, and the win32.win32.x86 platform fragment in the Dependencies list of the product file.
I have the "The product includes native launcher artifacts" check box in the Overview panel of the product file checked.
I have org.eclipse.equinox.launcher in the list of Required Plug-ins in the Dependencies panel of the GUI plug-in XML.
I added "javacDefaultEncoding.. = UTF-8" to the first line of the build.properties file of the GUI plug-in. (I found this advice on a Japanese blog.)
I have cleaned the plug-in projects multiple times.
Edited to add what I tried today:
I created a new Eclipse 3.5 instance. Didn't help.
I copied the workspace and tried to use Eclipse 3.6. Same error, different line numbers.
I created a Hello World RCP and tried to package it on Eclipse 3.5. Same error. I used a different workspace. Same error.
I created the same Hello World RCP and tried to package it on Eclipse 3.6. Same error.
End of today's edits.
I've searched eclipse.org and the Internet.
I'm hoping that one of you has encountered this problem before, and can point me to a solution. If I ever figure out how to solve this problem, I will post the answer.
I think I've found the solution.
I can package the Hello World RCP if I set the JRE System Library to Java 1.5. I get the error when I set the JRE System Library to Java 1.6.
It's going to take a couple of days to convert my real RCP application to Java 1.5. I hope this solves the problem.
I've reported this problem to the Eclipse Foundation. It's bug number 337,235.
I have a simple RCP Plugin (with a product) and I want it to run in atleast Linux and Windows (32 and 64bit). I have a product that contains a Feature from which buckminster uses to create the p2.site. (I only use a build.properties and buckminster.properties files, no *.cspec and *.rmap files, since these probably get generated by buckminster from the RCP product/feature files).
My problem is that my feature has a link to the 64bit linux swt plugin (I'm running 64bit linux) but if I add references to the windows swt plugins to my RCP .product the buckminster build fails to resolve these plugins and then does not export the p2.site correctly.
How do I get buckminster to build the p2 site by looking at the dependencies of my RCP .product file and if it doesn't resolve the win32 or win64 swt libraries from my workspace that it will look else where for these dependencies?
I like the idea of buckminster determining my project dependencies from my .product file so I don't have to keep a .cspec and a .product file in sync, when I make changes to my project's dependencies. If the dependencies are not found on my workspace then I want buckminster to find the missing dependencies (could be all of them if running from Hudson server) from "maybe" a .rmap etc
You have to execute your site.p2 target several times, to provide a build for each platform.
See the tutorial on the Eclipse wiki or on Ralf Ebert's blog about more specific details.