Instructions for creating a CDM Library Eclipse Plugin
Initial setup
If you are following this procedue for the first time make sure you have the following eclipse projects in your workspace
eclipse-feature eclipse-feature-source eclipse-plugin eclipse-updateSite
Building the plugin
- Synchronize your working copy with the repository (svn update).
- Install all .jar-files with maven (mvn install).
All means: cdmlib-commons, cdmlib-model, cdmlib-persistence, cdmlib-services, and cdmlib-iocdmlib-ext(cdmlib-remote is not needed at the moment.)
You can call mvn install from your main workspace directory to build all projects at once.
If you experience compilation problems or problems running the unit tests then remove the targets of those projects that cause problems and try again.
- Copy all created jars into the plugin base directory (.../cdmlib/eclipse-plugin).
Windows: eclipse-plugin/_makeSources.bat can be used for this but you need to adapt the paths. You can run _makeSources.bat by double-clicking it in Windows Explorer. You will see the copied jar-files in Windows Explorer.
*NIX: run eclipse-plugin/_makeSources.sh from command-line. If your maven repo resides under ~/.m2 there shouldn't be a need to adopt paths.
Refresh eclipse-plugin afterwards.
- If new external jars are needed (a new dependency has been added to the pom.xml files of one of the projects):
- The according jar (and the source code jar, if available) has to be added to the plugin base-directory. You may find these files in your maven repository (.m2).
- Refresh your eclipse-plugin project.
- Openplugin.xml within eclipse-plugin from Eclipse IDE.
- In the "Runtime" tab, the jar has to be added to the classpath.
- Open site.xml within eclipse-updateSite. Goto page "Update Site Map/Managing the Site". Remove the old features from "cdmLibrary". Make sure to have "cdmLibrary" selected and click on "Add feature". Select features eu.etaxonomy.cdmlib(2.x.x.qualifier) and eu.etaxonomy.cdmlib.source(2.x.x.qualifier). The feature should now be a child element of "cdmLibrary". Click "Build All".
- Commit the changes in eclipse-feature, eclipse-plugin, eclipse-updateSite.
At least feature.xml, site.xml, and MANIFEST.MF should have changed.
Deploying the plugin
The resulting files may be found at cdmlib/eclipse-updateSite. They have to be deployed to a webserver directory of the corresponding eclipse-update-site. Only site.xml and the newest versions of the plugin and the feature have to be copied. To provide a stable version of the plugin we installed two different update sites, one holding experimental versions - to be used by developers only - and a production site, that holds a (guaranteed) working version of the plugin.
Developer update site
The developer update site may be found at http://dev.e-taxonomy.eu/cdmlib/update. The developer update site is intended for experimental versions of the plugin. There is no guarantee that these versions will work at all. Files should be copied into this directory structure:
192.168.1.17:/var/www/dev.e-taxonomy.eu/cdmlib
Production update site
The production update site resides at http://wp5.e-taxonomy.eu/cdmlib/update. Physical path to the webserver directory would be
192.168.1.17:/var/www/wp5.e-taxonomy.eu/cdmlib
