[ 
https://issues.apache.org/jira/browse/ARCHETYPE-680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Slawomir Jaranowski closed ARCHETYPE-680.
-----------------------------------------
    Resolution: Fixed

> Integration test should report ERROR instead of WARNING when failing
> --------------------------------------------------------------------
>
>                 Key: ARCHETYPE-680
>                 URL: https://issues.apache.org/jira/browse/ARCHETYPE-680
>             Project: Maven Archetype
>          Issue Type: Improvement
>    Affects Versions: 3.2.1, 3.3.0
>            Reporter: Giovanni van der Schelde
>            Assignee: Slawomir Jaranowski
>            Priority: Major
>             Fix For: 3.3.1
>
>         Attachments: repro.zip
>
>
> 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
> {code:java}
> ➜  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
> {code}
> 2. Rename a file in the reference project
> {code:java}
> ➜  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
> {code}
> 3. Build fails with an error instead of warning
> {code:java}
> ➜  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 {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to