Skip to content

Commit 620b983

Browse files
committed
[SUREFIRE-2281] Upgrade to Doxia 2.0.0 GA Stack
This closes #794
1 parent 8bad7d1 commit 620b983

File tree

2 files changed

+3
-45
lines changed

2 files changed

+3
-45
lines changed

maven-surefire-report-plugin/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
</prerequisites>
4747

4848
<properties>
49-
<doxiaVersion>2.0.0-M12</doxiaVersion>
49+
<doxiaVersion>2.0.0</doxiaVersion>
5050
</properties>
5151

5252
<dependencies>
@@ -114,7 +114,7 @@
114114
<dependency>
115115
<groupId>org.apache.maven.reporting</groupId>
116116
<artifactId>maven-reporting-impl</artifactId>
117-
<version>4.0.0-M15</version>
117+
<version>4.0.0</version>
118118
</dependency>
119119
<dependency>
120120
<groupId>org.codehaus.plexus</groupId>

maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/AbstractSurefireReport.java

+1-43
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,18 @@
2525
import java.net.URLClassLoader;
2626
import java.text.MessageFormat;
2727
import java.util.ArrayList;
28-
import java.util.Collections;
2928
import java.util.Iterator;
3029
import java.util.List;
3130
import java.util.Locale;
3231
import java.util.MissingResourceException;
3332
import java.util.ResourceBundle;
3433

35-
import org.apache.maven.model.ReportPlugin;
36-
import org.apache.maven.model.Reporting;
3734
import org.apache.maven.plugin.surefire.log.api.ConsoleLogger;
3835
import org.apache.maven.plugins.annotations.Component;
3936
import org.apache.maven.plugins.annotations.Parameter;
4037
import org.apache.maven.project.MavenProject;
4138
import org.apache.maven.reporting.AbstractMavenReport;
4239
import org.apache.maven.settings.Settings;
43-
import org.apache.maven.shared.utils.PathTool;
4440
import org.codehaus.plexus.i18n.I18N;
4541
import org.codehaus.plexus.interpolation.EnvarBasedValueSource;
4642
import org.codehaus.plexus.interpolation.InterpolationException;
@@ -154,7 +150,7 @@ public void executeReport(Locale locale) {
154150
locale,
155151
getConsoleLogger(),
156152
getReportsDirectories(),
157-
constructXrefTestLocation(),
153+
linkXRef ? constructXrefLocation(xrefTestLocation, true) : null,
158154
showSuccess);
159155
r.render();
160156
}
@@ -256,44 +252,6 @@ private List<MavenProject> getProjectsWithoutRoot() {
256252
return result;
257253
}
258254

259-
private String constructXrefTestLocation() {
260-
String location = null;
261-
if (linkXRef) {
262-
File xrefTestLocation = getXrefTestLocation();
263-
264-
String relativePath = PathTool.getRelativePath(
265-
getReportOutputDirectory().getAbsolutePath(), xrefTestLocation.getAbsolutePath());
266-
if (relativePath == null || relativePath.isEmpty()) {
267-
relativePath = ".";
268-
}
269-
relativePath = relativePath + "/" + xrefTestLocation.getName();
270-
if (xrefTestLocation.exists()) {
271-
// XRef was already generated by manual execution of a lifecycle binding
272-
location = relativePath;
273-
} else {
274-
// Not yet generated - check if the report is on its way
275-
Reporting reporting = project.getModel().getReporting();
276-
List<ReportPlugin> reportPlugins =
277-
reporting != null ? reporting.getPlugins() : Collections.<ReportPlugin>emptyList();
278-
for (ReportPlugin plugin : reportPlugins) {
279-
String artifactId = plugin.getArtifactId();
280-
if ("maven-jxr-plugin".equals(artifactId)) {
281-
location = relativePath;
282-
}
283-
}
284-
}
285-
286-
if (location == null) {
287-
getConsoleLogger().warning("Unable to locate Test Source XRef to link to - DISABLED");
288-
}
289-
}
290-
return location;
291-
}
292-
293-
private File getXrefTestLocation() {
294-
return xrefTestLocation != null ? xrefTestLocation : new File(getReportOutputDirectory(), "xref-test");
295-
}
296-
297255
/**
298256
* @param locale The locale
299257
* @param key The key to search for

0 commit comments

Comments
 (0)