Development Environment

Studio

Studio does customization with web interface. Studio project can be downloaded to Nuxeo server or imported into Nuxeo Eclipse IDE.

Concepts - see my "In a Nutshell"

IDE

Installation

  1. Download and start Eclipse
  2. Install Nuxeo IDE from Market Place
  3. Install SDK
    1. Download, extract anywhere
    2. Window -> Preference -> Nuxeo -> Nuxeo SDK; Add, select directory, check (make it current) and click OK

Facilities (Nuxeo Perspective and Views)

  • Server - start, stop, start in debug mode, server log display, open in browser, reload & deploy
  • Nuxeo Components - browse Nuxeo component model from here
  • Nuxeo Studio - browse Studio project, refresh (pull studio project objects to the list) and export operations into Studio project
  • Nuxeo Shell

Server

  • Debug options (Window -> Preference -> Nuxeo -> Run/Debug)
    • Debug Port - any available port, say "8787"
    • Suspend Server - if wish to suspend server at start-up, waiting for debugger to connect (not necessary in most cases)
  • Link to Studio
    • Window -> Preference -> Nuxeo -> Nuxeo Connect
    • Nuxeo Studio view: click synchronize button and make sure synchronization is success

Plugin Project

  • Creation: New Nuxeo Artifact > Nuxeo Plugin Project > input project ID > input Java root package > Maven settings > Finish
  • Link with Studio project: Project context menu (right click) >Properties > Nuxeo > Nuxeo Studio > select project and click "Apply" and "OK"
    • After done this, a "Studio Projects" shall appear in Project Explorer under the project
    • Otherwise, if link is not done or broken (strangely, sometimes), running the project will not see customized document types, etc.
  • When and where
    • User libraries - Window => Preferences => User Libraries; add user library, must provide meta-data; Nuxeo IDE will automatically update POM (Maven build file) for the libraries
    • Dependencies: must manually update POM or synchronise POM; otherwise build may fail. Synchronize POM: right click pom.xml => Nuxeo => Synchronize POM
    • XML contributions (for almost all extensions):
      • create folder "OSGI-INF" under "Project > src/main/resources
      • put .xml in it
      • declare the .xml with "Nuxeo-Component: OSGI-INF/xxxxxx.xml"
  • Artifacts
    • src/main/java - where the source codes are put, includes operations, etc.
    • src/main/resources - where operation's extension contribution (XML) is put
    • studio-project-name-SNAPSHOT.jar - compiled studio project JAR
      • data - user and groups imported from studio project can be found here
      • data.i18n - internationalization messages
      • data.schemas - customize data schemas
      • data.templates - .ftl templates
      • data.vocabularies - .csv vocabularies
      • theme.palettes - companyname related various properties
      • web
        • nuxeo.war
          • img - images
          • layouts - xhtml layouts
          • studio_tabs - xhtml
          • widgets - xhtml
          • login.jsp
      • .metadata -?
      • META-INF
        • .version - seems to be relating to Nuxeo platform version (cap-5.6)
        • MANIFEST.MF
          • OSGI manifest?
          • Specify Nuxeo-Component : OSGI-INF/extensions.xml
      • OSGI-INF
        • extensions.xml - THE extension master document, refers to various schemas and define various extensions
        • deployment-fragment.xml - instruction about deployment of the module (copy/unzip/append, etc.)

Running and Debugging

Debugging allows hot reload project, interrupt execution and inspect variables / stacks, etc.

  • Project Setup
    • Project context menu > Debug as > Debug Configurations
    • Double click on "Remote Java Application"
    • Verify that the present project is selected in "Project" field
    • Connection type (default): Standard (Socket Attach)
    • Host & Port - localhost, and server's debug port (see above), say "8787"

Create an empty bundle

http://doc.nuxeo.com/display/public/NXDOC/How+to+create+an+empty+bundle