Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-72077] Ignore warnings from surefire and failsafe plugins #990

Merged
merged 1 commit into from
Dec 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public abstract class AbstractMavenLogParser extends LookaheadParser {
private static final String MAVEN_PLUGIN_PREFIX = "maven-";
private static final String MAVEN_PLUGIN_SUFFIX = "-plugin";
static final String MAVEN_COMPILER_PLUGIN = MAVEN_PLUGIN_PREFIX + "compiler" + MAVEN_PLUGIN_SUFFIX;
static final String MAVEN_SUREFIRE_PLUGIN = MAVEN_PLUGIN_PREFIX + "surefire" + MAVEN_PLUGIN_SUFFIX;
static final String MAVEN_FAILSAFE_PLUGIN = MAVEN_PLUGIN_PREFIX + "failsafe" + MAVEN_PLUGIN_SUFFIX;
static final String MAVEN_JAVADOC_PLUGIN = MAVEN_PLUGIN_PREFIX + "javadoc" + MAVEN_PLUGIN_SUFFIX;
static final String MAVEN_HPI_PLUGIN = MAVEN_PLUGIN_PREFIX + "hpi" + MAVEN_PLUGIN_SUFFIX;
static final String MAVEN_ENFORCER_PLUGIN = MAVEN_PLUGIN_PREFIX + "enforcer" + MAVEN_PLUGIN_SUFFIX;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public JavacParser() {
@Override
protected boolean isLineInteresting(final String line) {
return (line.contains("[") || line.contains("w:") || line.contains("e:"))
&& !hasGoals(MAVEN_JAVADOC_PLUGIN, MAVEN_HPI_PLUGIN);
&& !hasGoals(MAVEN_JAVADOC_PLUGIN, MAVEN_HPI_PLUGIN, MAVEN_SUREFIRE_PLUGIN, MAVEN_FAILSAFE_PLUGIN);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ void issue70658RemovePrefixAndSuffixFromMavenPlugins() {
assertThat(warnings).hasSize(1);
}

@Test @org.junitpioneer.jupiter.Issue("JENKINS-72077")
void issue72077IgnoreTestWarnings() {
Report warnings = parse("issue72077.txt");

assertThat(warnings).isEmpty();
}

@Test
void issue67521IgnoreJavaDocWarnings() {
Report warnings = parse("javadoc-in-java.log");
Expand Down
60 changes: 60 additions & 0 deletions src/test/resources/edu/hm/hafner/analysis/parser/issue72077.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
[INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) @ faktorips-runtime ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 294 source files to /data/build-space/workspace/FaktorIPS_CI/runtime/faktorips-runtime/target/classes
[INFO] /data/build-space/workspace/FaktorIPS_CI/runtime/faktorips-runtime/src/main/java/org/faktorips/runtime/jaxb/IpsJAXBContext.java: Some input files use or override a deprecated API.
[INFO] /data/build-space/workspace/FaktorIPS_CI/runtime/faktorips-runtime/src/main/java/org/faktorips/runtime/jaxb/IpsJAXBContext.java: Recompile with -Xlint:deprecation for details.
[INFO] /data/build-space/workspace/FaktorIPS_CI/runtime/faktorips-runtime/src/main/java/org/faktorips/runtime/internal/xml/XmlBindingSupportHelper.java: /data/build-space/workspace/FaktorIPS_CI/runtime/faktorips-runtime/src/main/java/org/faktorips/runtime/internal/xml/XmlBindingSupportHelper.java uses or overrides a deprecated API that is marked for removal.
[INFO] /data/build-space/workspace/FaktorIPS_CI/runtime/faktorips-runtime/src/main/java/org/faktorips/runtime/internal/xml/XmlBindingSupportHelper.java: Recompile with -Xlint:removal for details.
[INFO]
[INFO] --- maven-bundle-plugin:5.1.6:manifest (generate-manifest) @ faktorips-runtime ---
[INFO] No MANIFEST.MF file found, generating manifest.
[WARNING] Manifest org.faktorips:faktorips-runtime:bundle:24.1.0-SNAPSHOT : Export-Package duplicate package name (org.faktorips.runtime.internal) that uses the default version because no version is specified (24.1.0). Remove duplicate package or add an explicit version to it.
[INFO] Writing manifest: /data/build-space/workspace/FaktorIPS_CI/runtime/faktorips-runtime/target/classes/META-INF/MANIFEST.MF
[INFO]
[INFO] --- maven-resources-plugin:3.3.1:testResources (default-testResources) @ faktorips-runtime ---
[INFO] Copying 61 resources from src/test/resources to target/test-classes
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:testCompile (default-testCompile) @ faktorips-runtime ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 132 source files to /data/build-space/workspace/FaktorIPS_CI/runtime/faktorips-runtime/target/test-classes
[INFO] /data/build-space/workspace/FaktorIPS_CI/runtime/faktorips-runtime/src/test/java/org/faktorips/runtime/jaxb/MonthAdapterTest.java: Some input files use or override a deprecated API.
[INFO] /data/build-space/workspace/FaktorIPS_CI/runtime/faktorips-runtime/src/test/java/org/faktorips/runtime/jaxb/MonthAdapterTest.java: Recompile with -Xlint:deprecation for details.
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ faktorips-runtime ---
[INFO] Toolchain in maven-surefire-plugin: JDK[/data/build-space/tools/hudson.model.JDK/JDK8/jdk8u372-b07]
[INFO] Surefire report directory: /data/build-space/workspace/FaktorIPS_CI/runtime/faktorips-runtime/target/surefire-reports
[WARNING] The system property user.language is configured twice! The property appears in <argLine/> and any of <systemPropertyVariables/>, <systemProperties/> or user property.
[WARNING] The system property user.country is configured twice! The property appears in <argLine/> and any of <systemPropertyVariables/>, <systemProperties/> or user property.
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[ERROR] Picked up JAVA_TOOL_OPTIONS: -Dmaven.ext.class.path="/data/build-space/workspace/FaktorIPS_CI@tmp/withMavenad64f306/pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="/data/build-space/workspace/FaktorIPS_CI@tmp/withMavenad64f306"
[WARNING] Tests run: 16, Failures: 0, Errors: 0, Skipped: 3, Time elapsed: 0.01 s - in org.faktorips.runtime.internal.XmlUtilTest
[WARNING] Tests run: 1209, Failures: 0, Errors: 0, Skipped: 3
[INFO]
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.8:report (report) @ faktorips-runtime ---
[INFO] Loading execution data file /data/build-space/workspace/FaktorIPS_CI/runtime/faktorips-runtime/target/jacoco.exec
[INFO] Analyzed bundle 'Faktor-IPS Runtime' with 285 classes
[INFO]
[INFO] --- maven-bundle-plugin:5.1.6:bundle (default-bundle) @ faktorips-runtime ---
[INFO] --- failsafe:3.2.2:integration-test (default) @ faktorips-runtime ---
[INFO] Toolchain in maven-surefire-plugin: JDK[/data/build-space/tools/hudson.model.JDK/JDK8/jdk8u372-b07]
[INFO] Surefire report directory: /data/build-space/workspace/FaktorIPS_CI/runtime/faktorips-runtime/target/surefire-reports
[WARNING] The system property user.language is configured twice! The property appears in <argLine/> and any of <systemPropertyVariables/>, <systemProperties/> or user property.
[WARNING] The system property user.country is configured twice! The property appears in <argLine/> and any of <systemPropertyVariables/>, <systemProperties/> or user property.
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[ERROR] Picked up JAVA_TOOL_OPTIONS: -Dmaven.ext.class.path="/data/build-space/workspace/FaktorIPS_CI@tmp/withMavenad64f306/pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="/data/build-space/workspace/FaktorIPS_CI@tmp/withMavenad64f306"
[WARNING] Tests run: 16, Failures: 0, Errors: 0, Skipped: 3, Time elapsed: 0.01 s - in org.faktorips.runtime.internal.XmlUtilTest
[WARNING] Tests run: 1209, Failures: 0, Errors: 0, Skipped: 3
[INFO]
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.8:report (report) @ faktorips-runtime ---
[INFO] Loading execution data file /data/build-space/workspace/FaktorIPS_CI/runtime/faktorips-runtime/target/jacoco.exec
[INFO] Analyzed bundle 'Faktor-IPS Runtime' with 285 classes
[INFO]
[INFO] --- maven-bundle-plugin:5.1.6:bundle (default-bundle) @ faktorips-runtime ---