mirror of https://github.com/apache/maven.git
IT fix: Drop ancient reporting, use latest (#1887)
Attempt to stop ITs pulling in ancient (and vulnerable) deps.
This commit is contained in:
parent
457bb8e000
commit
37b8a62bd5
|
@ -51,29 +51,12 @@ under the License.
|
|||
<dependency>
|
||||
<groupId>org.apache.maven.reporting</groupId>
|
||||
<artifactId>maven-reporting-api</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>doxia</groupId>
|
||||
<artifactId>doxia-sink-api</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.doxia</groupId>
|
||||
<artifactId>doxia-sink-api</artifactId>
|
||||
<version>1.0</version>
|
||||
<version>4.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.reporting</groupId>
|
||||
<artifactId>maven-reporting-exec</artifactId>
|
||||
<version>1.6.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
<version>2.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -33,6 +33,7 @@ import org.apache.maven.plugins.annotations.LifecyclePhase;
|
|||
import org.apache.maven.plugins.annotations.Mojo;
|
||||
import org.apache.maven.plugins.annotations.Parameter;
|
||||
import org.apache.maven.reporting.MavenReport;
|
||||
import org.apache.maven.reporting.MavenReportException;
|
||||
|
||||
/**
|
||||
* Generates the available/configured reports.
|
||||
|
@ -88,19 +89,23 @@ public class GenerateMojo extends AbstractMojo {
|
|||
for (Object report1 : reports) {
|
||||
MavenReport report = (MavenReport) report1;
|
||||
|
||||
if (report.canGenerateReport()) {
|
||||
getLog().info("[MAVEN-CORE-IT-LOG] Generating report " + report);
|
||||
try {
|
||||
report.setReportOutputDirectory(outputDirectory);
|
||||
report.generate(sink, locale);
|
||||
} catch (Throwable e) {
|
||||
getLog().warn("[MAVEN-CORE-IT-LOG] " + e, e);
|
||||
if (!ignoreErrors) {
|
||||
throw new MojoExecutionException("Failed to generate report " + report, e);
|
||||
try {
|
||||
if (report.canGenerateReport()) {
|
||||
getLog().info("[MAVEN-CORE-IT-LOG] Generating report " + report);
|
||||
try {
|
||||
report.setReportOutputDirectory(outputDirectory);
|
||||
report.generate(sink, locale);
|
||||
} catch (Throwable e) {
|
||||
getLog().warn("[MAVEN-CORE-IT-LOG] " + e, e);
|
||||
if (!ignoreErrors) {
|
||||
throw new MojoExecutionException("Failed to generate report " + report, e);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
getLog().info("[MAVEN-CORE-IT-LOG] Skipping report " + report);
|
||||
}
|
||||
} else {
|
||||
getLog().info("[MAVEN-CORE-IT-LOG] Skipping report " + report);
|
||||
} catch (MavenReportException e) {
|
||||
getLog().info("[MAVEN-CORE-IT-LOG] Failing report " + report);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue