cancel
Showing results for 
Search instead for 
Did you mean: 

How to setup Nuxeo IDE properly to develop plugins and run tests?

Dirk_Wenke
Confirmed Champ
Confirmed Champ

Hi, I've browsed many pages in the documentation and in the forum, but I did not really find what I am looking for. I am fairly new to Nuxeo and want to build different plugins to extend the platform.

For that I installed Nuxeo IDE together with the Nuxeo 5.5 SDK. As I wanted to be able to take a look into the sources and also debug the Nuxeo code, I downloaded the Nuxeo sources, built them with the clone script, made the bundles conform to eclipse and imported the source bundles in my eclipse workspace. So far everything worked fine.

I was able to create a new Nuxeo Plugin Project, to deploy it on the server and also to debug my plugin. But now I want to write JUnit tests for my plugin. If I try to run the tests from eclipse, an exception is thrown "Exception occured executing command line. Cannot run program C:/.../jre7/bin/javaw.exe". I searched google for this problem and it seems like the classpath is too long. I assume that the "Nuxeo SDK" and "Nuxeo SDK (Tests)" libraries are causing the problem, because as fas as I can see these are the only dependencies.

So what do I have to do to setup my plugin project in eclipse properly?

And one additional question: When I start Nuxeo stand-alone for the first time, there will be some Installation options like the database settings. If I start the server out of eclipse, some default settings are used. Can I configure these settings somewhere? I want that nuxeo stores the data in my SQL Server. And if I would be able to run the junit tests, is it possible to configure for the tests separately which database should be used?

Thanks, Dirk

1 ACCEPTED ANSWER

Laurent_Doguin
Star Collaborator
Star Collaborator

Hi Dirk,

First of all if you've added a Nuxeo SDK, you already have the sources in eclipse's classpath.

As for the too long classpath issue, I usually put Nuxeo SDK at the root of my disk. Like c:\nuxeo.

And yes there is a difference between starting Nuxeo from Eclipse than from the launcher. This is because they use a different nuxeo.conf file. If you start it from eclipse, the configuration file used is yourServer/bin/nuxeo-sdk.conf whereas it's usually yourServer/bin/nuxeo.conf. So you need to edit nuxeo-sdk.conf .

Unit tests are usually launched in an embed H2 database but you can use any SQL database supported by Nuxeo using specific annotations.

View answer in original post

2 REPLIES 2

Laurent_Doguin
Star Collaborator
Star Collaborator

Hi Dirk,

First of all if you've added a Nuxeo SDK, you already have the sources in eclipse's classpath.

As for the too long classpath issue, I usually put Nuxeo SDK at the root of my disk. Like c:\nuxeo.

And yes there is a difference between starting Nuxeo from Eclipse than from the launcher. This is because they use a different nuxeo.conf file. If you start it from eclipse, the configuration file used is yourServer/bin/nuxeo-sdk.conf whereas it's usually yourServer/bin/nuxeo.conf. So you need to edit nuxeo-sdk.conf .

Unit tests are usually launched in an embed H2 database but you can use any SQL database supported by Nuxeo using specific annotations.

Thanks Laurent, putting the SDK at the root of the disk was the solution. Maybe this should be mentioned somewhere in the documentation?

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.