You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2015/06/07 14:52:05 UTC

[1/3] maven-surefire git commit: [SUREFIRE-1140] Add anchors to test case names in Surefire reports.

Repository: maven-surefire
Updated Branches:
  refs/heads/master 67e6606d5 -> a4cb7ba4f


[SUREFIRE-1140] Add anchors to test case names in Surefire reports.


Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/af109fc5
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/af109fc5
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/af109fc5

Branch: refs/heads/master
Commit: af109fc532623493263a8c1c11bb12d771d1d9ae
Parents: 67e6606
Author: Sean Griffin <sg...@cerner.com>
Authored: Mon Feb 23 09:28:40 2015 -0600
Committer: Tibor17 <ti...@lycos.com>
Committed: Sun Jun 7 14:34:29 2015 +0200

----------------------------------------------------------------------
 .../report/AbstractSurefireReportMojo.java      |  11 +-
 .../report/SurefireReportGenerator.java         |  20 +-
 .../surefire/report/SurefireReportMojoTest.java |  54 +++++
 .../plugin-config.xml                           |  38 ++++
 .../TEST-com.shape.CircleTest.xml               | 200 +++++++++++++++++++
 .../plugin-config.xml                           |  38 ++++
 .../TEST-com.shape.CircleTest.xml               | 200 +++++++++++++++++++
 7 files changed, 558 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/af109fc5/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/AbstractSurefireReportMojo.java
----------------------------------------------------------------------
diff --git a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/AbstractSurefireReportMojo.java b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/AbstractSurefireReportMojo.java
index aaa7cee..30afc51 100644
--- a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/AbstractSurefireReportMojo.java
+++ b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/AbstractSurefireReportMojo.java
@@ -51,6 +51,14 @@ public abstract class AbstractSurefireReportMojo
     private boolean showSuccess;
 
     /**
+     * If set to true, an anchor is created for each test case name.
+     * 
+     * @noinspection UnusedDeclaration
+     */
+    @Parameter( defaultValue = "false", property = "anchorTestCaseNames" )
+    private boolean anchorTestCaseNames;
+
+    /**
      * Directories containing the XML Report files that will be parsed and rendered to HTML format.
      *
      * @noinspection UnusedDeclaration
@@ -154,7 +162,8 @@ public abstract class AbstractSurefireReportMojo
         }
 
         SurefireReportGenerator report =
-            new SurefireReportGenerator( reportsDirectoryList, locale, showSuccess, determineXrefLocation() );
+            new SurefireReportGenerator( reportsDirectoryList, locale, showSuccess, determineXrefLocation(),
+                anchorTestCaseNames );
 
         report.doGenerateReport( getBundle( locale ), getSink() );
     }

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/af109fc5/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java
----------------------------------------------------------------------
diff --git a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java
index e4c02ec..ea0fc32 100644
--- a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java
+++ b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java
@@ -45,17 +45,21 @@ public class SurefireReportGenerator
     private final boolean showSuccess;
 
     private final String xrefLocation;
+    
+    private final boolean anchorTestCaseNames;
 
     private static final int LEFT = Sink.JUSTIFY_LEFT;
 
     public SurefireReportGenerator( List<File> reportsDirectories, Locale locale, boolean showSuccess,
-                                    String xrefLocation )
+                                    String xrefLocation, boolean anchorTestCaseNames )
     {
         report = new SurefireReportParser( reportsDirectories, locale );
 
         this.xrefLocation = xrefLocation;
 
         this.showSuccess = showSuccess;
+        
+        this.anchorTestCaseNames = anchorTestCaseNames;
     }
 
     public void doGenerateReport( ResourceBundle bundle, Sink sink )
@@ -466,6 +470,11 @@ public class SurefireReportGenerator
         {
             sink.tableCell();
 
+            if ( anchorTestCaseNames )
+            {
+                sinkAnchor( sink, "TC_" + toHtmlId( testCase.getFullName() ) );
+            }
+
             sinkLink( sink, testCase.getName(), "#" + toHtmlId( testCase.getFullName() ) );
 
             SinkEventAttributeSet atts = new SinkEventAttributeSet();
@@ -498,7 +507,14 @@ public class SurefireReportGenerator
         }
         else
         {
-            sinkCell( sink, testCase.getName() );
+            if ( anchorTestCaseNames )
+            {
+                sinkCellAnchor( sink, testCase.getName(), "TC_" + toHtmlId( testCase.getFullName() ) );
+            }
+            else
+            {
+                sinkCell( sink, testCase.getName() );
+            }
         }
 
         sinkCell( sink, numberFormat.format( testCase.getTime() ) );

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/af109fc5/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java
----------------------------------------------------------------------
diff --git a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java
index a94f5f2..7a4bec9 100644
--- a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java
+++ b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java
@@ -194,6 +194,60 @@ public class SurefireReportMojoTest
 
         assertTrue( idx < 0 );
     }
+    
+    public void testBasicSurefireReportIfAnchorTestCasesIsTrue()
+        throws Exception
+    {
+        File testPom = new File( getUnitBaseDir(), "basic-surefire-report-anchor-test-cases-true/plugin-config.xml" );
+
+        SurefireReportMojo mojo = (SurefireReportMojo) lookupMojo( "report", testPom );
+
+        assertNotNull( mojo );
+
+        mojo.execute();
+
+        File report =
+            new File( getBasedir(), "target/site/unit/basic-surefire-report-anchor-test-cases-true/surefire-report.html" );
+
+        renderer( mojo, report );
+
+        assertTrue( report.exists() );
+
+        String htmlContent = FileUtils.fileRead( report );
+
+        int idx = htmlContent.indexOf( "<td><a name=\"TC_com.shape.CircleTest.testX\"></a>testX</td>" );
+        assertTrue( idx > 0 );
+
+        idx = htmlContent.indexOf( "<td><a name=\"TC_com.shape.CircleTest.testRadius\"></a><a href=\"#com.shape.CircleTest.testRadius\">testRadius</a>" );
+        assertTrue( idx > 0 );
+    }
+
+    public void testBasicSurefireReportIfAnchorTestCasesIsFalse()
+        throws Exception
+    {
+        File testPom = new File( getUnitBaseDir(), "basic-surefire-report-anchor-test-cases-false/plugin-config.xml" );
+
+        SurefireReportMojo mojo = (SurefireReportMojo) lookupMojo( "report", testPom );
+
+        assertNotNull( mojo );
+
+        mojo.execute();
+
+        File report =
+            new File( getBasedir(), "target/site/unit/basic-surefire-report-anchor-test-cases-false/surefire-report.html" );
+
+        renderer( mojo, report );
+
+        assertTrue( report.exists() );
+
+        String htmlContent = FileUtils.fileRead( report );
+
+        int idx = htmlContent.indexOf( "<td>testX</td>" );
+        assertTrue( idx > 0 );
+
+        idx = htmlContent.indexOf( "<td><a href=\"#com.shape.CircleTest.testRadius\">testRadius</a>" );
+        assertTrue( idx > 0 );
+    }
 
     /**
      * Renderer the sink from the report mojo.

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/af109fc5/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-false/plugin-config.xml
----------------------------------------------------------------------
diff --git a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-false/plugin-config.xml b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-false/plugin-config.xml
new file mode 100644
index 0000000..c16dca4
--- /dev/null
+++ b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-false/plugin-config.xml
@@ -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.
+  -->
+
+<project>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-surefire-report-plugin</artifactId>
+        <configuration>
+          <outputDirectory>${basedir}/target/site/unit/basic-surefire-report-anchor-test-cases-true</outputDirectory>
+          <project implementation="org.apache.maven.plugins.surefire.report.stubs.SurefireRepMavenProjectStub"/>
+          <showSuccess>true</showSuccess>
+          <reportsDirectory>${basedir}/src/test/resources/unit/basic-surefire-report-anchor-test-cases-true/surefire-reports
+          </reportsDirectory>
+          <outputName>surefire-report</outputName>
+          <xrefLocation>${basedir}/target/site/unit/basic-surefire-report-anchor-test-cases-true/xref-test</xrefLocation>
+          <anchorTestCaseNames>false</anchorTestCaseNames>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/af109fc5/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-false/surefire-reports/TEST-com.shape.CircleTest.xml
----------------------------------------------------------------------
diff --git a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-false/surefire-reports/TEST-com.shape.CircleTest.xml b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-false/surefire-reports/TEST-com.shape.CircleTest.xml
new file mode 100644
index 0000000..1ce1d3d
--- /dev/null
+++ b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-false/surefire-reports/TEST-com.shape.CircleTest.xml
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~ 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.
+  -->
+
+<testsuite errors="1" tests="8" time="0.201" failures="1" name="com.shape.CircleTest">
+  <properties>
+    <property value="Java(TM) 2 Runtime Environment, Standard Edition" name="java.runtime.name"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\bin" name="sun.boot.library.path"/>
+    <property value="1.5.0_04-b05" name="java.vm.version"/>
+    <property value="Sun Microsystems Inc." name="java.vm.vendor"/>
+    <property value="http://java.sun.com/" name="java.vendor.url"/>
+    <property value=";" name="path.separator"/>
+    <property value="Java HotSpot(TM) Client VM" name="java.vm.name"/>
+    <property value="sun.io" name="file.encoding.pkg"/>
+    <property value="US" name="user.country"/>
+    <property value="Service Pack 2" name="sun.os.patch.level"/>
+    <property value="Java Virtual Machine Specification" name="java.vm.specification.name"/>
+    <property value="C:\JAppsCode\mergere-maven\plugins\sample-projects\junit-report-tester" name="user.dir"/>
+    <property value="1.5.0_04-b05" name="java.runtime.version"/>
+    <property value="sun.awt.Win32GraphicsEnvironment" name="java.awt.graphicsenv"/>
+    <property value="C:\JAppsCode\mergere-maven\plugins\sample-projects\junit-report-tester" name="basedir"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\lib\endorsed" name="java.endorsed.dirs"/>
+    <property value="x86" name="os.arch"/>
+    <property value="C:\DOCUME~1\Jontri\LOCALS~1\Temp\" name="java.io.tmpdir"/>
+    <property value="
+" name="line.separator"/>
+    <property value="Sun Microsystems Inc." name="java.vm.specification.vendor"/>
+    <property value="" name="user.variant"/>
+    <property value="Windows XP" name="os.name"/>
+    <property value="C:\JApps\maven-2.0-beta-1\bin\m2.conf" name="classworlds.conf"/>
+    <property value="Cp1252" name="sun.jnu.encoding"/>
+    <property
+        value="c:\japps\jdk1.5.0_04\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\JApps\maven-2.0-beta-1\bin;C:\JApps\maven-1.0.2\bin;c:\BatchFile;C:\Program Files\cvsnt;C:\JApps\svn-1.1.4\bin;C:\JApps\ant-1.6.2\bin;"
+        name="java.library.path"/>
+    <property value="Java Platform API Specification" name="java.specification.name"/>
+    <property value="49.0" name="java.class.version"/>
+    <property value="HotSpot Client Compiler" name="sun.management.compiler"/>
+    <property value="5.1" name="os.version"/>
+    <property value="C:\Documents and Settings\Jontri" name="user.home"/>
+    <property value="Asia/Shanghai" name="user.timezone"/>
+    <property value="sun.awt.windows.WPrinterJob" name="java.awt.printerjob"/>
+    <property value="Cp1252" name="file.encoding"/>
+    <property value="1.5" name="java.specification.version"/>
+    <property value="Jontri" name="user.name"/>
+    <property value="C:\JApps\maven-2.0-beta-1\core\boot\classworlds-1.1-alpha-2.jar" name="java.class.path"/>
+    <property value="1.0" name="java.vm.specification.version"/>
+    <property value="32" name="sun.arch.data.model"/>
+    <property value="c:\japps\jdk1.5.0_04\jre" name="java.home"/>
+    <property value="Sun Microsystems Inc." name="java.specification.vendor"/>
+    <property value="en" name="user.language"/>
+    <property value="sun.awt.windows.WToolkit" name="awt.toolkit"/>
+    <property value="mixed mode, sharing" name="java.vm.info"/>
+    <property value="1.5.0_04" name="java.version"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\lib\ext" name="java.ext.dirs"/>
+    <property
+        value="c:\japps\jdk1.5.0_04\jre\lib\rt.jar;c:\japps\jdk1.5.0_04\jre\lib\i18n.jar;c:\japps\jdk1.5.0_04\jre\lib\sunrsasign.jar;c:\japps\jdk1.5.0_04\jre\lib\jsse.jar;c:\japps\jdk1.5.0_04\jre\lib\jce.jar;c:\japps\jdk1.5.0_04\jre\lib\charsets.jar;c:\japps\jdk1.5.0_04\jre\classes"
+        name="sun.boot.class.path"/>
+    <property value="Sun Microsystems Inc." name="java.vendor"/>
+    <property value="C:\JApps\maven-2.0-beta-1" name="maven.home"/>
+    <property value="C:\Documents and Settings\Jontri\.m2\repository" name="localRepository"/>
+    <property value="\" name="file.separator"/>
+    <property value="http://java.sun.com/cgi-bin/bugreport.cgi" name="java.vendor.url.bug"/>
+    <property value="little" name="sun.cpu.endian"/>
+    <property value="UnicodeLittle" name="sun.io.unicode.encoding"/>
+    <property value="windows" name="sun.desktop"/>
+    <property value="pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86" name="sun.cpu.isalist"/>
+  </properties>
+  <testcase time="0.01" name="testX"/>
+  <testcase time="0" name="testY"/>
+  <testcase time="0" name="testXY"/>
+  <testcase time="0.01" name="testRadius">
+    <failure type="junit.framework.AssertionFailedError" message="expected:&lt;20&gt; but was:&lt;10&gt;">
+      junit.framework.AssertionFailedError: expected:&lt;20&gt; but was:&lt;10&gt;
+      at junit.framework.Assert.fail(Assert.java:47)
+      at junit.framework.Assert.failNotEquals(Assert.java:282)
+      at junit.framework.Assert.assertEquals(Assert.java:64)
+      at junit.framework.Assert.assertEquals(Assert.java:201)
+      at junit.framework.Assert.assertEquals(Assert.java:207)
+      at com.shape.CircleTest.testRadius(CircleTest.java:34)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at junit.framework.TestCase.runTest(TestCase.java:154)
+      at junit.framework.TestCase.runBare(TestCase.java:127)
+      at junit.framework.TestResult$1.protect(TestResult.java:106)
+      at junit.framework.TestResult.runProtected(TestResult.java:124)
+      at junit.framework.TestResult.run(TestResult.java:109)
+      at junit.framework.TestCase.run(TestCase.java:118)
+      at junit.framework.TestSuite.runTest(TestSuite.java:208)
+      at junit.framework.TestSuite.run(TestSuite.java:203)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:246)
+      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:220)
+      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:203)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:152)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:76)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
+      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:241)
+      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:357)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:452)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
+      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
+      at org.apache.maven.cli.MavenCli.main(MavenCli.java:316)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+    </failure>
+    <system-out>[OUT] : Getting the diameter
+    </system-out>
+    <system-err>[ERR] : Getting the Circumference
+    </system-err>
+  </testcase>
+  <testcase time="0.02" name="testProperties">
+    <error type="java.lang.ArithmeticException" message="/ by zero">java.lang.ArithmeticException: / by zero
+      at com.shape.CircleTest.testProperties(CircleTest.java:44)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at junit.framework.TestCase.runTest(TestCase.java:154)
+      at junit.framework.TestCase.runBare(TestCase.java:127)
+      at junit.framework.TestResult$1.protect(TestResult.java:106)
+      at junit.framework.TestResult.runProtected(TestResult.java:124)
+      at junit.framework.TestResult.run(TestResult.java:109)
+      at junit.framework.TestCase.run(TestCase.java:118)
+      at junit.framework.TestSuite.runTest(TestSuite.java:208)
+      at junit.framework.TestSuite.run(TestSuite.java:203)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:246)
+      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:220)
+      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:203)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:152)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:76)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
+      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:241)
+      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:357)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:452)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
+      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
+      at org.apache.maven.cli.MavenCli.main(MavenCli.java:316)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+    </error>
+    <system-out>[OUT] : Getting the diameter
+    </system-out>
+    <system-err>[ERR] : Getting the Circumference
+    </system-err>
+  </testcase>
+  <testcase time="0" name="testPI"/>
+  <testcase time="0.01" name="testCircumference"/>
+  <testcase time="0" name="testDiameter"/>
+</testsuite>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/af109fc5/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-true/plugin-config.xml
----------------------------------------------------------------------
diff --git a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-true/plugin-config.xml b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-true/plugin-config.xml
new file mode 100644
index 0000000..747d328
--- /dev/null
+++ b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-true/plugin-config.xml
@@ -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.
+  -->
+
+<project>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-surefire-report-plugin</artifactId>
+        <configuration>
+          <outputDirectory>${basedir}/target/site/unit/basic-surefire-report-anchor-test-cases-true</outputDirectory>
+          <project implementation="org.apache.maven.plugins.surefire.report.stubs.SurefireRepMavenProjectStub"/>
+          <showSuccess>true</showSuccess>
+          <reportsDirectory>${basedir}/src/test/resources/unit/basic-surefire-report-anchor-test-cases-true/surefire-reports
+          </reportsDirectory>
+          <outputName>surefire-report</outputName>
+          <xrefLocation>${basedir}/target/site/unit/basic-surefire-report-anchor-test-cases-true/xref-test</xrefLocation>
+          <anchorTestCaseNames>true</anchorTestCaseNames>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/af109fc5/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-true/surefire-reports/TEST-com.shape.CircleTest.xml
----------------------------------------------------------------------
diff --git a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-true/surefire-reports/TEST-com.shape.CircleTest.xml b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-true/surefire-reports/TEST-com.shape.CircleTest.xml
new file mode 100644
index 0000000..1ce1d3d
--- /dev/null
+++ b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-true/surefire-reports/TEST-com.shape.CircleTest.xml
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~ 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.
+  -->
+
+<testsuite errors="1" tests="8" time="0.201" failures="1" name="com.shape.CircleTest">
+  <properties>
+    <property value="Java(TM) 2 Runtime Environment, Standard Edition" name="java.runtime.name"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\bin" name="sun.boot.library.path"/>
+    <property value="1.5.0_04-b05" name="java.vm.version"/>
+    <property value="Sun Microsystems Inc." name="java.vm.vendor"/>
+    <property value="http://java.sun.com/" name="java.vendor.url"/>
+    <property value=";" name="path.separator"/>
+    <property value="Java HotSpot(TM) Client VM" name="java.vm.name"/>
+    <property value="sun.io" name="file.encoding.pkg"/>
+    <property value="US" name="user.country"/>
+    <property value="Service Pack 2" name="sun.os.patch.level"/>
+    <property value="Java Virtual Machine Specification" name="java.vm.specification.name"/>
+    <property value="C:\JAppsCode\mergere-maven\plugins\sample-projects\junit-report-tester" name="user.dir"/>
+    <property value="1.5.0_04-b05" name="java.runtime.version"/>
+    <property value="sun.awt.Win32GraphicsEnvironment" name="java.awt.graphicsenv"/>
+    <property value="C:\JAppsCode\mergere-maven\plugins\sample-projects\junit-report-tester" name="basedir"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\lib\endorsed" name="java.endorsed.dirs"/>
+    <property value="x86" name="os.arch"/>
+    <property value="C:\DOCUME~1\Jontri\LOCALS~1\Temp\" name="java.io.tmpdir"/>
+    <property value="
+" name="line.separator"/>
+    <property value="Sun Microsystems Inc." name="java.vm.specification.vendor"/>
+    <property value="" name="user.variant"/>
+    <property value="Windows XP" name="os.name"/>
+    <property value="C:\JApps\maven-2.0-beta-1\bin\m2.conf" name="classworlds.conf"/>
+    <property value="Cp1252" name="sun.jnu.encoding"/>
+    <property
+        value="c:\japps\jdk1.5.0_04\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\JApps\maven-2.0-beta-1\bin;C:\JApps\maven-1.0.2\bin;c:\BatchFile;C:\Program Files\cvsnt;C:\JApps\svn-1.1.4\bin;C:\JApps\ant-1.6.2\bin;"
+        name="java.library.path"/>
+    <property value="Java Platform API Specification" name="java.specification.name"/>
+    <property value="49.0" name="java.class.version"/>
+    <property value="HotSpot Client Compiler" name="sun.management.compiler"/>
+    <property value="5.1" name="os.version"/>
+    <property value="C:\Documents and Settings\Jontri" name="user.home"/>
+    <property value="Asia/Shanghai" name="user.timezone"/>
+    <property value="sun.awt.windows.WPrinterJob" name="java.awt.printerjob"/>
+    <property value="Cp1252" name="file.encoding"/>
+    <property value="1.5" name="java.specification.version"/>
+    <property value="Jontri" name="user.name"/>
+    <property value="C:\JApps\maven-2.0-beta-1\core\boot\classworlds-1.1-alpha-2.jar" name="java.class.path"/>
+    <property value="1.0" name="java.vm.specification.version"/>
+    <property value="32" name="sun.arch.data.model"/>
+    <property value="c:\japps\jdk1.5.0_04\jre" name="java.home"/>
+    <property value="Sun Microsystems Inc." name="java.specification.vendor"/>
+    <property value="en" name="user.language"/>
+    <property value="sun.awt.windows.WToolkit" name="awt.toolkit"/>
+    <property value="mixed mode, sharing" name="java.vm.info"/>
+    <property value="1.5.0_04" name="java.version"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\lib\ext" name="java.ext.dirs"/>
+    <property
+        value="c:\japps\jdk1.5.0_04\jre\lib\rt.jar;c:\japps\jdk1.5.0_04\jre\lib\i18n.jar;c:\japps\jdk1.5.0_04\jre\lib\sunrsasign.jar;c:\japps\jdk1.5.0_04\jre\lib\jsse.jar;c:\japps\jdk1.5.0_04\jre\lib\jce.jar;c:\japps\jdk1.5.0_04\jre\lib\charsets.jar;c:\japps\jdk1.5.0_04\jre\classes"
+        name="sun.boot.class.path"/>
+    <property value="Sun Microsystems Inc." name="java.vendor"/>
+    <property value="C:\JApps\maven-2.0-beta-1" name="maven.home"/>
+    <property value="C:\Documents and Settings\Jontri\.m2\repository" name="localRepository"/>
+    <property value="\" name="file.separator"/>
+    <property value="http://java.sun.com/cgi-bin/bugreport.cgi" name="java.vendor.url.bug"/>
+    <property value="little" name="sun.cpu.endian"/>
+    <property value="UnicodeLittle" name="sun.io.unicode.encoding"/>
+    <property value="windows" name="sun.desktop"/>
+    <property value="pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86" name="sun.cpu.isalist"/>
+  </properties>
+  <testcase time="0.01" name="testX"/>
+  <testcase time="0" name="testY"/>
+  <testcase time="0" name="testXY"/>
+  <testcase time="0.01" name="testRadius">
+    <failure type="junit.framework.AssertionFailedError" message="expected:&lt;20&gt; but was:&lt;10&gt;">
+      junit.framework.AssertionFailedError: expected:&lt;20&gt; but was:&lt;10&gt;
+      at junit.framework.Assert.fail(Assert.java:47)
+      at junit.framework.Assert.failNotEquals(Assert.java:282)
+      at junit.framework.Assert.assertEquals(Assert.java:64)
+      at junit.framework.Assert.assertEquals(Assert.java:201)
+      at junit.framework.Assert.assertEquals(Assert.java:207)
+      at com.shape.CircleTest.testRadius(CircleTest.java:34)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at junit.framework.TestCase.runTest(TestCase.java:154)
+      at junit.framework.TestCase.runBare(TestCase.java:127)
+      at junit.framework.TestResult$1.protect(TestResult.java:106)
+      at junit.framework.TestResult.runProtected(TestResult.java:124)
+      at junit.framework.TestResult.run(TestResult.java:109)
+      at junit.framework.TestCase.run(TestCase.java:118)
+      at junit.framework.TestSuite.runTest(TestSuite.java:208)
+      at junit.framework.TestSuite.run(TestSuite.java:203)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:246)
+      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:220)
+      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:203)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:152)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:76)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
+      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:241)
+      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:357)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:452)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
+      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
+      at org.apache.maven.cli.MavenCli.main(MavenCli.java:316)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+    </failure>
+    <system-out>[OUT] : Getting the diameter
+    </system-out>
+    <system-err>[ERR] : Getting the Circumference
+    </system-err>
+  </testcase>
+  <testcase time="0.02" name="testProperties">
+    <error type="java.lang.ArithmeticException" message="/ by zero">java.lang.ArithmeticException: / by zero
+      at com.shape.CircleTest.testProperties(CircleTest.java:44)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at junit.framework.TestCase.runTest(TestCase.java:154)
+      at junit.framework.TestCase.runBare(TestCase.java:127)
+      at junit.framework.TestResult$1.protect(TestResult.java:106)
+      at junit.framework.TestResult.runProtected(TestResult.java:124)
+      at junit.framework.TestResult.run(TestResult.java:109)
+      at junit.framework.TestCase.run(TestCase.java:118)
+      at junit.framework.TestSuite.runTest(TestSuite.java:208)
+      at junit.framework.TestSuite.run(TestSuite.java:203)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:246)
+      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:220)
+      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:203)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:152)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:76)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
+      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:241)
+      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:357)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:452)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
+      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
+      at org.apache.maven.cli.MavenCli.main(MavenCli.java:316)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+    </error>
+    <system-out>[OUT] : Getting the diameter
+    </system-out>
+    <system-err>[ERR] : Getting the Circumference
+    </system-err>
+  </testcase>
+  <testcase time="0" name="testPI"/>
+  <testcase time="0.01" name="testCircumference"/>
+  <testcase time="0" name="testDiameter"/>
+</testsuite>
\ No newline at end of file


[2/3] maven-surefire git commit: [SUREFIRE-1140] Remove anchorTestCases parameter and add documentation regarding the anchor name formats.

Posted by ti...@apache.org.
[SUREFIRE-1140] Remove anchorTestCases parameter and add documentation regarding the anchor name formats.


Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/9b7ec521
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/9b7ec521
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/9b7ec521

Branch: refs/heads/master
Commit: 9b7ec521ffa61c17b01e443f91390f78bc9b7b43
Parents: af109fc
Author: Sean Griffin <sg...@cerner.com>
Authored: Wed May 27 08:19:22 2015 -0500
Committer: Tibor17 <ti...@lycos.com>
Committed: Sun Jun 7 14:34:30 2015 +0200

----------------------------------------------------------------------
 .../report/AbstractSurefireReportMojo.java      |  11 +-
 .../report/SurefireReportGenerator.java         |  20 +-
 .../site/apt/examples/linking-to-tests.apt.vm   |  54 +++++
 maven-surefire-report-plugin/src/site/site.xml  |   1 +
 .../surefire/report/SurefireReportMojoTest.java |  33 +--
 .../plugin-config.xml                           |  38 ----
 .../TEST-com.shape.CircleTest.xml               | 200 -------------------
 .../plugin-config.xml                           |  38 ----
 .../TEST-com.shape.CircleTest.xml               | 200 -------------------
 .../plugin-config.xml                           |  37 ++++
 .../TEST-com.shape.CircleTest.xml               | 200 +++++++++++++++++++
 11 files changed, 299 insertions(+), 533 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/9b7ec521/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/AbstractSurefireReportMojo.java
----------------------------------------------------------------------
diff --git a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/AbstractSurefireReportMojo.java b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/AbstractSurefireReportMojo.java
index 30afc51..aaa7cee 100644
--- a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/AbstractSurefireReportMojo.java
+++ b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/AbstractSurefireReportMojo.java
@@ -51,14 +51,6 @@ public abstract class AbstractSurefireReportMojo
     private boolean showSuccess;
 
     /**
-     * If set to true, an anchor is created for each test case name.
-     * 
-     * @noinspection UnusedDeclaration
-     */
-    @Parameter( defaultValue = "false", property = "anchorTestCaseNames" )
-    private boolean anchorTestCaseNames;
-
-    /**
      * Directories containing the XML Report files that will be parsed and rendered to HTML format.
      *
      * @noinspection UnusedDeclaration
@@ -162,8 +154,7 @@ public abstract class AbstractSurefireReportMojo
         }
 
         SurefireReportGenerator report =
-            new SurefireReportGenerator( reportsDirectoryList, locale, showSuccess, determineXrefLocation(),
-                anchorTestCaseNames );
+            new SurefireReportGenerator( reportsDirectoryList, locale, showSuccess, determineXrefLocation() );
 
         report.doGenerateReport( getBundle( locale ), getSink() );
     }

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/9b7ec521/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java
----------------------------------------------------------------------
diff --git a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java
index ea0fc32..8df26fa 100644
--- a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java
+++ b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java
@@ -46,20 +46,16 @@ public class SurefireReportGenerator
 
     private final String xrefLocation;
     
-    private final boolean anchorTestCaseNames;
-
     private static final int LEFT = Sink.JUSTIFY_LEFT;
 
     public SurefireReportGenerator( List<File> reportsDirectories, Locale locale, boolean showSuccess,
-                                    String xrefLocation, boolean anchorTestCaseNames )
+                                    String xrefLocation )
     {
         report = new SurefireReportParser( reportsDirectories, locale );
 
         this.xrefLocation = xrefLocation;
 
         this.showSuccess = showSuccess;
-        
-        this.anchorTestCaseNames = anchorTestCaseNames;
     }
 
     public void doGenerateReport( ResourceBundle bundle, Sink sink )
@@ -470,10 +466,7 @@ public class SurefireReportGenerator
         {
             sink.tableCell();
 
-            if ( anchorTestCaseNames )
-            {
-                sinkAnchor( sink, "TC_" + toHtmlId( testCase.getFullName() ) );
-            }
+            sinkAnchor( sink, "TC_" + toHtmlId( testCase.getFullName() ) );
 
             sinkLink( sink, testCase.getName(), "#" + toHtmlId( testCase.getFullName() ) );
 
@@ -507,14 +500,7 @@ public class SurefireReportGenerator
         }
         else
         {
-            if ( anchorTestCaseNames )
-            {
-                sinkCellAnchor( sink, testCase.getName(), "TC_" + toHtmlId( testCase.getFullName() ) );
-            }
-            else
-            {
-                sinkCell( sink, testCase.getName() );
-            }
+            sinkCellAnchor( sink, testCase.getName(), "TC_" + toHtmlId( testCase.getFullName() ) );
         }
 
         sinkCell( sink, numberFormat.format( testCase.getTime() ) );

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/9b7ec521/maven-surefire-report-plugin/src/site/apt/examples/linking-to-tests.apt.vm
----------------------------------------------------------------------
diff --git a/maven-surefire-report-plugin/src/site/apt/examples/linking-to-tests.apt.vm b/maven-surefire-report-plugin/src/site/apt/examples/linking-to-tests.apt.vm
new file mode 100644
index 0000000..d980759
--- /dev/null
+++ b/maven-surefire-report-plugin/src/site/apt/examples/linking-to-tests.apt.vm
@@ -0,0 +1,54 @@
+  ------
+  Linking to Tests
+  ------
+  Sean Griffin
+  ------
+  May 2015
+  ------
+
+~~ Copyright 2006 The Apache Software Foundation.
+~~
+~~ Licensed 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
+
+Linking to Tests
+
+  Anchors surround the names of each test suite and test case in the report so that you can remotely link to them.
+
+  The format of the anchor names for test suites is as follows:
+
++----+
+<package><suiteName>
++----+
+
+  Notice that there is no "." between the package name and the suite name.
+
+  The format of the anchor names for test cases is as follows:
+
++----+
+TC_<package>.<suiteName>.<testName>
++----+
+
+  To illustrate with an example, suppose the following:
+
+  * Package name: org.foo
+
+  * Test suite name: FooTest
+
+  * Test names: testFooWithBar, testFooWithBaz
+
+  []
+
+  The anchor name for the test suite would be "org.fooFooTest" and the anchor names for the test cases would be "TC_org.foo.FooTest.testFooWithBar" and "TC_org.foo.FooTest.testFooWithBaz".
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/9b7ec521/maven-surefire-report-plugin/src/site/site.xml
----------------------------------------------------------------------
diff --git a/maven-surefire-report-plugin/src/site/site.xml b/maven-surefire-report-plugin/src/site/site.xml
index 8aa02a7..6478e1b 100644
--- a/maven-surefire-report-plugin/src/site/site.xml
+++ b/maven-surefire-report-plugin/src/site/site.xml
@@ -37,6 +37,7 @@
       <item name="Changing the Report Name" href="examples/changing-report-name.html"/>
       <item name="Configuring the Output Location of the Report" href="examples/report-custom-location.html"/>
       <item name="Source Code Cross Reference" href="examples/cross-referencing.html"/>
+      <item name="Linking to Tests" href="examples/linking-to-tests.html"/>
     </menu>
   </body>
 </project>

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/9b7ec521/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java
----------------------------------------------------------------------
diff --git a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java
index 7a4bec9..832278e 100644
--- a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java
+++ b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java
@@ -195,10 +195,10 @@ public class SurefireReportMojoTest
         assertTrue( idx < 0 );
     }
     
-    public void testBasicSurefireReportIfAnchorTestCasesIsTrue()
+    public void testBasicSurefireReport_AnchorTestCases()
         throws Exception
     {
-        File testPom = new File( getUnitBaseDir(), "basic-surefire-report-anchor-test-cases-true/plugin-config.xml" );
+        File testPom = new File( getUnitBaseDir(), "basic-surefire-report-anchor-test-cases/plugin-config.xml" );
 
         SurefireReportMojo mojo = (SurefireReportMojo) lookupMojo( "report", testPom );
 
@@ -207,7 +207,7 @@ public class SurefireReportMojoTest
         mojo.execute();
 
         File report =
-            new File( getBasedir(), "target/site/unit/basic-surefire-report-anchor-test-cases-true/surefire-report.html" );
+            new File( getBasedir(), "target/site/unit/basic-surefire-report-anchor-test-cases/surefire-report.html" );
 
         renderer( mojo, report );
 
@@ -222,33 +222,6 @@ public class SurefireReportMojoTest
         assertTrue( idx > 0 );
     }
 
-    public void testBasicSurefireReportIfAnchorTestCasesIsFalse()
-        throws Exception
-    {
-        File testPom = new File( getUnitBaseDir(), "basic-surefire-report-anchor-test-cases-false/plugin-config.xml" );
-
-        SurefireReportMojo mojo = (SurefireReportMojo) lookupMojo( "report", testPom );
-
-        assertNotNull( mojo );
-
-        mojo.execute();
-
-        File report =
-            new File( getBasedir(), "target/site/unit/basic-surefire-report-anchor-test-cases-false/surefire-report.html" );
-
-        renderer( mojo, report );
-
-        assertTrue( report.exists() );
-
-        String htmlContent = FileUtils.fileRead( report );
-
-        int idx = htmlContent.indexOf( "<td>testX</td>" );
-        assertTrue( idx > 0 );
-
-        idx = htmlContent.indexOf( "<td><a href=\"#com.shape.CircleTest.testRadius\">testRadius</a>" );
-        assertTrue( idx > 0 );
-    }
-
     /**
      * Renderer the sink from the report mojo.
      *

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/9b7ec521/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-false/plugin-config.xml
----------------------------------------------------------------------
diff --git a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-false/plugin-config.xml b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-false/plugin-config.xml
deleted file mode 100644
index c16dca4..0000000
--- a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-false/plugin-config.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<!--
-  ~ 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.
-  -->
-
-<project>
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-surefire-report-plugin</artifactId>
-        <configuration>
-          <outputDirectory>${basedir}/target/site/unit/basic-surefire-report-anchor-test-cases-true</outputDirectory>
-          <project implementation="org.apache.maven.plugins.surefire.report.stubs.SurefireRepMavenProjectStub"/>
-          <showSuccess>true</showSuccess>
-          <reportsDirectory>${basedir}/src/test/resources/unit/basic-surefire-report-anchor-test-cases-true/surefire-reports
-          </reportsDirectory>
-          <outputName>surefire-report</outputName>
-          <xrefLocation>${basedir}/target/site/unit/basic-surefire-report-anchor-test-cases-true/xref-test</xrefLocation>
-          <anchorTestCaseNames>false</anchorTestCaseNames>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/9b7ec521/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-false/surefire-reports/TEST-com.shape.CircleTest.xml
----------------------------------------------------------------------
diff --git a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-false/surefire-reports/TEST-com.shape.CircleTest.xml b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-false/surefire-reports/TEST-com.shape.CircleTest.xml
deleted file mode 100644
index 1ce1d3d..0000000
--- a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-false/surefire-reports/TEST-com.shape.CircleTest.xml
+++ /dev/null
@@ -1,200 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  ~ 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.
-  -->
-
-<testsuite errors="1" tests="8" time="0.201" failures="1" name="com.shape.CircleTest">
-  <properties>
-    <property value="Java(TM) 2 Runtime Environment, Standard Edition" name="java.runtime.name"/>
-    <property value="c:\japps\jdk1.5.0_04\jre\bin" name="sun.boot.library.path"/>
-    <property value="1.5.0_04-b05" name="java.vm.version"/>
-    <property value="Sun Microsystems Inc." name="java.vm.vendor"/>
-    <property value="http://java.sun.com/" name="java.vendor.url"/>
-    <property value=";" name="path.separator"/>
-    <property value="Java HotSpot(TM) Client VM" name="java.vm.name"/>
-    <property value="sun.io" name="file.encoding.pkg"/>
-    <property value="US" name="user.country"/>
-    <property value="Service Pack 2" name="sun.os.patch.level"/>
-    <property value="Java Virtual Machine Specification" name="java.vm.specification.name"/>
-    <property value="C:\JAppsCode\mergere-maven\plugins\sample-projects\junit-report-tester" name="user.dir"/>
-    <property value="1.5.0_04-b05" name="java.runtime.version"/>
-    <property value="sun.awt.Win32GraphicsEnvironment" name="java.awt.graphicsenv"/>
-    <property value="C:\JAppsCode\mergere-maven\plugins\sample-projects\junit-report-tester" name="basedir"/>
-    <property value="c:\japps\jdk1.5.0_04\jre\lib\endorsed" name="java.endorsed.dirs"/>
-    <property value="x86" name="os.arch"/>
-    <property value="C:\DOCUME~1\Jontri\LOCALS~1\Temp\" name="java.io.tmpdir"/>
-    <property value="
-" name="line.separator"/>
-    <property value="Sun Microsystems Inc." name="java.vm.specification.vendor"/>
-    <property value="" name="user.variant"/>
-    <property value="Windows XP" name="os.name"/>
-    <property value="C:\JApps\maven-2.0-beta-1\bin\m2.conf" name="classworlds.conf"/>
-    <property value="Cp1252" name="sun.jnu.encoding"/>
-    <property
-        value="c:\japps\jdk1.5.0_04\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\JApps\maven-2.0-beta-1\bin;C:\JApps\maven-1.0.2\bin;c:\BatchFile;C:\Program Files\cvsnt;C:\JApps\svn-1.1.4\bin;C:\JApps\ant-1.6.2\bin;"
-        name="java.library.path"/>
-    <property value="Java Platform API Specification" name="java.specification.name"/>
-    <property value="49.0" name="java.class.version"/>
-    <property value="HotSpot Client Compiler" name="sun.management.compiler"/>
-    <property value="5.1" name="os.version"/>
-    <property value="C:\Documents and Settings\Jontri" name="user.home"/>
-    <property value="Asia/Shanghai" name="user.timezone"/>
-    <property value="sun.awt.windows.WPrinterJob" name="java.awt.printerjob"/>
-    <property value="Cp1252" name="file.encoding"/>
-    <property value="1.5" name="java.specification.version"/>
-    <property value="Jontri" name="user.name"/>
-    <property value="C:\JApps\maven-2.0-beta-1\core\boot\classworlds-1.1-alpha-2.jar" name="java.class.path"/>
-    <property value="1.0" name="java.vm.specification.version"/>
-    <property value="32" name="sun.arch.data.model"/>
-    <property value="c:\japps\jdk1.5.0_04\jre" name="java.home"/>
-    <property value="Sun Microsystems Inc." name="java.specification.vendor"/>
-    <property value="en" name="user.language"/>
-    <property value="sun.awt.windows.WToolkit" name="awt.toolkit"/>
-    <property value="mixed mode, sharing" name="java.vm.info"/>
-    <property value="1.5.0_04" name="java.version"/>
-    <property value="c:\japps\jdk1.5.0_04\jre\lib\ext" name="java.ext.dirs"/>
-    <property
-        value="c:\japps\jdk1.5.0_04\jre\lib\rt.jar;c:\japps\jdk1.5.0_04\jre\lib\i18n.jar;c:\japps\jdk1.5.0_04\jre\lib\sunrsasign.jar;c:\japps\jdk1.5.0_04\jre\lib\jsse.jar;c:\japps\jdk1.5.0_04\jre\lib\jce.jar;c:\japps\jdk1.5.0_04\jre\lib\charsets.jar;c:\japps\jdk1.5.0_04\jre\classes"
-        name="sun.boot.class.path"/>
-    <property value="Sun Microsystems Inc." name="java.vendor"/>
-    <property value="C:\JApps\maven-2.0-beta-1" name="maven.home"/>
-    <property value="C:\Documents and Settings\Jontri\.m2\repository" name="localRepository"/>
-    <property value="\" name="file.separator"/>
-    <property value="http://java.sun.com/cgi-bin/bugreport.cgi" name="java.vendor.url.bug"/>
-    <property value="little" name="sun.cpu.endian"/>
-    <property value="UnicodeLittle" name="sun.io.unicode.encoding"/>
-    <property value="windows" name="sun.desktop"/>
-    <property value="pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86" name="sun.cpu.isalist"/>
-  </properties>
-  <testcase time="0.01" name="testX"/>
-  <testcase time="0" name="testY"/>
-  <testcase time="0" name="testXY"/>
-  <testcase time="0.01" name="testRadius">
-    <failure type="junit.framework.AssertionFailedError" message="expected:&lt;20&gt; but was:&lt;10&gt;">
-      junit.framework.AssertionFailedError: expected:&lt;20&gt; but was:&lt;10&gt;
-      at junit.framework.Assert.fail(Assert.java:47)
-      at junit.framework.Assert.failNotEquals(Assert.java:282)
-      at junit.framework.Assert.assertEquals(Assert.java:64)
-      at junit.framework.Assert.assertEquals(Assert.java:201)
-      at junit.framework.Assert.assertEquals(Assert.java:207)
-      at com.shape.CircleTest.testRadius(CircleTest.java:34)
-      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
-      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
-      at java.lang.reflect.Method.invoke(Method.java:585)
-      at junit.framework.TestCase.runTest(TestCase.java:154)
-      at junit.framework.TestCase.runBare(TestCase.java:127)
-      at junit.framework.TestResult$1.protect(TestResult.java:106)
-      at junit.framework.TestResult.runProtected(TestResult.java:124)
-      at junit.framework.TestResult.run(TestResult.java:109)
-      at junit.framework.TestCase.run(TestCase.java:118)
-      at junit.framework.TestSuite.runTest(TestSuite.java:208)
-      at junit.framework.TestSuite.run(TestSuite.java:203)
-      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
-      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
-      at java.lang.reflect.Method.invoke(Method.java:585)
-      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:246)
-      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:220)
-      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:203)
-      at org.codehaus.surefire.Surefire.run(Surefire.java:152)
-      at org.codehaus.surefire.Surefire.run(Surefire.java:76)
-      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
-      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
-      at java.lang.reflect.Method.invoke(Method.java:585)
-      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
-      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:241)
-      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:357)
-      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
-      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:452)
-      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
-      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
-      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
-      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
-      at org.apache.maven.cli.MavenCli.main(MavenCli.java:316)
-      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
-      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
-      at java.lang.reflect.Method.invoke(Method.java:585)
-      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
-      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
-      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
-      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
-    </failure>
-    <system-out>[OUT] : Getting the diameter
-    </system-out>
-    <system-err>[ERR] : Getting the Circumference
-    </system-err>
-  </testcase>
-  <testcase time="0.02" name="testProperties">
-    <error type="java.lang.ArithmeticException" message="/ by zero">java.lang.ArithmeticException: / by zero
-      at com.shape.CircleTest.testProperties(CircleTest.java:44)
-      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
-      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
-      at java.lang.reflect.Method.invoke(Method.java:585)
-      at junit.framework.TestCase.runTest(TestCase.java:154)
-      at junit.framework.TestCase.runBare(TestCase.java:127)
-      at junit.framework.TestResult$1.protect(TestResult.java:106)
-      at junit.framework.TestResult.runProtected(TestResult.java:124)
-      at junit.framework.TestResult.run(TestResult.java:109)
-      at junit.framework.TestCase.run(TestCase.java:118)
-      at junit.framework.TestSuite.runTest(TestSuite.java:208)
-      at junit.framework.TestSuite.run(TestSuite.java:203)
-      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
-      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
-      at java.lang.reflect.Method.invoke(Method.java:585)
-      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:246)
-      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:220)
-      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:203)
-      at org.codehaus.surefire.Surefire.run(Surefire.java:152)
-      at org.codehaus.surefire.Surefire.run(Surefire.java:76)
-      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
-      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
-      at java.lang.reflect.Method.invoke(Method.java:585)
-      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
-      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:241)
-      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:357)
-      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
-      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:452)
-      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
-      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
-      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
-      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
-      at org.apache.maven.cli.MavenCli.main(MavenCli.java:316)
-      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
-      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
-      at java.lang.reflect.Method.invoke(Method.java:585)
-      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
-      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
-      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
-      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
-    </error>
-    <system-out>[OUT] : Getting the diameter
-    </system-out>
-    <system-err>[ERR] : Getting the Circumference
-    </system-err>
-  </testcase>
-  <testcase time="0" name="testPI"/>
-  <testcase time="0.01" name="testCircumference"/>
-  <testcase time="0" name="testDiameter"/>
-</testsuite>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/9b7ec521/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-true/plugin-config.xml
----------------------------------------------------------------------
diff --git a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-true/plugin-config.xml b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-true/plugin-config.xml
deleted file mode 100644
index 747d328..0000000
--- a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-true/plugin-config.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<!--
-  ~ 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.
-  -->
-
-<project>
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-surefire-report-plugin</artifactId>
-        <configuration>
-          <outputDirectory>${basedir}/target/site/unit/basic-surefire-report-anchor-test-cases-true</outputDirectory>
-          <project implementation="org.apache.maven.plugins.surefire.report.stubs.SurefireRepMavenProjectStub"/>
-          <showSuccess>true</showSuccess>
-          <reportsDirectory>${basedir}/src/test/resources/unit/basic-surefire-report-anchor-test-cases-true/surefire-reports
-          </reportsDirectory>
-          <outputName>surefire-report</outputName>
-          <xrefLocation>${basedir}/target/site/unit/basic-surefire-report-anchor-test-cases-true/xref-test</xrefLocation>
-          <anchorTestCaseNames>true</anchorTestCaseNames>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/9b7ec521/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-true/surefire-reports/TEST-com.shape.CircleTest.xml
----------------------------------------------------------------------
diff --git a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-true/surefire-reports/TEST-com.shape.CircleTest.xml b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-true/surefire-reports/TEST-com.shape.CircleTest.xml
deleted file mode 100644
index 1ce1d3d..0000000
--- a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases-true/surefire-reports/TEST-com.shape.CircleTest.xml
+++ /dev/null
@@ -1,200 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  ~ 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.
-  -->
-
-<testsuite errors="1" tests="8" time="0.201" failures="1" name="com.shape.CircleTest">
-  <properties>
-    <property value="Java(TM) 2 Runtime Environment, Standard Edition" name="java.runtime.name"/>
-    <property value="c:\japps\jdk1.5.0_04\jre\bin" name="sun.boot.library.path"/>
-    <property value="1.5.0_04-b05" name="java.vm.version"/>
-    <property value="Sun Microsystems Inc." name="java.vm.vendor"/>
-    <property value="http://java.sun.com/" name="java.vendor.url"/>
-    <property value=";" name="path.separator"/>
-    <property value="Java HotSpot(TM) Client VM" name="java.vm.name"/>
-    <property value="sun.io" name="file.encoding.pkg"/>
-    <property value="US" name="user.country"/>
-    <property value="Service Pack 2" name="sun.os.patch.level"/>
-    <property value="Java Virtual Machine Specification" name="java.vm.specification.name"/>
-    <property value="C:\JAppsCode\mergere-maven\plugins\sample-projects\junit-report-tester" name="user.dir"/>
-    <property value="1.5.0_04-b05" name="java.runtime.version"/>
-    <property value="sun.awt.Win32GraphicsEnvironment" name="java.awt.graphicsenv"/>
-    <property value="C:\JAppsCode\mergere-maven\plugins\sample-projects\junit-report-tester" name="basedir"/>
-    <property value="c:\japps\jdk1.5.0_04\jre\lib\endorsed" name="java.endorsed.dirs"/>
-    <property value="x86" name="os.arch"/>
-    <property value="C:\DOCUME~1\Jontri\LOCALS~1\Temp\" name="java.io.tmpdir"/>
-    <property value="
-" name="line.separator"/>
-    <property value="Sun Microsystems Inc." name="java.vm.specification.vendor"/>
-    <property value="" name="user.variant"/>
-    <property value="Windows XP" name="os.name"/>
-    <property value="C:\JApps\maven-2.0-beta-1\bin\m2.conf" name="classworlds.conf"/>
-    <property value="Cp1252" name="sun.jnu.encoding"/>
-    <property
-        value="c:\japps\jdk1.5.0_04\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\JApps\maven-2.0-beta-1\bin;C:\JApps\maven-1.0.2\bin;c:\BatchFile;C:\Program Files\cvsnt;C:\JApps\svn-1.1.4\bin;C:\JApps\ant-1.6.2\bin;"
-        name="java.library.path"/>
-    <property value="Java Platform API Specification" name="java.specification.name"/>
-    <property value="49.0" name="java.class.version"/>
-    <property value="HotSpot Client Compiler" name="sun.management.compiler"/>
-    <property value="5.1" name="os.version"/>
-    <property value="C:\Documents and Settings\Jontri" name="user.home"/>
-    <property value="Asia/Shanghai" name="user.timezone"/>
-    <property value="sun.awt.windows.WPrinterJob" name="java.awt.printerjob"/>
-    <property value="Cp1252" name="file.encoding"/>
-    <property value="1.5" name="java.specification.version"/>
-    <property value="Jontri" name="user.name"/>
-    <property value="C:\JApps\maven-2.0-beta-1\core\boot\classworlds-1.1-alpha-2.jar" name="java.class.path"/>
-    <property value="1.0" name="java.vm.specification.version"/>
-    <property value="32" name="sun.arch.data.model"/>
-    <property value="c:\japps\jdk1.5.0_04\jre" name="java.home"/>
-    <property value="Sun Microsystems Inc." name="java.specification.vendor"/>
-    <property value="en" name="user.language"/>
-    <property value="sun.awt.windows.WToolkit" name="awt.toolkit"/>
-    <property value="mixed mode, sharing" name="java.vm.info"/>
-    <property value="1.5.0_04" name="java.version"/>
-    <property value="c:\japps\jdk1.5.0_04\jre\lib\ext" name="java.ext.dirs"/>
-    <property
-        value="c:\japps\jdk1.5.0_04\jre\lib\rt.jar;c:\japps\jdk1.5.0_04\jre\lib\i18n.jar;c:\japps\jdk1.5.0_04\jre\lib\sunrsasign.jar;c:\japps\jdk1.5.0_04\jre\lib\jsse.jar;c:\japps\jdk1.5.0_04\jre\lib\jce.jar;c:\japps\jdk1.5.0_04\jre\lib\charsets.jar;c:\japps\jdk1.5.0_04\jre\classes"
-        name="sun.boot.class.path"/>
-    <property value="Sun Microsystems Inc." name="java.vendor"/>
-    <property value="C:\JApps\maven-2.0-beta-1" name="maven.home"/>
-    <property value="C:\Documents and Settings\Jontri\.m2\repository" name="localRepository"/>
-    <property value="\" name="file.separator"/>
-    <property value="http://java.sun.com/cgi-bin/bugreport.cgi" name="java.vendor.url.bug"/>
-    <property value="little" name="sun.cpu.endian"/>
-    <property value="UnicodeLittle" name="sun.io.unicode.encoding"/>
-    <property value="windows" name="sun.desktop"/>
-    <property value="pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86" name="sun.cpu.isalist"/>
-  </properties>
-  <testcase time="0.01" name="testX"/>
-  <testcase time="0" name="testY"/>
-  <testcase time="0" name="testXY"/>
-  <testcase time="0.01" name="testRadius">
-    <failure type="junit.framework.AssertionFailedError" message="expected:&lt;20&gt; but was:&lt;10&gt;">
-      junit.framework.AssertionFailedError: expected:&lt;20&gt; but was:&lt;10&gt;
-      at junit.framework.Assert.fail(Assert.java:47)
-      at junit.framework.Assert.failNotEquals(Assert.java:282)
-      at junit.framework.Assert.assertEquals(Assert.java:64)
-      at junit.framework.Assert.assertEquals(Assert.java:201)
-      at junit.framework.Assert.assertEquals(Assert.java:207)
-      at com.shape.CircleTest.testRadius(CircleTest.java:34)
-      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
-      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
-      at java.lang.reflect.Method.invoke(Method.java:585)
-      at junit.framework.TestCase.runTest(TestCase.java:154)
-      at junit.framework.TestCase.runBare(TestCase.java:127)
-      at junit.framework.TestResult$1.protect(TestResult.java:106)
-      at junit.framework.TestResult.runProtected(TestResult.java:124)
-      at junit.framework.TestResult.run(TestResult.java:109)
-      at junit.framework.TestCase.run(TestCase.java:118)
-      at junit.framework.TestSuite.runTest(TestSuite.java:208)
-      at junit.framework.TestSuite.run(TestSuite.java:203)
-      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
-      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
-      at java.lang.reflect.Method.invoke(Method.java:585)
-      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:246)
-      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:220)
-      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:203)
-      at org.codehaus.surefire.Surefire.run(Surefire.java:152)
-      at org.codehaus.surefire.Surefire.run(Surefire.java:76)
-      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
-      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
-      at java.lang.reflect.Method.invoke(Method.java:585)
-      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
-      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:241)
-      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:357)
-      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
-      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:452)
-      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
-      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
-      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
-      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
-      at org.apache.maven.cli.MavenCli.main(MavenCli.java:316)
-      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
-      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
-      at java.lang.reflect.Method.invoke(Method.java:585)
-      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
-      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
-      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
-      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
-    </failure>
-    <system-out>[OUT] : Getting the diameter
-    </system-out>
-    <system-err>[ERR] : Getting the Circumference
-    </system-err>
-  </testcase>
-  <testcase time="0.02" name="testProperties">
-    <error type="java.lang.ArithmeticException" message="/ by zero">java.lang.ArithmeticException: / by zero
-      at com.shape.CircleTest.testProperties(CircleTest.java:44)
-      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
-      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
-      at java.lang.reflect.Method.invoke(Method.java:585)
-      at junit.framework.TestCase.runTest(TestCase.java:154)
-      at junit.framework.TestCase.runBare(TestCase.java:127)
-      at junit.framework.TestResult$1.protect(TestResult.java:106)
-      at junit.framework.TestResult.runProtected(TestResult.java:124)
-      at junit.framework.TestResult.run(TestResult.java:109)
-      at junit.framework.TestCase.run(TestCase.java:118)
-      at junit.framework.TestSuite.runTest(TestSuite.java:208)
-      at junit.framework.TestSuite.run(TestSuite.java:203)
-      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
-      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
-      at java.lang.reflect.Method.invoke(Method.java:585)
-      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:246)
-      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:220)
-      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:203)
-      at org.codehaus.surefire.Surefire.run(Surefire.java:152)
-      at org.codehaus.surefire.Surefire.run(Surefire.java:76)
-      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
-      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
-      at java.lang.reflect.Method.invoke(Method.java:585)
-      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
-      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:241)
-      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:357)
-      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
-      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:452)
-      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
-      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
-      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
-      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
-      at org.apache.maven.cli.MavenCli.main(MavenCli.java:316)
-      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
-      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
-      at java.lang.reflect.Method.invoke(Method.java:585)
-      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
-      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
-      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
-      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
-    </error>
-    <system-out>[OUT] : Getting the diameter
-    </system-out>
-    <system-err>[ERR] : Getting the Circumference
-    </system-err>
-  </testcase>
-  <testcase time="0" name="testPI"/>
-  <testcase time="0.01" name="testCircumference"/>
-  <testcase time="0" name="testDiameter"/>
-</testsuite>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/9b7ec521/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases/plugin-config.xml
----------------------------------------------------------------------
diff --git a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases/plugin-config.xml b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases/plugin-config.xml
new file mode 100644
index 0000000..28822bb
--- /dev/null
+++ b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases/plugin-config.xml
@@ -0,0 +1,37 @@
+<!--
+  ~ 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.
+  -->
+
+<project>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-surefire-report-plugin</artifactId>
+        <configuration>
+          <outputDirectory>${basedir}/target/site/unit/basic-surefire-report-anchor-test-cases</outputDirectory>
+          <project implementation="org.apache.maven.plugins.surefire.report.stubs.SurefireRepMavenProjectStub"/>
+          <showSuccess>true</showSuccess>
+          <reportsDirectory>${basedir}/src/test/resources/unit/basic-surefire-report-anchor-test-cases/surefire-reports
+          </reportsDirectory>
+          <outputName>surefire-report</outputName>
+          <xrefLocation>${basedir}/target/site/unit/basic-surefire-report-anchor-test-cases/xref-test</xrefLocation>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/9b7ec521/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases/surefire-reports/TEST-com.shape.CircleTest.xml
----------------------------------------------------------------------
diff --git a/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases/surefire-reports/TEST-com.shape.CircleTest.xml b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases/surefire-reports/TEST-com.shape.CircleTest.xml
new file mode 100644
index 0000000..1ce1d3d
--- /dev/null
+++ b/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-anchor-test-cases/surefire-reports/TEST-com.shape.CircleTest.xml
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~ 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.
+  -->
+
+<testsuite errors="1" tests="8" time="0.201" failures="1" name="com.shape.CircleTest">
+  <properties>
+    <property value="Java(TM) 2 Runtime Environment, Standard Edition" name="java.runtime.name"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\bin" name="sun.boot.library.path"/>
+    <property value="1.5.0_04-b05" name="java.vm.version"/>
+    <property value="Sun Microsystems Inc." name="java.vm.vendor"/>
+    <property value="http://java.sun.com/" name="java.vendor.url"/>
+    <property value=";" name="path.separator"/>
+    <property value="Java HotSpot(TM) Client VM" name="java.vm.name"/>
+    <property value="sun.io" name="file.encoding.pkg"/>
+    <property value="US" name="user.country"/>
+    <property value="Service Pack 2" name="sun.os.patch.level"/>
+    <property value="Java Virtual Machine Specification" name="java.vm.specification.name"/>
+    <property value="C:\JAppsCode\mergere-maven\plugins\sample-projects\junit-report-tester" name="user.dir"/>
+    <property value="1.5.0_04-b05" name="java.runtime.version"/>
+    <property value="sun.awt.Win32GraphicsEnvironment" name="java.awt.graphicsenv"/>
+    <property value="C:\JAppsCode\mergere-maven\plugins\sample-projects\junit-report-tester" name="basedir"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\lib\endorsed" name="java.endorsed.dirs"/>
+    <property value="x86" name="os.arch"/>
+    <property value="C:\DOCUME~1\Jontri\LOCALS~1\Temp\" name="java.io.tmpdir"/>
+    <property value="
+" name="line.separator"/>
+    <property value="Sun Microsystems Inc." name="java.vm.specification.vendor"/>
+    <property value="" name="user.variant"/>
+    <property value="Windows XP" name="os.name"/>
+    <property value="C:\JApps\maven-2.0-beta-1\bin\m2.conf" name="classworlds.conf"/>
+    <property value="Cp1252" name="sun.jnu.encoding"/>
+    <property
+        value="c:\japps\jdk1.5.0_04\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\JApps\maven-2.0-beta-1\bin;C:\JApps\maven-1.0.2\bin;c:\BatchFile;C:\Program Files\cvsnt;C:\JApps\svn-1.1.4\bin;C:\JApps\ant-1.6.2\bin;"
+        name="java.library.path"/>
+    <property value="Java Platform API Specification" name="java.specification.name"/>
+    <property value="49.0" name="java.class.version"/>
+    <property value="HotSpot Client Compiler" name="sun.management.compiler"/>
+    <property value="5.1" name="os.version"/>
+    <property value="C:\Documents and Settings\Jontri" name="user.home"/>
+    <property value="Asia/Shanghai" name="user.timezone"/>
+    <property value="sun.awt.windows.WPrinterJob" name="java.awt.printerjob"/>
+    <property value="Cp1252" name="file.encoding"/>
+    <property value="1.5" name="java.specification.version"/>
+    <property value="Jontri" name="user.name"/>
+    <property value="C:\JApps\maven-2.0-beta-1\core\boot\classworlds-1.1-alpha-2.jar" name="java.class.path"/>
+    <property value="1.0" name="java.vm.specification.version"/>
+    <property value="32" name="sun.arch.data.model"/>
+    <property value="c:\japps\jdk1.5.0_04\jre" name="java.home"/>
+    <property value="Sun Microsystems Inc." name="java.specification.vendor"/>
+    <property value="en" name="user.language"/>
+    <property value="sun.awt.windows.WToolkit" name="awt.toolkit"/>
+    <property value="mixed mode, sharing" name="java.vm.info"/>
+    <property value="1.5.0_04" name="java.version"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\lib\ext" name="java.ext.dirs"/>
+    <property
+        value="c:\japps\jdk1.5.0_04\jre\lib\rt.jar;c:\japps\jdk1.5.0_04\jre\lib\i18n.jar;c:\japps\jdk1.5.0_04\jre\lib\sunrsasign.jar;c:\japps\jdk1.5.0_04\jre\lib\jsse.jar;c:\japps\jdk1.5.0_04\jre\lib\jce.jar;c:\japps\jdk1.5.0_04\jre\lib\charsets.jar;c:\japps\jdk1.5.0_04\jre\classes"
+        name="sun.boot.class.path"/>
+    <property value="Sun Microsystems Inc." name="java.vendor"/>
+    <property value="C:\JApps\maven-2.0-beta-1" name="maven.home"/>
+    <property value="C:\Documents and Settings\Jontri\.m2\repository" name="localRepository"/>
+    <property value="\" name="file.separator"/>
+    <property value="http://java.sun.com/cgi-bin/bugreport.cgi" name="java.vendor.url.bug"/>
+    <property value="little" name="sun.cpu.endian"/>
+    <property value="UnicodeLittle" name="sun.io.unicode.encoding"/>
+    <property value="windows" name="sun.desktop"/>
+    <property value="pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86" name="sun.cpu.isalist"/>
+  </properties>
+  <testcase time="0.01" name="testX"/>
+  <testcase time="0" name="testY"/>
+  <testcase time="0" name="testXY"/>
+  <testcase time="0.01" name="testRadius">
+    <failure type="junit.framework.AssertionFailedError" message="expected:&lt;20&gt; but was:&lt;10&gt;">
+      junit.framework.AssertionFailedError: expected:&lt;20&gt; but was:&lt;10&gt;
+      at junit.framework.Assert.fail(Assert.java:47)
+      at junit.framework.Assert.failNotEquals(Assert.java:282)
+      at junit.framework.Assert.assertEquals(Assert.java:64)
+      at junit.framework.Assert.assertEquals(Assert.java:201)
+      at junit.framework.Assert.assertEquals(Assert.java:207)
+      at com.shape.CircleTest.testRadius(CircleTest.java:34)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at junit.framework.TestCase.runTest(TestCase.java:154)
+      at junit.framework.TestCase.runBare(TestCase.java:127)
+      at junit.framework.TestResult$1.protect(TestResult.java:106)
+      at junit.framework.TestResult.runProtected(TestResult.java:124)
+      at junit.framework.TestResult.run(TestResult.java:109)
+      at junit.framework.TestCase.run(TestCase.java:118)
+      at junit.framework.TestSuite.runTest(TestSuite.java:208)
+      at junit.framework.TestSuite.run(TestSuite.java:203)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:246)
+      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:220)
+      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:203)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:152)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:76)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
+      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:241)
+      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:357)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:452)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
+      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
+      at org.apache.maven.cli.MavenCli.main(MavenCli.java:316)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+    </failure>
+    <system-out>[OUT] : Getting the diameter
+    </system-out>
+    <system-err>[ERR] : Getting the Circumference
+    </system-err>
+  </testcase>
+  <testcase time="0.02" name="testProperties">
+    <error type="java.lang.ArithmeticException" message="/ by zero">java.lang.ArithmeticException: / by zero
+      at com.shape.CircleTest.testProperties(CircleTest.java:44)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at junit.framework.TestCase.runTest(TestCase.java:154)
+      at junit.framework.TestCase.runBare(TestCase.java:127)
+      at junit.framework.TestResult$1.protect(TestResult.java:106)
+      at junit.framework.TestResult.runProtected(TestResult.java:124)
+      at junit.framework.TestResult.run(TestResult.java:109)
+      at junit.framework.TestCase.run(TestCase.java:118)
+      at junit.framework.TestSuite.runTest(TestSuite.java:208)
+      at junit.framework.TestSuite.run(TestSuite.java:203)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:246)
+      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:220)
+      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:203)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:152)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:76)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
+      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:241)
+      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:357)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:452)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
+      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
+      at org.apache.maven.cli.MavenCli.main(MavenCli.java:316)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+    </error>
+    <system-out>[OUT] : Getting the diameter
+    </system-out>
+    <system-err>[ERR] : Getting the Circumference
+    </system-err>
+  </testcase>
+  <testcase time="0" name="testPI"/>
+  <testcase time="0.01" name="testCircumference"/>
+  <testcase time="0" name="testDiameter"/>
+</testsuite>
\ No newline at end of file


[3/3] maven-surefire git commit: [SUREFIRE-1140] Wrapping lines in .apt for readability

Posted by ti...@apache.org.
[SUREFIRE-1140] Wrapping lines in .apt for readability


Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/a4cb7ba4
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/a4cb7ba4
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/a4cb7ba4

Branch: refs/heads/master
Commit: a4cb7ba4fc37e992369fa3de5813934e4818f33b
Parents: 9b7ec52
Author: Sean Griffin <sg...@cerner.com>
Authored: Thu May 28 10:10:19 2015 -0500
Committer: Tibor17 <ti...@lycos.com>
Committed: Sun Jun 7 14:34:30 2015 +0200

----------------------------------------------------------------------
 .../src/site/apt/examples/linking-to-tests.apt.vm             | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/a4cb7ba4/maven-surefire-report-plugin/src/site/apt/examples/linking-to-tests.apt.vm
----------------------------------------------------------------------
diff --git a/maven-surefire-report-plugin/src/site/apt/examples/linking-to-tests.apt.vm b/maven-surefire-report-plugin/src/site/apt/examples/linking-to-tests.apt.vm
index d980759..0ae77a1 100644
--- a/maven-surefire-report-plugin/src/site/apt/examples/linking-to-tests.apt.vm
+++ b/maven-surefire-report-plugin/src/site/apt/examples/linking-to-tests.apt.vm
@@ -25,7 +25,8 @@
 
 Linking to Tests
 
-  Anchors surround the names of each test suite and test case in the report so that you can remotely link to them.
+  Anchors surround the names of each test suite and test case in the report so
+  that you can remotely link to them.
 
   The format of the anchor names for test suites is as follows:
 
@@ -51,4 +52,6 @@ TC_<package>.<suiteName>.<testName>
 
   []
 
-  The anchor name for the test suite would be "org.fooFooTest" and the anchor names for the test cases would be "TC_org.foo.FooTest.testFooWithBar" and "TC_org.foo.FooTest.testFooWithBaz".
\ No newline at end of file
+  The anchor name for the test suite would be "org.fooFooTest" and the anchor
+  names for the test cases would be "TC_org.foo.FooTest.testFooWithBar" and
+  "TC_org.foo.FooTest.testFooWithBaz".
\ No newline at end of file