Deploying, to a non-eclipse server, developed code which started in the Nuxeo IDE and Studio.
Would someone please point me to document/tutorial that starts with a Studio/IDE based addition to Nuxeo DM and deploys the same to a separate test server running Tomcat/Nuxeo?
I have Nuxeo IDE working with the server system started via eclipse. I also have my custom schemas, etc updated on the same “eclipse” based server system using Studio. Also, I have custom Java code written with the help of the IDE: automation actions, a few SEAM components, etc.; this all works on my development system.
I would like to run these updates on a test system before deploying it to a production server. The Studio stuff is easy and I have it deployed. The Java code written with Nuxeo IDE is where I'm having the issues.
Is the deployment as simple as placing a file in the target nuxeo distribution file tree? Do I need to use maven to generate a deployment package?
I've never deployed a “stand alone” additions using maven and have come into the development process at the Studio/Nuxeo IDE level, I have not found a tutorial which takes the code and Studio updates I have written and deploys them to a server which is not controlled by eclipse.
Any pointers, comments will be helpful.
Hi,
the IDE projets can be built using maven. What's you need is a way of integrating these artifacts in your deployment. I suggest you to create a new maven project for building a marketplace package and then use the nuxeoctl tool for installing it into your server.
Here is a skeleton of the pom file
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>your.group</groupId>
<artifactId>your-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>your-package</artifactId>
<packaging>zip</packaging>
<name>Marketplace package for your plugins</name>
<build>
<plugins>
<plugin>
<groupId>org.nuxeo.build</groupId>
<artifactId>nuxeo-distribution-tools</artifactId>
<configuration>
<buildFiles>
<buildFile>${basedir}/src/main/assemble/assembly.xml</buildFile>
</buildFiles>
</configuration>
</plugin>
</plugins>
</build>
</project>
Here is the skeleton for the package descriptor located in src/main/resources/package.xml
<package type="addon" name="your-package" version="@VERSION@">
<title>A title</title>
<description>
<p>...</p>
</description>
<home-page>http://...</home-page>
<vendor>Your Organisation</vendor>
<installer restart="false" />
<uninstaller restart="true" />
<!-- <hotreload-support>true</hotreload-support> -->
<!-- <require-terms-and-conditions-acceptance>false -->
<!-- </require-terms-and-conditions-acceptance> -->
<production-state>testing</production-state>
<supported>false</supported>
<platforms>
<platform>cap-5.6</platform>
</platforms>
<dependencies>
<package>nuxeo-content-browser:1.0.0:1.0.0</package>
</dependencies>
<license>LGPL</license>
<license-url>http://www.gnu.org/licenses/lgpl.html</license-url>
</package>
Here is the skeleton for the installation descriptor located in src/main/resources/install.xml
<install>
<update file="${package.root}/install/bundles" todir="${env.bundles}" />
</install>
Here is the skeleton for the assembly descriptor located in src/main/resources/assembly.xml
<project name=“your-assembly”
default="build"
xmlns:nx="urn:nuxeo-build"
xmlns:artifact="urn:nuxeo-artifact">
<taskdef resource=“org/nuxeo/build/artifact/antlib.xml”
uri="urn:nuxeo-artifact" />
<target name="build">
<tstamp />
<delete failonerror="false"
dir="${maven.project.build.directory}/marketplace" />
<mkdir dir="${maven.project.build.directory}/marketplace" />
<copy todir="${maven.project.build.directory}/marketplace">
<fileset dir="src/main/resources" />
<filterset>
<filter token="VERSION" value="${maven.project.version}" />
</filterset>
</copy>
<copy todir="${maven.project.build.directory}/marketplace/install/bundles">
<artifact:resolveFile key="your.group:::jar" />
<artifact:resolveFile key="nuxeo-studio:your-studio-project::jar" />
</copy>
<zip destfile="${maven.project.build.directory}/${maven.project.artifactId}-${maven.project.version}.zip"
basedir="${maven.project.build.directory}/marketplace" />
<artifact:attach file="${maven.project.build.directory}/${maven.project.artifactId}-${maven.project.version}.zip"
target="${maven.project.groupId}:${maven.project.artifactId}"
type="zip" />
</target>
</project>
Then install the obtained package in target folder your server using the following commands
$ mp-add your-package-1.0-SNAPSHOT.zip
$ mp-install your-package-1.0-SNAPSHOT