You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2008/11/03 23:29:55 UTC

svn commit: r710194 - in /maven/plugins/trunk/maven-changes-plugin: ./ src/main/java/org/apache/maven/plugin/trac/ src/main/resources/ src/site/apt/examples/

Author: olamy
Date: Mon Nov  3 14:29:54 2008
New Revision: 710194

URL: http://svn.apache.org/viewvc?rev=710194&view=rev
Log:
[MCHANGES-90] Add support for Trac-report like Jira-report
Submitted by David Roussel and Kinugasa Noriko


Added:
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracMojo.java   (with props)
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracReportGenerator.java   (with props)
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracTicket.java   (with props)
    maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report.properties   (with props)
    maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report_en.properties   (with props)
    maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/configuring-trac-report.apt   (with props)
Modified:
    maven/plugins/trunk/maven-changes-plugin/pom.xml

Modified: maven/plugins/trunk/maven-changes-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/pom.xml?rev=710194&r1=710193&r2=710194&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-changes-plugin/pom.xml Mon Nov  3 14:29:54 2008
@@ -249,6 +249,14 @@
       <version>2.8.1</version>
     </dependency>
     
+    <!-- trac dependencies -->
+    
+    <dependency>
+      <groupId>org.apache.xmlrpc</groupId>
+      <artifactId>xmlrpc-client</artifactId>
+      <version>3.0</version>
+    </dependency>
+
     <!-- test dependencies -->
     <dependency>
       <groupId>org.apache.maven.plugin-testing</groupId>

Added: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracMojo.java?rev=710194&view=auto
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracMojo.java (added)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracMojo.java Mon Nov  3 14:29:54 2008
@@ -0,0 +1,277 @@
+package org.apache.maven.plugin.trac;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
+
+import org.apache.maven.doxia.siterenderer.Renderer;
+import org.apache.maven.plugin.changes.AbstractChangesReport;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.reporting.MavenReportException;
+import org.apache.xmlrpc.XmlRpcException;
+import org.apache.xmlrpc.client.XmlRpcClient;
+import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
+import org.codehaus.plexus.util.StringUtils;
+
+/**
+ * Goal which downloads issues from the Issue Tracking System and generates a
+ * report.
+ * 
+ * @goal trac-report
+ * @author Noriko Kinugasa
+ * @version $Id$
+ * @since 2.1
+ */
+public class TracMojo
+    extends AbstractChangesReport
+{
+    /**
+     * Defines the Trac username for authentication into a private Trac
+     * installation.
+     * 
+     * @parameter default-value=""
+     */
+    private String tracUser;
+
+    /**
+     * Defines the Trac password for authentication into a private Trac
+     * installation.
+     * 
+     * @parameter default-value=""
+     */
+    private String tracPassword;
+
+    /**
+     * Defines the Trac query for searching ticket.
+     * 
+     * @parameter default-value="order=id"
+     */
+    private String query;
+
+    /**
+     * @see org.apache.maven.reporting.AbstractMavenReport#canGenerateReport()
+     */
+    public boolean canGenerateReport()
+    {
+        return validateIfIssueManagementComplete();
+    }
+
+    public void executeReport( Locale locale )
+        throws MavenReportException
+    {
+        if ( !canGenerateReport() )
+        {
+            throw new MavenReportException( "Issue Management is out of order." );
+        }
+
+        parseTracUrl();
+
+        XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
+
+        try
+        {
+            config.setServerURL( new URL( project.getIssueManagement().getUrl() + "/login/xmlrpc" ) );
+        }
+        catch ( MalformedURLException e1 )
+        {
+
+            throw new MavenReportException( "The Trac URL is incorrect." );
+
+        }
+        config.setBasicUserName( tracUser );
+        config.setBasicPassword( tracPassword );
+
+        Object[] queryResult = null;
+        XmlRpcClient client = new XmlRpcClient();
+
+        client.setConfig( config );
+
+        String qstr = "";
+
+        if ( !StringUtils.isEmpty( query ) )
+        {
+            qstr = query;
+        }
+
+        Object[] params = new Object[] { new String( qstr ) };
+        try
+        {
+            queryResult = (Object[]) client.execute( "ticket.query", params );
+        }
+        catch ( XmlRpcException e )
+        {
+            throw new MavenReportException( "XmlRpc Error.", e );
+        }
+
+        ArrayList ticketList = new ArrayList();
+        TracTicket matchTicket;
+
+        TracReportGenerator report = new TracReportGenerator();
+
+        if ( queryResult.length == 0 )
+        {
+
+            report.doGenerateEmptyReport( getBundle( locale ), getSink() );
+            getLog().warn( "No ticket has matched." );
+
+        }
+        else
+        {
+
+            for ( int i = 0; i < queryResult.length; i++ )
+            {
+                params = new Object[] { queryResult[i] };
+                try
+                {
+                    Object[] Ticketresult = null;
+                    matchTicket = new TracTicket();
+                    Ticketresult = (Object[]) client.execute( "ticket.get", params );
+                    ticketList.add( setQueryResult( Ticketresult, matchTicket ) );
+
+                }
+                catch ( XmlRpcException e )
+                {
+                    throw new MavenReportException( "XmlRpc Error.", e );
+                }
+            }
+            try
+            {
+
+                report.doGenerateReport( getBundle( locale ), getSink(), ticketList );
+
+            }
+            catch ( Exception e )
+
+            {
+                e.printStackTrace();
+
+            }
+
+        }
+
+    }
+
+    public String getName( Locale locale )
+    {
+        return "Trac Report";
+    }
+
+    public String getDescription( Locale locale )
+    {
+        return "Report on Ticket from the Trac.";
+    }
+
+    protected Renderer getSiteRenderer()
+    {
+        return siteRenderer;
+    }
+
+    protected MavenProject getProject()
+    {
+        return project;
+    }
+
+    public String getOutputName()
+    {
+        return "trac-report";
+    }
+
+    private ResourceBundle getBundle( Locale locale )
+    {
+        return ResourceBundle.getBundle( "trac-report", locale, this.getClass().getClassLoader() );
+    }
+
+    private void parseTracUrl()
+    {
+
+        String tracUrl = project.getIssueManagement().getUrl();
+
+        if ( tracUrl.endsWith( "/" ) )
+        {
+            project.getIssueManagement().setUrl( tracUrl.substring( 0, tracUrl.length() - 1 ) );
+        }
+
+    }
+
+    private TracTicket setQueryResult( Object[] ticketObj, TracTicket ticket )
+    {
+
+        ticket.setId( String.valueOf( ticketObj[0] ) );
+
+        ticket.setLink( project.getIssueManagement().getUrl() + "/ticket/" + String.valueOf( ticketObj[0] ) );
+
+        ticket.setTimeCreated( String.valueOf( ticketObj[1] ) );
+
+        ticket.setTimeChanged( String.valueOf( ticketObj[2] ) );
+
+        Map attributes = (Map) ticketObj[3];
+
+        ticket.setType( (String) attributes.get( "type" ) );
+
+        ticket.setSummary( (String) attributes.get( "summary" ) );
+
+        ticket.setStatus( (String) attributes.get( "status" ) );
+
+        ticket.setResolution( (String) attributes.get( "resolution" ) );
+
+        ticket.setOwner( (String) attributes.get( "owner" ) );
+
+        ticket.setMilestone( (String) attributes.get( "milestone" ) );
+
+        ticket.setPriority( (String) attributes.get( "priority" ) );
+
+        ticket.setReporter( (String) attributes.get( "reporter" ) );
+
+        ticket.setComponent( (String) attributes.get( "component" ) );
+
+        return ticket;
+    }
+
+    private boolean validateIfIssueManagementComplete()
+    {
+        if ( project.getIssueManagement() == null )
+        {
+            getLog().error( "No Issue Management set. No Trac Report will be generated." );
+
+            return false;
+        }
+        else if ( ( project.getIssueManagement().getUrl() == null )
+            || ( project.getIssueManagement().getUrl().trim().equals( "" ) ) )
+        {
+            getLog().error( "No URL set in Issue Management. No Trac Report will be generated." );
+
+            return false;
+        }
+        else if ( ( project.getIssueManagement().getSystem() != null )
+            && !( project.getIssueManagement().getSystem().equalsIgnoreCase( "trac" ) ) )
+        {
+            getLog().error( "The Trac Report only supports Trac.  No Trac Report will be generated." );
+
+            return false;
+        }
+        return true;
+    }
+
+}

Propchange: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracMojo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracMojo.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracReportGenerator.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracReportGenerator.java?rev=710194&view=auto
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracReportGenerator.java (added)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracReportGenerator.java Mon Nov  3 14:29:54 2008
@@ -0,0 +1,212 @@
+package org.apache.maven.plugin.trac;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.ResourceBundle;
+
+import org.apache.maven.doxia.sink.Sink;
+
+/**
+ * Generates a Trac report.
+ * 
+ * @author Noriko Kinugasa
+ * @version $Id$
+ */
+public class TracReportGenerator
+{
+
+    public TracReportGenerator()
+    {
+        // nothing here
+    }
+
+    public void doGenerateEmptyReport( ResourceBundle bundle, Sink sink )
+    {
+        sinkBeginReport( sink, bundle );
+
+        sink.text( bundle.getString( "report.trac.error" ) );
+
+        sinkEndReport( sink );
+    }
+
+    public void doGenerateReport( ResourceBundle bundle, Sink sink, ArrayList ticketList )
+    {
+
+        sinkBeginReport( sink, bundle );
+
+        constructHeaderRow( sink, ticketList, bundle );
+
+        constructDetailRows( sink, ticketList, bundle );
+
+        sinkEndReport( sink );
+    }
+
+    private void constructHeaderRow( Sink sink, List ticketList, ResourceBundle bundle )
+    {
+        if ( ticketList == null )
+        {
+            return;
+        }
+
+        sink.table();
+
+        sink.tableRow();
+
+        sinkHeader( sink, bundle.getString( "report.trac.label.id" ) );
+
+        sinkHeader( sink, bundle.getString( "report.trac.label.type" ) );
+
+        sinkHeader( sink, bundle.getString( "report.trac.label.summary" ) );
+
+        sinkHeader( sink, bundle.getString( "report.trac.label.owner" ) );
+
+        sinkHeader( sink, bundle.getString( "report.trac.label.reporter" ) );
+
+        sinkHeader( sink, bundle.getString( "report.trac.label.priority" ) );
+
+        sinkHeader( sink, bundle.getString( "report.trac.label.status" ) );
+
+        sinkHeader( sink, bundle.getString( "report.trac.label.resolution" ) );
+
+        sinkHeader( sink, bundle.getString( "report.trac.label.created" ) );
+
+        sinkHeader( sink, bundle.getString( "report.trac.label.changed" ) );
+
+        sink.tableRow_();
+    }
+
+    private void constructDetailRows( Sink sink, List ticketList, ResourceBundle bundle )
+    {
+        if ( ticketList == null )
+        {
+            return;
+        }
+
+        for ( int idx = 0; idx < ticketList.size(); idx++ )
+        {
+            SimpleDateFormat sdf = new SimpleDateFormat( bundle.getString( "report.trac.dateformat" ) );
+
+            TracTicket ticket = (TracTicket) ticketList.get( idx );
+
+            sink.tableRow();
+
+            sink.tableCell();
+
+            sink.link( ticket.getLink() );
+
+            sink.text( ticket.getId() );
+
+            sink.link_();
+
+            sink.tableCell_();
+
+            sinkCell( sink, ticket.getType() );
+
+            sinkCell( sink, ticket.getSummary() );
+
+            sinkCell( sink, ticket.getOwner() );
+
+            sinkCell( sink, ticket.getReporter() );
+
+            sinkCell( sink, ticket.getPriority() );
+
+            sinkCell( sink, ticket.getStatus() );
+
+            sinkCell( sink, ticket.getResolution() );
+
+            sinkCell( sink, sdf.format( ticket.getTimeCreated() ) );
+
+            sinkCell( sink, sdf.format( ticket.getTimeChanged() ) );
+
+            sink.tableRow_();
+        }
+
+        sink.table_();
+    }
+
+    private void sinkBeginReport( Sink sink, ResourceBundle bundle )
+    {
+        sink.head();
+
+        sink.text( bundle.getString( "report.trac.header" ) );
+
+        sink.head_();
+
+        sink.body();
+
+        sinkSectionTitle1( sink, bundle.getString( "report.trac.header" ) );
+
+    }
+
+    private void sinkEndReport( Sink sink )
+    {
+        sink.body_();
+
+        sink.flush();
+
+        sink.close();
+    }
+
+    private void sinkFigure( Sink sink, String image )
+    {
+        sink.figure();
+
+        sink.figureGraphics( image );
+
+        sink.figure_();
+    }
+
+    private void sinkHeader( Sink sink, String header )
+    {
+        sink.tableHeaderCell();
+
+        sink.text( header );
+
+        sink.tableHeaderCell_();
+    }
+
+    private void sinkCell( Sink sink, String text )
+    {
+        sink.tableCell();
+
+        if ( text != null )
+        {
+            sink.rawText( text );
+        }
+        else
+        {
+            sink.rawText( "&nbsp;" );
+        }
+
+        sink.tableCell_();
+    }
+
+    private void sinkSectionTitle1( Sink sink, String text )
+    {
+        sink.sectionTitle1();
+
+        sink.text( text );
+
+        sink.sectionTitle1_();
+    }
+}

Propchange: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracReportGenerator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracReportGenerator.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracTicket.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracTicket.java?rev=710194&view=auto
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracTicket.java (added)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracTicket.java Mon Nov  3 14:29:54 2008
@@ -0,0 +1,219 @@
+package org.apache.maven.plugin.trac;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * A Trac Ticket.
+ *
+ * @author Noriko Kinugasa
+ * @version $Id$
+ */
+public class TracTicket
+{
+    private String id;
+
+    private String link;
+
+    private Date timeCreated;
+
+    private Date timeChanged;
+
+    private String type;
+
+    private String summary;
+
+    private String status;
+
+    private String resolution;
+
+    private String milestone;
+
+    private String owner;
+
+    private String priority;
+
+    private String reporter;
+
+    private String component;
+
+    public String getComponent()
+    {
+        return component;
+    }
+
+    public void setComponent( String component )
+    {
+        this.component = component;
+    }
+
+    public String getPriority()
+    {
+        return priority;
+    }
+
+    public void setPriority( String priority )
+    {
+        this.priority = priority;
+    }
+
+    public String getReporter()
+    {
+        return reporter;
+    }
+
+    public void setReporter( String reporter )
+    {
+        this.reporter = reporter;
+    }
+
+    public TracTicket()
+    {
+    }
+
+    public String getId()
+    {
+        return id;
+    }
+
+    public void setId( String id )
+    {
+        this.id = id;
+    }
+
+    public String getMilestone()
+    {
+        return milestone;
+    }
+
+    public void setMilestone( String milestone )
+    {
+        this.milestone = milestone;
+    }
+
+    public String getOwner()
+    {
+        return owner;
+    }
+
+    public void setOwner( String owner )
+    {
+        this.owner = owner;
+    }
+
+    public String getResolution()
+    {
+        return resolution;
+    }
+
+    public void setResolution( String resolution )
+    {
+        this.resolution = resolution;
+    }
+
+    public String getStatus()
+    {
+        return status;
+    }
+
+    public void setStatus( String status )
+    {
+        this.status = status;
+    }
+
+    public String getSummary()
+    {
+        return summary;
+    }
+
+    public void setSummary( String summary )
+    {
+        this.summary = summary;
+    }
+
+    public String getType()
+    {
+        return type;
+    }
+
+    public void setType( String type )
+    {
+        this.type = type;
+    }
+
+    public Date getTimeChanged()
+    {
+        return timeChanged;
+    }
+
+    public void setTimeChanged( String timeChanged )
+    {
+        this.timeChanged = parseDate( timeChanged );
+    }
+
+    public Date getTimeCreated()
+    {
+        return timeCreated;
+    }
+
+    public void setTimeCreated( String timeCreated )
+    {
+        this.timeCreated = parseDate( timeCreated );
+    }
+
+    private Date parseDate( String timeCreated )
+        throws RuntimeException
+    {
+        try
+        {
+            long millis = Long.parseLong( timeCreated );
+            Calendar cld = Calendar.getInstance();
+            cld.setTimeInMillis( millis * 1000l );
+            return cld.getTime();
+        }
+        catch ( NumberFormatException e )
+        {
+            SimpleDateFormat format = new SimpleDateFormat( "EEE MMM dd HH:mm:ss z yyyy" );
+            try
+            {
+                return format.parse( timeCreated );
+            }
+            catch ( ParseException e1 )
+            {
+                throw new RuntimeException( "Failed to parse date '" + timeCreated + "' as a date.", e1 );
+            }
+        }
+    }
+
+    public String getLink()
+    {
+        return link;
+    }
+
+    public void setLink( String link )
+    {
+        this.link = link;
+    }
+
+}

Propchange: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracTicket.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracTicket.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report.properties?rev=710194&view=auto
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report.properties (added)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report.properties Mon Nov  3 14:29:54 2008
@@ -0,0 +1,38 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+report.trac.name=Trac Tickets
+report.trac.description=Report on tickets in Trac.
+report.trac.error=An error occured that made it impossible to generate this report. \
+  Please check the console for information on what might be the cause of this.
+report.trac.header=Trac Tickets
+report.trac.dateformat=dd MMM yy
+report.trac.label.id=#
+report.trac.label.type=Type
+report.trac.label.summary=Summary
+report.trac.label.status=Status
+report.trac.label.resolution=Resolution
+report.trac.label.milestone=milestone
+report.trac.label.owner=Owner
+report.trac.label.priority=Priority
+report.trac.label.reporter=Reporter
+report.trac.label.component=Component
+report.trac.label.created=Created
+report.trac.label.changed=Modified
+
+
+

Propchange: maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report_en.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report_en.properties?rev=710194&view=auto
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report_en.properties (added)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report_en.properties Mon Nov  3 14:29:54 2008
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# NOTE:
+# This bundle is intentionally empty because English strings are provided by the base bundle via the parent chain. It
+# must be provided nevertheless such that a request for locale "en" will not errorneously pick up the bundle for the
+# JVM's default locale (which need not be "en"). See the method javadoc about
+#   ResourceBundle.getBundle(String, Locale, ClassLoader)
+# for a full description of the lookup strategy.

Propchange: maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report_en.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report_en.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/configuring-trac-report.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/configuring-trac-report.apt?rev=710194&view=auto
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/configuring-trac-report.apt (added)
+++ maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/configuring-trac-report.apt Mon Nov  3 14:29:54 2008
@@ -0,0 +1,131 @@
+ ------
+ Configuring the Trac Report
+ ------
+ David Roussel
+ ------
+ 2008-08-26
+ ------
+
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements.  See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership.  The ASF licenses this file
+ ~~ to you under the Apache License, Version 2.0 (the
+ ~~ "License"); you may not use this file except in compliance
+ ~~ with the License.  You may obtain a copy of the License at
+ ~~
+ ~~   http://www.apache.org/licenses/LICENSE-2.0
+ ~~
+ ~~ Unless required by applicable law or agreed to in writing,
+ ~~ software distributed under the License is distributed on an
+ ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~~ KIND, either express or implied.  See the License for the
+ ~~ specific language governing permissions and limitations
+ ~~ under the License.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html
+
+
+Configuring the Trac Report
+
+* Configuring your Trac instance
+
+ The plugin needs to be told details of your Trac installation so that i
+ 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 {{http://trac-hacks.org/wiki/XmlRpcPlugin}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 
+ {{http://trac.edgewall.org/wiki/TracQuery}TracQuery} for the exact syntax.
+
++-----------------+
+...
+<plugin>
+	<groupId>org.apache.maven.plugins</groupId>
+	<artifactId>maven-changes-plugin</artifactId>
+	<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 pluign knows who to authenticate as.
+ 
++-----------------+
+<project>
+  ...
+	<reporting>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-changes-plugin</artifactId>
+				<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 use 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>
+				<configuration>
+					...
+					<outputEncoding>Windows-31J</outputEncoding>
+				</configuration>
+			</plugin>
+		</plugins>
+	</reporting>
+  ...
+</project>
++-----------------+
+
+

Propchange: maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/configuring-trac-report.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/configuring-trac-report.apt
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision