Creating an Eclipse "Distribution"? - eclipse

In the context of creating a custom Eclipse distribution for a development team.
How would I go about building a custom Eclipse distribution containing a specific set of plugins? Would it be difficult to also add a kind of update site to put specific versions of the plug-ins from which the customized eclipse would update?

I realize this is an old post, but it keeps coming up on searches I do and I’d like to put in some more details given all the changes and maturity that has occurred when it comes to delivering Eclipse plug-ins... So, for those who end up on this page, hopefully the following will help you out!
To summarize my personal findings:
There have been many improvements in this space both in open source and commercially
The complexities of distribution are often greater than expected
Build on the backs of others, it is worth it!
And while I work for a company offering a commercial solution (http://genuitec.com/sdc), I’ve tried to answer below with the practicalities of Eclipse delivery using free solutions.
So, without further adieu...
The absolute minimal solution is to download an Eclipse package from Eclipse.org, add the plugins you want, set the -clean parameter in the eclipse.ini, zip up the directory and hand it around your team. As long as you added the features from your internal update site (and the URL remains constant), Eclipse will be able to update from it.
This will work the first time, and since it's easy, it's what most people start out doing. But it ignores the lifecycle of your tool stack. Here are some pain points I've encountered while helping customers with their Eclipse tooling:
Eclipse Packages: You have to be an Eclipse/p2 guru to set up and maintain Eclipse packages. The EPP tools allow you to build your own packages, but you need a lot of domain knowledge around Eclipse packages, p2, and the EPP tooling. A place to start is http://wiki.eclipse.org/EPP/How_to_build_a_package_locally
Plugins: Finding plugins involves lots of hunting for update sites and then you can never be sure you got the exact right binaries. Sometimes update sites go down, or you lose support for your Eclipse version when the plugin developers release a new update site. One suggestion is to make local copies of update sites to mitigate your exposure to such problems.
Eclipse Updates: If you want your team to switch Eclipse versions, you'll end up just rebuilding your tool stack on the next version and having everybody reinstall. There's no way around this when just shipping a zip.
Plugin Updates: Eclipse is designed to keep installing the new version of plugins, but in large production teams that can be counterproductive. Local mirrors of update sites can help with this as long as your team doesn't go out and add their own update sites.
Security: Do you need to prevent your team from installing some software? What about requiring signed tools? You'll have to write plugins to limit the features of your package and you may have to sign plugins yourself. The PDE build has some support for signing.
Long Term Maintenance: Rebuilding a tool stack in a few years (or sometimes a few months) can be close to impossible as support for different versions of Eclipse and different plugin versions comes and goes dynamically in the Eclipse ecosystem. Save off copies of your Eclipse packages. Buy big hard drives. Mirror the update sites you use.
Workspace Setup: You can deploy an Eclipse to your team, but that's just the first step in the process. Automation for workspace setup, e.g. preferences, projects, Checkstyle or PMD configuration, goes a long way in reducing the amount of time your team spends getting ready to work. Additionally, these settings change often as you add projects creating continuous management hassles. When passing around a zip, I've seen teams also pass around a corresponding WIKI page or something similar. It's usually up to each developer to make sure they follow the steps.
Managing Multiple Packages: Maybe you have one package for your dev team and another for your QA team. And then your dev team grows and splits into two groups with slightly different tooling needs and now your QA team needs multiple packages too. And then you start shipping your own plugin on top of Eclipse so that's another package that you are managing. After a few years of this, you spend all your time building Eclipse packages and you became a Eclipse/P2/Update Site guru without even trying. Clearly, the solution here is to hire somebody to do this for you. :)
SMS Distribution: This works reasonably well with a zip file, but pushing out updates gets messy. Usually, people use SMS to drop down the first install, and then it's the developer's job to keep it up to date.

Eclipse is not one of those applications that need to be "installed" since it can just be copied into a directory structure and have shortcuts set up for running it (a la the BIRT all-in-one distributions).
I would suggest installing it on one machine, getting all the plug-ins installed, then just zip up the directory and use that to distribute to other machines.
And running your own update site isn't that difficult, you just need a server into which you install only the versions of the plug-ins you need and ensure your distribution points to that server before making the zip file. There's nothing stopping your developers from connecting to another site as well.

Answering to Lokki's original question, team leader can create team own "distro", as .p2f file,
that contains plugins ID, update site and exact version to use.
Use (File -> Export -> Install -> Software Items to file) to prepare plugin list file (*.p2f),
File example
<?xml version='1.0' encoding='UTF-8'?>
<?p2f version='1.0.0'?>
<p2f version='1.0.0'>
<ius size='5'>
<iu id='org.chromium.sdk.feature.group' name='ChromeDevTools SDK' version='0.3.9.201302091448'>
<repositories size='1'>
<repository location='http://www.tomotaro1065.com/nodeclipse/updates/'/>
</repositories>
</iu>
<iu id='org.chromium.debug.feature.group' name='Chromium JavaScript Remote Debugger' version='0.3.9.201302091448'>
<repositories size='1'>
<repository location='http://www.tomotaro1065.com/nodeclipse/updates/'/>
</repositories>
</iu>
<iu id='com.eclipsesource.jshint.feature.feature.group' name='JSHint Eclipse Integration' version='0.9.6.20130319-2128'>
<repositories size='1'>
<repository location='http://github.eclipsesource.com/jshint-eclipse/updates/'/>
</repositories>
</iu>
<iu id='markdown.editor.feature.feature.group' name='Markdown Editor' version='0.2.3'>
<repositories size='1'>
<repository location='http://winterwell.com/software/updatesite/'/>
</repositories>
</iu>
<iu id='org.nodeclipse.feature.group' name='Nodeclipse' version='0.2.0.201302091448'>
<repositories size='1'>
<repository location='http://www.tomotaro1065.com/nodeclipse/updates/'/>
</repositories>
</iu>
</ius>
</p2f>
then (File -> Import -> Install Software Item from file)
Eclipse Node.js IDE is assembled this way.
This question is related to
Eclipse IDE: install set of plugins

I may interesting to anybody trying to assemble their own Eclipse distro to get acquainted with the Eclipse Packaging Project http://www.eclipse.org/epp/. To setup a private update site, Sonatype's Nexus Professional serves exactly that purpose (commercial license).

Just zip up the C:\eclipse\plugins directory and distribute.
Just ensure that developers start Eclipse with the "-clean" option to ensure that any changes are incorporated.

Related

How to create an entire Eclipse installation package?

Is it possible to create an Eclipse installation package, that contains a bunch of bundles and plugins? If so, how? (Like the ones that are already being offered by Eclipse.org and also from different vendors with their own projects)
The reason I am asking is, that I find it very time-consuming to install a bunch of software into development environment every time I need a clean installation of Eclipse (based on various reasons, corruptions etc.).
So I would like to install all the software I need at once, and save it somewhere else before working with it (as a backup) and if something goes wrong I can install the entire base installation again without being have to handle all the extra software in it.
Thanks!
Eclipse is downloadable as a zip or tar file, so you can dezip it in a folder, add your favorites plugins (their will be store in the eclipse folder in plugins subfolder) and create a new archive with your modified environment (your eclipse folder).
I think It's the simple way to create a backup.
I hope it may help you,
Have a nice day
One option is to use Yoxos, which allows you to create your own package of Eclipse and easily share it (including with yourself).

Import multi module project in Eclipse

I am trying to get started with Eclipse SCADA and import the projects from their git repository.
I have cloned the following projects:
org.eclipse.scada.external
org.eclipse.scada.utils
org.eclipse.scada.base
org.eclipse.scada.protocols
org.eclipse.scada.core
org.eclipse.scada.releng
For each project I did mvn verify in the parent folder and imported the projects in Eclipse. I also changed target platform. However, I still seem to have problems with their dependencies.
Any help would really be appreciated.
Actually the Eclipse SCADA java projects are not developed with "Maven first". So you should disregard maven completely while in the IDE. The maven build is basically only used to build the project unattended.
The issue with the target platform is more complex. We were a bit sloppy in providing a always working target platform (and it is actually difficult to keep them up to date, since the versions of the bundles are fix).
I made a target platform file for the current version, you can find it here: https://gist.github.com/CptMauli/ec6eda37734f0108510f
To make it work properly please download a classic eclipse put it somewhere and create an environment variable ECLIPSE_432_HOME which points to it. Alternatively you can just change the first entry in the target file and point it directly to it.
The reason behind it is, if you would use your own eclipse installation, it is possible that bundles installed there conflict with bundles provided in the target platform or from your workspace. This is actually mostly not even a problem when compiling, but as soon as you start a client or a server, Eclipse will complain about duplicated bundles.
If you have any more questions please go to our mailing list: https://dev.eclipse.org/mailman/listinfo/scada-dev
or our google group: https://groups.google.com/forum/#!forum/openscada
or write to me directly at juergen dot rose at ibh-systems dot com

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.

Moving my GWT, GAE installation into my project for source control

I use the google plugin for eclipse with GWT and Appengine libraries. Every so often I upgrade one of the libraries, which currently involves:
I install the update somewhere on my HD
I add the update as an alternative SDK in eclipse, with a generic name
I update the project settings to point to the new generic name
I commit the changed settings files (which do NOT include the upgraded library) to our source control
The problem here are in unfortunate steps 5-7:
5 Everyone else's builds stop working past the change,
6 I go from machine to machine, repeating steps 1 and 2, and
7 I think for the nth time, "I should really find a way to automate this."
I'm here for the elusive step 8: Actually automating this. I want to include the SDK in my source control, so when I switch between versions or set up shop on a new machine, the relevant SDKs are automatically installed and downloaded. I don't want to have to configure eclipse settings at all. In my ideal situation, I am willing to install Eclipse and the GPE on each machine, but after that I just want to clone my repository and go.
I've tried doing this by removing the GWT library from my build settings, copying the entire GWT installation folder into the root of my project, and adding gwt-user.jar and gwt-dev.jar to the build path from there. This almost works, but eclipse complains that it can't find gwt-servlet.jar (even though it exists precisely where it claims to be looking for it!). There also seem to be other magical settings I don't understand.
Finally, the question: If this is the right track, what settings do I need to manually control? If this is the wrong track, what's the right one?
+1 good question. This may or may not answer your question, but I can share with you what I do. I also work with GAE and GWT.
I just include the SDK .tar/.zip files in my repository, remove the version numbers from the filename, and update it when I want to move to a new version. If that version migration fails, I can easily revert to the old SDKs. I also use GXT and a bunch of other GWT extensions, so my problem is even worse than yours. I don't use eclipse for GAE nor GWT, so I can't relate to the problems you are having there. If you don't want to have to configure eclipse every time, then don't use eclipse.
Disclaimer: I hate eclipse.

Managing team bundles

We are moving our application to the OSGI platform (All developers are using Eclipse) and are trying to figure out the best team environment for developing our bundles.
We have bundles from multiple sources:
Common bundles from projects such as Orbit or Apache that are managed by outside agencies.
Bundles that wrap domain specific jar files. We manage these bundles internally.
Bundles provided by other teams in the company that are effectively read only for us
Bundles provided by our team that contain actively developed source code.
In cases 1-3 we would like install in our local Eclipse IDE and provide a target platform. It seems to me we would just create a p2 repository that provides all of the bundles in 1-3 and provide them as a target definition. Feel free to point out a better solution if there is one.
The bundles contained in case 4 are stored in a Mercurial repository. Although the target definition looks like it can grab bundles from several sources it does not address how to include bundles from a (d)vcs.
What is the best practice? Do we put our (d)vcs bundle information in the target platform and just make developers download the correct bundles manually? Also how do we manage changes to the target definition? Do we have to email everyone when it changes, or is there a more elegant solution?
Thanks for your help.
space to share the target to the developer. The disadvantage is, that we have artifacts in our SVN!
But the p2 repository sounds much better. When every devloper activate auto-update, he will informed when updates avaiable.
I think we must try it in the future at my company.
Our actively developed source code we share by Team Project Sets (*.psf). This is an single text file which contains all repository information of the exportet eclipse projects. Try it in your Eclipse IDE with File -> Export -> Team -> Team Project Set. Are there any changes on the Project Set actually we send an email to our developers. An more elegant way I think is it to share it over the p2 repository.
I hope that helps and sorry for my bad english!
I am using eclipse, m2eclipse, maven-bundle-plugin, subversion, nexus and hudson, and it works like a charm, especially in a team environment.
Automating the manifest.mf generation is critical in OSGi, because doing this by hand is very error-prone. Use bnd for this (automated by bndtools or maven-bundle-plugin)
Pax Construct can help in building a complete OSGi runtime environment.
It's better to use Apache Maven [1] if you like to use Eclipse-independent environment.
Pros:
all your artifacts will be stored in one Maven repo. You can use such tools like Artifactory [2] to create and share Maven repo for whole team (to avoid any problems with 3rd-party artifacts)
there a lot of OSGi Maven tutorials available that help you to find answers to almost all your questions
Eclipse supports Maven very well with m2Eclipse [3] plugin
IDE is not so important in this case. Your team members can select any (even vi or emacs)
Cons:
you have to find Maven repos for all your artifacts. It's not so easy for Eclipse artifacts, but you can try to find them here: [4]
change your project structure based on Maven requirements
spend some time to understand and use Maven patterns (for OSGi)
[1] - http://maven.apache.org/
[2] - http://www.jfrog.org/products.php
[3] - http://m2eclipse.sonatype.org/
[4] - http://build.eclipse.org/helios/hybrid/final/
Regards,
Dmytro
Thanks to everyone who answered for the insight into how others are solving this problem.
We ended up going with Buckminster. It allows us to quickly describe where all our bundles are (cases 1-3 from p2 repositories, case 4 from mercurial) and provides one click setup of empty workspaces through the CQuery. It also integrates well with Hudson and simplifies CI setup compared to the PDE build I have used on other projects.