Nuxeo Online Services

Maven Integration

Updated: October 22, 2018 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.

Setting up the Maven Client

Maven can be setup to add a dependency to a specific release, and to do continuous integration on a branch. In all cases, to be able to access Studio Maven artifacts:

  1. 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>
    
    
  2. 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).

Setting up Continuous Integration on a Branch

To set up a dependency to the latest snapshot of a Studio branch:

  1. Go to the Branch Management screen and select a branch.

  2. Press the Maven GAV button. This button is available both for the latest changes only available in your own workspace or for the ones that are shared for all users on the branch.

  1. Maven coordinates are shown and ready to be copy-pasted in your project's pom.xml.

Adding a Dependency to a Release

To add a Maven dependency on a specific Studio release:

  1. Create a release of your Studio project. This will generate a version of your project that can be accessed by Maven.

  2. Go to the Releases and Tags screen.

  3. Press the Maven GAV button on the desired release and copy the Maven coordinates in your project's pom.xml file.

Retrieving Maven Resources

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.

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

We'd love to hear your thoughts!

All fields required