Login
Hotline: +49 7151 994 89 60 sales@trackplus.com
Apache Maven

Track+ Maven Integration

When you work with the Apache Maven build system, you can collect change information for a specific build from a Track+ server. To enable this feature within your Maven installation, you have to add the Track+ Maven plug-in to your local Maven.

To install the Track+ Maven plug-in proceed as follows:

  1. Download the library containing the plug-in to your local computer.
  2. Download the Maven pom.xml file to your local computer.
  3. Run the following command (assuming Maven is within your path):

    mvn install:install-file -DgroupId=com.trackplus.mvn.plugin -DartifactId=trackplusChanges -Dversion=1.0.0 -Dpackaging=maven-plugin -Dfile=trackplusChanges-1.0.0.jar -DpomFile=pom-tpMaven.xml

Maven Configuration

To use the Track+ plug-in within Maven, your pom.xml should include code similar to the one shown below:

<build>
  <plugins>
     <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
            <source>1.5</source>
            <target>1.5</target>
        </configuration>
     </plugin>

     <plugin>
        <groupId>com.trackplus.mvn.plugin</groupId>
        <artifactId>trackplusChanges</artifactId>
        <version>1.0.0</version>
        <configuration>
            <query>here goes the permanent link generated within Track+</query>
            <!--default action type-->
            <defaultType>fix</defaultType>
            <!--mapping between Track+ issue type and Maven action type-->
            <issueTypesMap>
               <Task>fix</Task>
               <Requirements>add</Requirements>
            </issueTypesMap>
        </configuration>

        <executions>
           <execution>
               <phase>compile</phase>
                  <goals>
                     <goal>changes-generate</goal>
                  </goals>
           </execution>
        </executions>
     </plugin>
  </plugins>
</build> 

 

There are two things you have to define: an URL for the query that you want to run in Track+, and a mapping between Maven actions and Track+ issue types. For example, if you have an issue type of "bug report" in Track+, you may want to map this to a "fix" action in Maven.

You can use the full power of the Track+ query definition engine to generate the query URL. In Track you go to Find Issues > Manage queries and click on the chain symbol in the action column to generate a Maven changes query URL.

Prerequisites

To run Maven with Track+ you need

  • Track+ 5.0.0 or later on some web server
  • A user account on that Track+ server
  • Track+ Maven plug-in (this is what you get here)
© 2016 Steinbeis GmbH & Co. KG, All rights reserved