Skip to main content
Version: TeamForge 23.0

TeamForge Maven Deploy Plugin

Before You Begin

Before you begin with the configuration of the TeamForge Maven Deploy Plugin, generate the TeamForge Webhook URL by running the create_webhook_event.py script.

Configure the Digital.ai TeamForge Maven Deploy Plugin #configuremavendeployplugin

To configure the Digital.ai TeamForge Maven Deploy Plugin:

  1. Replace the standard deploy plugin with Digital.ai TeamForge Maven Deploy Plugin in your POM.xml.

    <pluginRepositories>
    <pluginRepository>
    <id>collabnet</id>
    <name>Collabnet Public Repo</name>
    <url>http://mvn.collab.net/nexus/content/groups/public/</url>
    </pluginRepository>
    </pluginRepositories>
    <plugins>
    ....
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-deploy-plugin</artifactId>
    <version>2.8.2</version>
    <configuration>
    <skip>true</skip>
    </configuration>
    </plugin>
    <plugin>
    <groupId>net.collab.maven.deploy</groupId>
    <artifactId>collabnet-deploy-maven-plugin</artifactId>
    <version>19.3</version>
    <extensions>true</extensions>
    <executions>
    <execution>
    <id>default-deploy</id>
    <phase>deploy</phase>
    <goals>
    <goal>deploy</goal>
    </goals>
    </execution>
    </executions>
    <configuration>
    <skipTeamForgeNotification>false</skipTeamForgeNotification>
    <ctfWebhookUrl>https://localhost:3000/inbox/v4/BinaryCustomData/1001</ctfWehookUrl>
    <associatedBuildNumber>$\{env.BUILD_NUMBER\}</associatedBuildNumber>
    <associatedJobName>$\{env.JOB_NAME\}</associatedJobName>
    <skipLinkToBinaries>true</skipLinkToBinaries>
    </configuration>
    </plugin>
    </plugins>
    important

    Make sure the <skip> tag is set to true to prevent more than one Nexus notification for a single Nexus artifact deployment. If <skip> is not set to true, notifications are sent by both the maven-deploy-plugin and the collabnet-deploy-maven-plugin for a single binary artifact.

    The following table lists the available configuration items.

    Configuration ParameterDescriptionMandatoryDefault ValueExample
    ctfWebhookUrlTeamForge Webhook URL.YesNonehttps://localhost:3000/inbox/v4/BinaryCustomData/1001
    associatedBuildNumberSpecify to the env variable depending on your build system process. Set to ${env.BUILD_NUMBER} for Jenkins.YesNone${env.BUILD_NUMBER}
    associatedJobNameSpecify to the env variable depending on your build system process. Set ${env.JOB_NAME} for Jenkins.YesNone${env.JOB_NAME}
    skipLinkToBinariesSet to true to download binary artifact from traceability view. If set to false, redirects to the download location of binary artifact.Notruetrue
    skipTeamForgeNotificationSet to true to disable notification.Nofalsefalse
    componentUsed to identify a specific binary artifact as a component in a larger application.NoNoneAn ALM platform has several components such as an application server, an indexer, an SCM integration server and so on. These components have their own build process. This property is used to uniquely identify such components in TeamForge Webhooks-based Event Broker.
    componentOfAssociated with the 'component' parameter to store the details of the component.NoNoneSCM as a component of Teamforge.
  2. Set up the Nexus credentials in the settings.xml file.

    You may find this file in the Maven home directory. For example, in the following illustration, your distribution management section has a repository id as local-nexus (as configured earlier in the POM.xml file):

    <settings>
    <servers>
    <server>
    <id>local-nexus</id>
    <username>your_ctf_username</username>
    <password>xxxxxxxx</password>
    </server>
    </servers>
    </settings>