Skip to content

Developing on the service registry

mkalam-alami edited this page Feb 13, 2012 · 29 revisions

Development environment

Check out the EasySOA repository, do a mvn eclipse:eclipse at the root of the maven projects (in easysoa-registry/), import them all in Eclipse and you're ready to go !

In order to build and deploy the service registry plugins, you can either:

  • Use [Buildr](Development Environment) (recommended). Configure your Nuxeo location thanks to easysoa-distribution/build.yaml, then build and deploy by typing buildr nx_mvn nx_dist from the easysoa-distribution folder.
  • Build them using Maven (mvn clean install from the easysoa-registry folder), them move the easysoa-registry/target contents to your Nuxeo root folder.

About the "nuxeo-ecm" project

This pom project has only been set up to resolve compatibility issues between Nuxeo and Sonatype's M2Eclipse. You should keep this project open in your Eclipse workspace so that M2E refers to this projects pom.xml, and not to the "real one".

If you're having errors in the easysoa-registry-* projects, use M2Eclipse's "Update project configuration" option to update the dependencies references.

Quick reference

Debugging

To debug Nuxeo, in bin/nuxeo.conf uncomment or adapt the following line :

JAVA_OPTS=$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n

Then restart the server, connect your debugging environment (ex. Eclipse > Debug configurations... > Remote Application) to said local port (here 8787), and start placing breakpoints.

Testing

To test (with JUnit) Nuxeo developments, there must be a runnning Nuxeo server, or at least part of it. There are several ways :

Embedded Nuxeo using custom Feature annotations

Use a custom JUnit Feature, and annotations to configure an embedded Nuxeo deployment. Available features :

(older, obsolete) Embedded Nuxeo using Nuxeo helpers

Extend org.nuxeo.runtime.test.NXRuntimeTestCase, and use the deployBundle, deployContrib methods & others to configure an embedded Nuxeo deployment. Example : see org.nuxeo.ecm.core.storage.sql.SQLRepositoryTestCase

Full Nuxeo deployment

Write tests that interact remotely with a manually deployed Nuxeo by extending [NotificationTestCase] (https://github.com/easysoa/easysoa-model-demo/blob/master/plugins/easysoa-model-demo-rest/src/test/java/org/easysoa/test/rest/tools/NotificationTestCase.java), or using other remote interaction alternatives as described above.

Developing a new feature

Overview

Developing a new feature for the Service Registry implies one or more of :

  • Enriching the model
  • Displaying it in Nuxeo's JSF interface
  • Developing new services
  • Exposing them as REST using the Nuxeo Web Engine
  • External development using them
Clone this wiki locally