------ Source Code Cross Reference ------ Allan Ramirez ------ July 2006 ------ ~~ 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 Source Code Cross Reference There are times when we need to know right away the line number of the source code that caused the failure of the test. The Surefire Report Plugin has the capability to cross reference the source code that made the test failed. To be able to activate it, the <<>> should also be declared in the \ section of the POM along with the <<>>. For more details, please read the documentation of the {{{http://maven.apache.org/plugins/maven-jxr-plugin/}Maven JXR Plugin}}. +----+ [...] org.apache.maven.plugins maven-surefire-report-plugin ${project.version} org.apache.maven.plugins maven-jxr-plugin 2.1 [...] +----+ After executing <<>> for site generation, You'll notice that from the <> section of the report, the link is available to redirect you to the source code that caused the failure. From the figure below the code that caused the failure is [../images/failure-details.PNG] Failure Details The link will redirect you to the source by clicking it. [../images/xref.PNG] The source * Disable the Cross Reference Link To disable the link to the source code, the <> property should be set to <>. Or another way is by not declaring the <<>> to the \ section.