Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.2.1, 3.3.0
-
None
-
None
Description
When you run the integration test goal against a reference project the build fails when the content of the file is not equal. However, it is logged as a warning, not an error. I'd expect it to be an error just like when the file name is not equal. This results in a failing build with an error instead.
I've tested it in both with Maven 3 and Maven 4 and both new release (3.3.0) and previous release (3.2.1) with the same results, so no regression in 3.3.0.
1. Run integration test against mismatch in content, only logs warning but build fails
➜ mvn clean verify -f repro/pom.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=warn [WARNING] Version not locked for default bindings plugins [maven-resources-plugin, maven-archetype-plugin], you should define versions in pluginManagement section of your pom.xml or parent [WARNING] Property ignoreEOLStyle was not set - files will be compared considering their EOL style! [WARNING] Property ignoreEOLStyle was not set - files will be compared considering their EOL style! [WARNING] Contents of file src/main/java/com/example/App.java are not equal [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.3.0:integration-test (default-integration-test) on project repro: [ERROR] Archetype IT 'integration-test-1' failed: Some content are not equals [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the '-e' switch [ERROR] Re-run Maven using the '-X' switch to enable verbose output [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
2. Rename a file in the reference project
➜ mv repro/src/test/resources/projects/integration-test-1/reference/src/main/java/com/example/App.java repro/src/test/resources/projects/integration-test-1/reference/src/main/java/com/example/SomeApp.java
3. Build fails with an error instead of warning
➜ mvn clean verify -f repro/pom.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=warn [WARNING] Version not locked for default bindings plugins [maven-resources-plugin, maven-archetype-plugin], you should define versions in pluginManagement section of your pom.xml or parent [ERROR] Not contained src/main/java/com/example/SomeApp.java [ERROR] Remains [src/main/java/com/example/App.java] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.3.0:integration-test (default-integration-test) on project repro: [ERROR] Archetype IT 'integration-test-1' failed: Reference and generated project differs (missing: 1, unexpected: 1) [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the '-e' switch [ERROR] Re-run Maven using the '-X' switch to enable verbose output [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Attachments
Attachments
Issue Links
- links to