Skip to content
jcarsique edited this page Apr 30, 2012 · 17 revisions

Using Nuxeo IDE

Nuxeo provides an Eclipse plugin that allows to launch server/deploy & hot reload projects easily. See this page for the complete documentation.

Set up

  1. Install the plugin thanks to this update site: http://community.nuxeo.com/static/nuxeo-ide/stable/site/
  2. Download the Nuxeo SDK from this address (doc) and unzip it
  3. Build the easysoa-registry projects, and copy the contents of easysoa-registry/nuxeo-packaging/lib/ to (SDK_FOLDER)/lib (1)
  4. Add the SDK to Eclipse thanks to Window > Preferences > Nuxeo > Nuxeo SDK
  5. Open the Nuxeo perspective from Eclipse
  6. Convert the registry bundles projects to Nuxeo projects (easysoa-registry-web must be set as a Seam project) (2)
  7. On the Nuxeo Server view, click the "Select projects" icon and create a "Deployment configuration" with all of the custom bundles you want to deploy (see below). Note: if your bundles require other non-default one that you don't want to hot-reload, you'll have to copy them manually to (SDK_FOLDER)/nxserver/bundles.

IDE2

(1) You'll need to do this step each time you edit a project used as a library, unless you make Nuxeo manage the libraries itself. In order to do that, go to Window > Preferences > Nuxeo > Nuxeo User Libraries and add easysoa-registry/nuxeo-packaging/lib/XXX.jar for each library:

IDE1

(2) If you're using m2eclipse, you might need to remove and the restore the Maven nature of the projects to let the Maven Dependencies work again.

Building/launching

  • Build the projects with either:
    • From easysoa-distribution: buildr nx_mvn (options: test=no offline=yes)
    • From easysoa-registry: mvn clean install (options: -DskipTests=true -o)
  • From Eclipse, under the "Nuxeo Server" view, press the Start the server [in debug mode] icon. The server is then available at http://localhost:8080
  • After editing the projects, re-build the registry and press the Reload projects on server icon to hot-reload

FAQ

  • Q: WebEngine modules templates are not deployed (org.nuxeo.ecm.webengine.model.TemplateNotFoundException: Template XXX.ftl not found

  • A: The project's skin is probably not deployed, because unless the WebEngine project has been generated by the Nuxeo plugin, you have to include it manually in the build path. To solve this, right click the skin/ folder, then choose Build Path > Include.

  • Q: How do I use debugging?

  • A: By default, launching the server in debug mode will make Nuxeo listen for remote debugging on the 8000 port. This can be changed at Window > Preferences > Nuxeo > Run/Debug.

  • Q: How do I get FreeMarker syntax highlighting?

  • A: An Eclipse plugin called "FreeMarker IDE" is available through the JBoss tools update site: http://download.jboss.org/jbosstools/updates/stable/helios/

Using the Nuxeo IDE: Encountered issues

Configuration

  • When a project is converted into a Nuxeo project, the WebEngine resources won't be deployed because the skin has to be manually included in the build path (see FAQ).
  • It is impossible to add several libraries at once on "Nuxeo User Libraries" form, which is not practical.
    • The "Nuxeo User Libraries" form is used for adding libraries from the Maven local repository, there's no obvious way for allowing simultaneous multiple additions. Adding libraries used in the built distribution must be part of the packaging process, using nuxeo-distribution-tools' dedicated target artifact:print mode="sdk", to build an EasySOA SDK distribution.
    • Workaround: it is still possible to manually add into the SDK an artifacts-*.properties file (or test-artifacts-*.properties) into $SDK_HOME/sdk/ (and the corresponding JAR files into $SDK_HOME/sdk/tests/).
  • Issues during "easysoa-registry" import:
    • Error when deploying Seam projects (here easysoa-registry-web): "src/main/seam" was missing from the build path. I had to move the sources to "src/main/seam", while letting both "src/main/java" and "src/main/seam" on the build path.
    • m2e-managed dependencies disappear after Nuxeo project conversion (solution: disable Maven nature, then convert back to Maven project)
    • Other m2e compatibility issue: since m2e doesn't support the "build-helper-maven-plugin" use to specify several build paths, it does not list "src/main/seam" as a sources folder, making the Nuxeo plugin throw an error on start up ("src/main/seam" is not on it's project's build path) - despite the path being actually right in the POM.
    • Nuxeo improvements on the management of existing projects when adding the Nuxeo nature: NXIDE-135
  • Minor thing: It seems like the plugin can only deploy Nuxeo projects, why does it list everything under Deployment Configurations? Any project to deploy must be converted to Nuxeo nature.

Launch

  • When the project deployment fails on Nuxeo startup (e.g. Seam build path error), launch is not aborted, and cannot be stopped until the server is fully started. Also, when (re)loading the projects hangs (1), Nuxeo cannot be stopped or anything (only solution = Restart Eclipse).
    • There are a lot of improvements currently worked at Nuxeo about Launch management: NXIDE-117, NXIDE-134, NXIDE-138, NXIDE-151, NXIDE-153, ... The main idea is to improve Nuxeo SDK integration into Eclipse, making use of the Eclipse's "Servers view", registering the SDK into Eclipse with properly defined parameters, no more systematically use the Nuxeo Launcher which makes harder for Eclipse to manage the Catalina process, ...
  • Minor thing: It seems like the EasySOA branding contributions are not taken in account by the SDK version of Nuxeo. Exact same plugins + libs work fine on a normal Nuxeo CAP(+DM+SC), but not on the SDK. Apart from the branding, I didn't see yet any functional differences between the two though.

(1) Happened when easysoa-registry-web had an OK build path but the Beans were still under "src/main/java". Other cases make stopping Nuxeo very slow (frozen until a timeout?), like if Nuxeo has been killed before (posix signals/remote debugging/etc.).

Clone this wiki locally