You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Konrad Windszus (Jira)" <ji...@apache.org> on 2024/07/19 09:59:00 UTC
[jira] [Commented] (MASFRES-71) Build fails in org.apache.maven.plugins:maven-surefire-report-plugin when running without clean
[ https://issues.apache.org/jira/browse/MASFRES-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17867269#comment-17867269 ]
Konrad Windszus commented on MASFRES-71:
----------------------------------------
The reason is that the IT resources are copied to {{target/test-classes}} with resources:3.3.1:testResources (default-testResources) and afterwards the execution of the ITs lead to generation of Java classes within {{target/test-classes}} with a name that matches the pattern for unit tests executed with surefire.
Therefore the {{maven-invoker-plugin}} uses a dedicated directory (https://maven.apache.org/plugins/maven-invoker-plugin/integration-test-mojo.html#projectsDirectory) which is not evaluated by {{maven-surefire-plugin}} nor {{maven-failsafe-plugin}}.
> Build fails in org.apache.maven.plugins:maven-surefire-report-plugin when running without clean
> -----------------------------------------------------------------------------------------------
>
> Key: MASFRES-71
> URL: https://issues.apache.org/jira/browse/MASFRES-71
> Project: Apache Maven Resource Bundles
> Issue Type: Improvement
> Components: apache-source-release-assembly-descriptor
> Reporter: Konrad Windszus
> Priority: Major
>
> When first building with {{mvn clean verify -Prun-its}} (which runs fine) and then executing {{mvn verify}} (without clean) it fails with
> {code}
> ....
> [INFO] --< org.apache.apache.resources:apache-source-release-assembly-descriptor >--
> [INFO] Building Apache Source Release Assembly Descriptor 1.6-SNAPSHOT [5/7]
> [INFO] from source-release/pom.xml
> [INFO] --------------------------------[ jar ]---------------------------------
> ...
> [INFO] --- surefire:3.2.5:test (default-test) @ apache-source-release-assembly-descriptor ---
> [INFO] Using auto detected provider org.apache.maven.surefire.junit4.JUnit4Provider
> [INFO]
> [INFO] -------------------------------------------------------
> [INFO] T E S T S
> [INFO] -------------------------------------------------------
> [ERROR] org/apache/assembly/it/AppTest (wrong name: basics/basics-child1/target/test-classes/org/apache/assembly/it/AppTest)
> ...
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.12.1:site (default-site) on project apache-source-release-assembly-descriptor: failed to get report for org.apache.maven.plugins:maven-surefire-report-plugin: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.2.5:test (default-test) on project apache-source-release-assembly-descriptor:
> [ERROR]
> [ERROR] Please refer to /Users/konradwindszus/git/maven/maven-apache-resources/source-release/target/surefire-reports for the individual test results.
> [ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
> [ERROR] There was an error in the forked process
> [ERROR] org/apache/assembly/it/AppTest (wrong name: basics/basics-child1/target/test-classes/org/apache/assembly/it/AppTest)
> [ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
> [ERROR] org/apache/assembly/it/AppTest (wrong name: basics/basics-child1/target/test-classes/org/apache/assembly/it/AppTest)
> [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:628)
> ...
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)