Configuring the Trac Report

Configuring your Trac instance

The plugin needs to be told details of your Trac installation so that it can connect and query the open tickets. The Trac installation needs to be accessible via no authentication, basic authentication or NTLM authentication. If you've used form authentication then you are out of luck.

Your Trac installation needs to have the XML-RPC plugin installed and working for this plugin to be able to read the tickets.

Basic Report Configuration

The most basic report configuration is read from the <issueManagement> section of your POM. This should work with no additional configuration, but by default all ticket will be listed

  <issueManagement>
    <system>trac</system>
    <url>http://mytracserver.local/trac/MYPROJECT/</url>
  </issueManagement>

Configuring a Custom Query

The exact query can configured in the <query> element. See TracQuery for the exact syntax.

  ...
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-changes-plugin</artifactId>
    <version>2.12</version>
    <configuration>
      <query>status=accepted&amp;status=assigned&amp;status=new&amp;status=reopened&amp;order=priority&amp;component=${project.artifactId}</query>
    </configuration>
  </plugin>
  ...

Configuring Basic Authentication

If your Trac is protected by basic authentication then you'll need to add the <tracUser> and <tracPassword> configuration elements so that the plugin knows who to authenticate as.

<project>
  ...
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <version>2.12</version>
        <configuration>
          <tracUser>my username</tracUser>
          <tracPassword>my password</tracPassword>
        </configuration>
      </plugin>
    </plugins>
  </reporting>
  ...
</project>

Configuring NTLM Authentication

If you have your Trac sitting behind Apache on Windows with mod_sspi doing authentication with Active Directory, then the plugin should authenticate to the server as the current user without any extra config. No <tracUser> and <tracPassword> configuration elements are needed.

Using custom encoding

If you have to support non-western encodings, then specify an <outputEncoding> in the configuration.

<project>
  ...
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <version>2.12</version>
        <configuration>
          ...
          <outputEncoding>Windows-31J</outputEncoding>
        </configuration>
      </plugin>
    </plugins>
  </reporting>
  ...
</project>