Thirdparty Deploy Examples

The thirdparty-deploy goal generates the required information to deploy a maven built project to the ant/buildmagic based repository.

Minimal configuration

The most basic configuration of the buildmagic-thirdparty Plugin is to simply tell the plugin the default goal to execute and where to deploy artifacts:

      <plugin>
        <groupId>org.jboss.maven.plugins</groupId>
        <artifactId>maven-buildmagic-thirdparty-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>thirdparty-deploy</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <thirdpartyRepositoryDir>${thirdparty.repository.root}</thirdpartyRepositoryDir>
        </configuration>
      </plugin>

Configuring component-info.xml

In many cases it will be necessary to customize the generated component-info.xml file. The following example shows a groupId and license to use instead of the groupId and license found in the pom.xml

      <plugin>
        <groupId>org.jboss.maven.plugins</groupId>
        <artifactId>maven-buildmagic-thirdparty-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>thirdparty-deploy</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <groupId>jboss</groupId>
          <license>lgpl</license>
          <thirdpartyRepositoryDir>${thirdparty.repository.root}</thirdpartyRepositoryDir>
        </configuration>
      </plugin>

This example shows how to customize the imports (dependencies) contained in the component-info.xml

      <plugin>
        <groupId>org.jboss.maven.plugins</groupId>
        <artifactId>maven-buildmagic-thirdparty-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>thirdparty-deploy</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <imports>
            <javassist>3.5, 3.6-beta1</javassist>
          </imports>
          <thirdpartyRepositoryDir>${thirdparty.repository.root}</thirdpartyRepositoryDir>
        </configuration>
      </plugin>

As you can see from the example, each import should have the component name for the tag, and a comma-separated list of compatible versions to import. The above configuration will generate a component-info.xml file that looks something like this:

<?xml version="1.0" encoding="UTF-8"?>
<project name="jboss/jboss-test-component-info">
  <component id="jboss/jboss-test"
             licenseType="lgpl"
             version="0.0.1"
             description="jboss:jboss-retro-tests:jar:0.0.1"
             
             > 
              
    <artifact id="jboss-test-0.0.1.jar"/>

    <import componentref="javassist">
      <compatible version="3.5"/>
      <compatible version="3.6-beta1"/>
    </import>

    <export>
      <include input="jboss-test-0.0.1.jar"/>

    </export>
  </component>
</project>