Skip to main content Skip to complementary content

Deploying in Nexus repository

Procedure

  1. Make sure Nexus is installed properly (according to the installation instructions related to the version you use: Nexus Open Source or Nexus Pro).
    In case you installed it via the Talend Installer, you will find it as the Talend Artifact Service in your environment.
  2. In your Maven settings.xml file, add the section:
    <server>
        <id>nexus</id>
        <username>deployment</username>
        <password>deployment123</password>
    </server>
  3. In the Maven project file (pom.xml), add your repository configuration in the <distributionManagement> section:
    <distributionManagement>
    
      <!-- use the following if you're not using a snapshot version. -->
      <repository>
        <id>nexus</id>
        <name>RepositoryProxy</name>
        <url>
          http://localhost:8081/nexus/content/repositories/releases
        </url>
      </repository>
    
      <!-- use the following if you ARE using a snapshot version. -->
      <snapshotRepository>
        <id>nexus</id>
        <name>RepositoryProxy</name>
        <url>
          http://localhost:8081/nexus/content/repositories/snapshots
        </url>
      </snapshotRepository>
    
    </distributionManagement> 
    http://localhost:8081/nexus/content/repositories/releases is the right URL to use when Nexus is installed as the default Artifact Repository via the Talend Installer or as standalone. However, if Nexus was installed as a Web Application in Tomcat (WAR File deployment), the URL is http://localhost:8080/nexus-webapp/content/repositories/releases.
  4. In the file <TalendRuntimePath>/container/etc/org.ops4j.pax.url.mvn.cfg, check the URL of the Nexus repository in the parameter org.ops4j.pax.url.mvn.repositories and edit it if necessary.
    org.ops4j.pax.url.mvn.repositories= \
    http://localhost:8081/nexus/content/repositories/releases@id=tesb.release, \
    http://localhost:8081/nexus/content/repositories/snapshots@snapshots@id=tesb.snapshot, \
    http://localhost:8081/nexus/content/repositories/releases is the right URL to use when Nexus is installed as the default Artifact Repository via the Talend Installer or as standalone. However, if Nexus was installed as a Web Application in Tomcat (WAR File deployment), the URL is http://localhost:8080/nexus-webapp/content/repositories/releases.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!