With TeamForge—Nexus integration enabled, you can create one or more binary repositories and link them to your project.

Create a Binary Artifact Repository

  1. Click BINARIES from the Project Home menu.
  2. Click Create Repository. The Create Repository page appears.
  3. Server: Select a Nexus or Artifactory binary repository server from the drop-down list.
  4. If you are creating a Nexus repository, type or select the values for the following fields in the Create Repository page.
    • Repository Name and Repository ID: Type a name and ID for the binary repository.
    • Repository Type: Select one of the following types from the drop-down list: Hosted Repository or Proxy Repository or Virtual Repository.
    • Provider: Select the content provider of the repository from the drop-down list.
    • Repository Policy: Repositories can store artifacts of a release or snapshot or both. Select a policy from the drop-down list.
    • Override Local Storage Location: Leave this blank to use the default local storage location. To change the local storage location, type the path (URL) in the following format.
      • Windows: file:/{drive-letter}:/
      • Other operating systems: file://
    1. Modify the default access settings such as Deployment Policy, Allow File Browsing, Include in Search and Publish URL, if required.
    2. Modify the Not Found Cache TTL duration (in minutes), if required.
    3. Click Save.
  5. If you are creating an Artifactory repository, type or select the values for the following fields in the Create Repository page.
    • Repository Type: Select one of the following types from the drop-down list: Local Repository or Remote Repository or Virtual Repository.
    • Package Type: Type the package type. For example, “maven”. Package type cannot be changed once the repository is created.
    • Repository Key: Type the repository key. The repository key must be unique within an Artifactory instance. Can contain no spaces or special characters. Cannot begin with a number.
    1. Fill in the fields (modify the default values, if required) listed under the General, Include/Exclude Patterns, and Maven Settings sections.
    2. Click Save.

The binary repository is created.

After creating a binary repository, you can now configure traceability for the repository so that your Nexus or Artifactory runtime events are published to EventQ. See Configure Traceability for Binary Artifact Repositories.

Configure Traceability for Binary Artifact Repositories

Once a binary repository is created, configuring the repository to publish runtime data to EventQ is the next step that lets you track and visualize binary artifacts in real time using TeamForge EventQ.

  1. Log on to TeamForge as Project Admin.
  2. Click Project Admin from the Project Home menu.
  3. Click Tools on the Project Admin Menu.
  4. Click Binaries from the list of Project Tools.
  5. Select Include Traceability check box.
  6. Provide the data source details and click Update.

You can link existing binary artifact repositories, if any, to your project.

  1. Click BINARIES from the Project Home menu.
  2. Click Link Existing Repository.
  3. Select a repository from the list of binary repositories and click Link to Project.

Configure Maven Build

CollabNet provides you with a Maven deploy plugin that completely inherits the default (vanilla) Maven deploy plugin. Additionally, it posts binary artifact creation event information on to TeamForge EventQ enabling end-to-end traceability.

To configure your Maven build:

  1. Replace the standard deploy with CollabNet’s 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>8.2</version>
        <extensions>true</extensions>
        <executions>
          <execution>
            <id>default-deploy</id>
            <phase>deploy</phase>
            <goals>
              <goal>deploy</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <skipLinkToBinaries>true</skipLinkToBinaries>
          <amqpServer>amqp://host.with.amqp</amqpServer>
          <sourceAssociationKey>as-per-orchestrate-setup</sourceAssociationKey>
          <associatedBuildNumber>${env.BUILD_NUMBER}</associatedBuildNumber>
        </configuration>
      </plugin>
    </plugins>
    
  2. Setup the Nexus/Artifactory and EventQ credentials in settings.xml. You may find this file in the Maven home directory. For example, in the following illustration, your distribution management section has a repository id of the local-nexus and the amqpServer, amqp://host.with.amqp is setup as mentioned in Step 1:
    <settings>
     <servers>
      <server>
       <id>local-nexus</id>
       <username>your_ctf_username</username>
       <password>xxxxxxxx</password>
      </server>
      <server>
       <id>amqp://host.with.amqp</id>
       <username>myproj_nexus</username>
       <password>xxxxx</password>
      </server>
     </servers>
    </settings>
    

    If you already have a set of credentials against an AMQP URL in settings.xml, all jobs including the one that posts events against different sources can use the same credentials. The following table lists the available configuration items.

    Configuration Parameter Description Mandatory Default Value Example
    amqpServer An amqp url for the form amqp://host.domain where EventQ is listening to. true None amqp://example.com
    sourceAssociationKey The source association key from orchestrate custom event setup. true None uuid format
    orchestrateSchemaId The schema id posted to EventQ. Do not set it in v1.4.1 and later. true binary_artifact binary_artifact
    orchestrateSchemaVersion The version of the schema, usually 1. Omit to default to 1. Do not set it in v1.4.1 and later. false 1 1
    amqpUserName The AMQP user name. It is recommended not to set it in the project POM but using in settings.xml. Take it from the custom event setup in EventQ. false None proj_custom
    amqpPassword The AMQP password. It is recommended not to set it in the project POM but using in settings.xml. Take it from the EventQ settings. false None af78aaee0c5610d21….
    amqpQueueName Do not specify. Defaults to orchestrate.custom. false orchestrate.custom orchestrate.custom
    associatedBuildNumber Specify to the env variable depending on your build system process. Set to ${env.BUILD_NUMBER} for Jenkins. false None ${env.BUILD_NUMBER}
    skipOrchestrateNotification Set to true to disable notification. false false False
    dieOnOrchestrateError Defaults to true. Set to false to treat orchestrate notification errors as non-fatal. false true true
    component Used to identify a specific binary artifact as a component in a larger application. false None An 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 EventQ.
    componentOf Associated with the ‘component’ parameter to store the details of the component. false None SCM as a component of Teamforge.

Delete a Binary Artifact Repository

You must have the required permission to delete binary repositories. As a project admin, you can use the delete option only to unlink the repository from a project. If you want to delete a repository from the Nexus, login as a Nexus admin.

  1. Click BINARIES from the Project Home menu.
  2. In the list of the repositories, select the repository you want to delete and click Delete. The following confirmation message appears:
    This repository will no longer be accessible. Your site administrator can relink it later. Are you sure you want to unlink this repository?
    
  3. Click OK to delete.

The repository is deleted.

Tags for this page: source_code