TracNav
Get Started
Documentation
NEPOMUK
Eclipse Development
This page helps Java developers to get started developing Nepomuk Components using the Eclipse IDE. Note that there are three differnt ways to program, each requiring a different setup. After reading it, you can continue on the related pages:
- EclipseDevelopmentGuides - specific guides for frequent development tasks
- VersionManagement
- DeclarativeServicesInOsgi
- ServletsInOsgi
- JspPagesInOsgi
- EclipseVisualEditor
If you have troubles, if you have worries:
Getting started with Eclipse for Nepomuk
You need
- Eclipse 3.2 (or higher, such as 3.3)
- Subversion plugin for Eclipse
- Java 1.5
Developing PSEW (DFKI Version)
Use these SVN locations:
- https://dev.nepomuk.semanticdesktop.org/repos/branches/dfkinepomuk/ - HTTPS if you have a NEPOMUK account and need write access later
- http://dev.nepomuk.semanticdesktop.org/repos/branches/dfkinepomuk/ - HTTP if you only need read access
If you want to develop for PSEW (DFKI reduced version), do this:
- Download the file
- org.semanticdesktop.nepomuk.dfkipsew.psf from the SVN. This is a team project set that can tell eclipse which projects it should check out.
* Create a new eclipse workspace and import the needed projects
- Start Eclipse and create a new workspace (you must use a separate workspace for PSEW)
- ATTENTION: WINDOWS USERS MUST USE A SHORT WORKSPACE PATH! Use C:\nepomuk or similar, because if not, you will not be able to check out NEPOMUK because of filename length restrictions under windows!!! The project contains very long filenames in nested folder structures, use a short workspace folder.
- In the Eclipse IDE choose File -> Import -> Team -> Team project set
- Set the file name to the previously downloaded .psf file
- Click finish.
- If you can't import it because you have a different Subversion client: look into the .psf file and checkout the projects yourself.
- If you can't import them because of "access denied" ("Error getting dir list") because its HTTPS security, change all SVN URIs to HTTP.
After these steps, you should have 8 projects in your workspace that are needed for building and running PSEW. They are:
- EclipseTargetPlatform2.0
- org.semanticdesktop.nepomuk.psew
- org.semanticdesktop.nepomuk.psew.core
- org.semanticdesktop.nepomuk.psew.datawrapper
- org.semanticdesktop.nepomuk.psew.explorer
- org.semanticdesktop.nepomuk.psew.ontologyexplorer
- org.semanticdesktop.nepomuk.psew.pimo
- org.semanticdesktop.nepomuk.psew.product
Now you need to configure Eclipse to the JAR files contained in the downloaded plugins as "target platform".
- Open the file "psew.target" in the EclipseTargetPlatform2.0 project and choose "Set as target platform" in the upper right corner in the editor. This will reset your Eclipse development environment to "cross compile" for our Nepomuk version of eclipse.
To verify if this worked, you can go to the settings, see the plugin-development settings for the target platform and check if it looks something like this (for linux users: this is a windows screenshot, adapt the paths to your real workspace):
To Start PSEW in developer mode:
- Open the file "PSEWCompleteProduct.product" in the org.semanticdesktop.nepomuk.psew.product project, choose "Synchronize" and then "Launch eclipse application" in the bottom left part of the window.
- You should have PSEW up and running.
When you start NEPOMUK this way, it will store its data into the workspace of the run target (= in a developer version of nepomuk). It will still store .lock files into your home directory, but will not access your personal semantic desktop data. To change that, see DataFolder#WhenDevelopingNEPOMUK
Developing NEPOMUK Server (headless)
If you program on the common Nepomuk platform, add this SVN repository URL to Eclipse:
- https://dev.nepomuk.semanticdesktop.org/repos/trunk/java/ - HTTPS if you have a NEPOMUK account and need write access later
- http://dev.nepomuk.semanticdesktop.org/repos/trunk/java/ - HTTP if you only need read access
To develop the headless (user-interface-less) version, you need to check out two projects from SVN:
- org.semanticdesktop.nepomuk.server.product
- EclipseTargetPlatform2.0
Then you have to set the the Eclipse Target Platform to run and develop Nepomuk: EclipseTargetPlatform2.0 contains a complete installation of the Nepomuk Java components, it is a collection of OSGI bundles.
Target platform bundles are put into different folders:
- eclipse32 - Eclipse 3.2 platform itself.
- external - external dependencies, i.e. libraries that Nepomuk project uses without any modifications.
- shared - common Nepomuk components.
- server - Nepomuk components specific for server side.
- client - Nepomuk components specific for client (PSEW) side.
Three pre-selected sets are provided:
- server.target - include eclipse32, external, shared and server bundles. Use it for Nepomuk server development.
- client.target - include eclipse32, external, shared and client bundles. Use it for PSEW development.
- client-host.target - same as client.target, but using Eclipse platform provided with Eclipse IDE instead of bundles from Nepomuk SVN.
You now need to set Eclipse to use this platform for development and running Nepomuk.
In EclipseTargetPlatform2.0 project, double-click on server.target file, and then click on Make this target the current target platform:
Alternatively, you can go to Window > Preferences window, select Plug-in development > Target Platform. Specify location of target platform, for example EclipseTargetPlatform2.0/server/eclipse, and click Reload.
If target platform is changed later (for example, after updating from SVN), just go to the same configuration window and click Reload.
Start Nepomuk-OSGI
You should have now two projects in your workspace, and have the Eclipse TargetPlatform set to the right place. now start Nepomuk by
- double-click on the org.semanticdesktop.nepomuk.server.product file in the project of the same name
- click on Launch the product
Interact with Nepomuk-OSGI services
The console will show the OSGI console, something like this:
osgi> .... starting this and that .... osgi>
If only the osgi> prompt shows up and no further initialization happens, check paths in the ETP2.0 project.
Enter some wise commands and see what happens:
osgi>start org.semanticdesktop.nepomuk.comp.rdfrepository osgi>help osgi>bundles
To see the SOAP services, go to this address in your webbrowser. If the XFIRE service started correctly, it will show you all registered SOAP objects and their WSDL files.
Stopping Nepomuk-OSGI
go to the OSGI console and type this, to safely shutdown the OSGI runtime and close all services appropriately. System.exit() is bad for you.
osgi>close
If you want to change individual components you can checkout the bundles as projects, these will then take precedence over the bundles in the TargetPlatform (if not, check the right boxes on the plugins tab of the run menu!)
Guides
No you can continue with the multuple EclipseDevelopmentGuides.
Once you have Eclipse working, go back to the NepomukTutorial to learn about how to program with the services, fix bugs, create JSP pages, or develop your own services.
Problems and Fixes
Moved to separate wiki-page at EclipseDevelopmentProblemsAndFixes
Attachments
-
newplugin.png
(23.1 KB) - added by LeoSauermann
4 years ago.
screenshot of creating a new osgi plugin
- EclipseDevelopmentStartNepomuk.gif (22.4 KB) - added by EnricoMinack 4 years ago.
- newplugin-helloworld-template.gif (12.9 KB) - added by EnricoMinack 4 years ago.
- newfeature.png (19.4 KB) - added by EnricoMinack 4 years ago.
- newfeature-addfeature.png (38.5 KB) - added by EnricoMinack 4 years ago.
- newfeature-addplugin.png (35.0 KB) - added by EnricoMinack 4 years ago.
- newfeature-dependencies.png (19.1 KB) - added by EnricoMinack 4 years ago.
- delete-nepomuk-config.png (41.3 KB) - added by EnricoMinack 4 years ago.
- clear-config-before-launching.png (37.2 KB) - added by EnricoMinack 4 years ago.
- export-interface.png (26.3 KB) - added by EnricoMinack 4 years ago.
- import-interface.png (24.8 KB) - added by EnricoMinack 4 years ago.
-
1_selecttargetplatform.png
(246.8 KB) - added by LeoSauermann
4 years ago.
Selecting the target platform for the Eclipse runtime to the nepomuk installation.
- newplugin-addtoconfig.jpg (131.4 KB) - added by GunnarGrimnes 4 years ago.
- target_platform2.PNG (59.0 KB) - added by MikhailSogrin 3 years ago.
- target_platform.png (106.6 KB) - added by MikhailSogrin 3 years ago.
- builddialog.png (30.4 KB) - added by GunnarGrimnes 3 years ago.
- psew-targetplatform.jpg (223.7 KB) - added by leosauermann 17 months ago.


