Problems deploying nuxeo-sample-project using Nuxeo IDE w/5.6 SDK configured

I have been using the nuxeo-sample-project to exercise Nuxeo IDE development and hot-deployment. While doing so, I have encountered some gotchas which I have listed below.

  1. The Nuxeo and Maven2 natures do not coexist well. I needed to remove the Maven2 nature in order to successfully deploy the project to the Nuxeo server. I also needed to hack the .classpath and .project files to make their contents resemble that of a Nuxeo IDE-generated plugin. Since M2E is now bundled with current Eclipse versions and Nuxeo projects use Maven for their builds, it would great to get these plugins working together. Is this in the works?

  2. When the Nuxeo server starts up and deploys the nuxeo-sample-project from the workspace, the deployment is only partially successful. For one thing, the Book document type is not available after startup. It appears contributions OSGI-INF/content-template-contrib.xml and OSGI-INF/core-types-contrib.xml are not being registered until after the repository initializes which is causing problems. OTOH, if I export the nuxeo-sample-project jar to the bundles directory and then start the server, the problem disappears because these contributions are registered prior to repository initialization. Is this a bug or expected behavior that needs to be documented?

0 votes

1 answers

1931 views

ANSWER



Hi, ron,

Thanks for coming and sharing your problems with us, here my answers to your two points

1) no we don't want to

The IDE way of managing the class-path does not fit with m2e. In the IDE, projects that have the 
nuxeo nature get all the SDK dependencies. That means all bundles and libraries provided by the 
SDK are dynamically put in the project class-path trough a class-path container. The idea is to
let the developer discover the needed API for the projects he's working on. At any time, you're 
able to synchronize the deps in the project's POM. This let you build the project using maven in
your QA environment.

2) yes, this should be fixed NXIDE-188

the repository initialization problem is already known . This will be solved in 
the next IDE release. I've given a work-around in the jira ticket.
0 votes



I would add that even if there are very interesting m2e features, that plugin is mainly unusable on a project such as Nuxeo because of the source code size, the number of Nuxeo modules and various issues with modules' naming versus directory naming, specific implementations/behaviors versus Maven ones, unfinished nested modules management, …

I'm regularly trying m2e to check that status but I don't expect big improvements in a short delay anymore.

However, I'm using m2e editor and a few other features which do not require to add the Maven2 nature on projects. Note also, I configured the Eclipse plugin to stay in offline mode, do not (never) automatically update dependencies and do not download anything, nor update Maven projects on startup.

For sure, we are continuously working at improving the integration between Nuxeo IDE and Maven, optionally including m2e if/when possible, but our main goal is to keep the ability to build inside Eclipse and from the command line, both with consistent results and acceptable durations.

09/21/2012