Nuxeo Online Services

Maven Integration

Updated: October 11, 2017 Page Information Edit on GitHub

Nuxeo Studio offers a dedicated servlet that provides Maven artifacts for:

  • released versions of your project
  • current snapshot of all common branches of your project
  • current snapshot of all branches of each user's workspace (i.e. the work they are doing on a given branch but haven't yet shared by pushing staged commits).

You can get all available artifact on the following page: https://connect.nuxeo.com/nuxeo/site/studio/maven/nuxeo-studio/PROJECT_ID

You can then easily integrate your Studio configuration to your build process. Of course, all projects exposed through Maven are protected so that only contributors on the project are able to access the project in the Studio Maven repository. Hence you need to declare this "maven repository" on your local Maven settings, with correct credentials.

This is how to setup the Maven client to be able to access Studio Maven artifacts

  1. First you need to tag your project from Studio Client. This will generate a version of your project that can be accessed by Maven.
  2. Then you need to configure your Maven client to use authentication when accessing the Studio Maven repository. For this, edit (or create if it does not exist) the ~/.m2/settings.xml file and add the following entry under the settings tag:

    <servers>
      ....
      <server>
        <id>nuxeo-studio</id>
        <username>your_studio_username</username>
        <password>your_studio_password</password>
      </server>
      ...
    </servers>
    
  3. Then in the POM (or a parent POM) where you need to add the dependency to the Studio project you should declare the Studio Maven repository like this:

    <repositories>
      ...
      <repository>
        <id>nuxeo-studio</id>
        <url>https://connect.nuxeo.com/nuxeo/site/studio/maven</url>
        <releases>
          <enabled>true</enabled>
        </releases>
        <snapshots>
          <enabled>true</enabled>
          <updatePolicy>always</updatePolicy>
        </snapshots>
      </repository>
      ...
    </repositories>
    

    You notice we used the same server ID than in the settings.xml file. The repository is located under the same root as Studio client (but using the Maven relative path).

  4. Now you need to declare the dependency in your POM to point to the desired version of your Studio project. The project artifact key will be computed as follow: maven_group:project_id:version.

    • The maven_group defaults to nuxeo-studiobut can be changed from the Application Information view in Studio project. It is recommended to use the pattern com.mycompany for commercial (closed source) projects and org.mycompany for Open Source projects.
    • The project_idis the ID of you project and is unique between all projects in Studio - you can get you project ID from the Application Information view in Studio project - look after Maven Artifact id property.
    • The versionis the released version of your project. Let say you created a release with version number 1.0 and your project ID is myproject and you are using the default nuxeo-studio group. In that case your Maven dependency will be:

      <dependency>
        <groupId>nuxeo-studio</groupId>
        <artifactId>myproject</artifactId>
        <version>1.0</version>
      </dependency>
      

The list of available versions for a given project is visible at:

https://connect.nuxeo.com/nuxeo/site/studio/projects/{PROJECT_ID}

or

https://connect.nuxeo.com/nuxeo/site/studio/maven/{MAVEN_GROUP}/{PROJECT_ID}/

with MAVEN_GROUP=nuxeo-studio by default.

The list of available resources for a given project and version is visible at the given URL:

https://connect.nuxeo.com/nuxeo/site/studio/maven/{MAVEN_GROUP}/{PROJECT_ID}/{VERSION}/

with MAVEN_GROUP=nuxeo-studio by default and VERSION=0.0.0-SNAPSHOT for the current development code.

a month ago manonlumeau fix tree item index
a year ago Bertrand Chauvin 32 | pdated information - using versions instead of tags no
2 years ago Alain Escaffre 30
2 years ago Alain Escaffre 31
2 years ago Alain Escaffre 29
3 years ago Anahide Tchertchian 28 | add updatePolicy always on snapshots repo conf
3 years ago Anahide Tchertchian 27
4 years ago Julien Carsique 26
4 years ago Julien Carsique 25
6 years ago Julien Carsique 22
6 years ago Julien Carsique 23
6 years ago Julien Carsique 24 | Migrated to Confluence 4.0
6 years ago Thierry Martins 21
7 years ago Anahide Tchertchian 20
7 years ago Anahide Tchertchian 19
7 years ago Anahide Tchertchian 17
7 years ago Anahide Tchertchian 18
7 years ago Anahide Tchertchian 16
7 years ago Anahide Tchertchian 15
7 years ago Solen Guitter 14 | fixed typo
7 years ago Solen Guitter 13
7 years ago Stéphane Lacoin 12
7 years ago Stéfane Fermigier 11
7 years ago Solen Guitter 10 | formatting and typos
7 years ago Stéfane Fermigier 9
7 years ago Bogdan Stefanescu 8
7 years ago Bogdan Stefanescu 7
7 years ago Bogdan Stefanescu 6
7 years ago Bogdan Stefanescu 5
7 years ago Bogdan Stefanescu 4
7 years ago Bogdan Stefanescu 3
7 years ago Bogdan Stefanescu 2
7 years ago Bogdan Stefanescu 1
History: Created by Bogdan Stefanescu