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

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

0 votes

1 answers



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.

1 votes

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