apache / apache/maven-surefire

[SUREFIRE-2091] Surefire ITs require install: verify should be sufficient

Open
#3,133 1 comment 0 reactions 0 assignees View on GitHub
priority:major
Dominant language
Java
Stars
461
Forks
588
Avg merge
1d 8h
Merged PRs (30d)
19

Description

**[Hervé Boutemy](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=hboutemy)** opened **[SUREFIRE-2091](https://issues.apache.org/jira/browse/SUREFIRE-2091?redirect=false)** and commented

found during 3.0.0-M7 vote, when rebuilding
then tested with 3.0.0-M8-SNAPSHOT before doing any install:

```
$ mvn -Prun-its clean verify
...
[INFO] --- maven-invoker-plugin:3.2.2:run (integration-test) @ maven-failsafe-plugin ---
[INFO] Building: jetty-war-test-passing/pom.xml
[INFO] run post-build script verify.bsh
[INFO] The post-build script returned false.
[INFO] jetty-war-test-passing/pom.xml ................... FAILED (5.0 s)
[INFO] Building: multiple-summaries-failing/pom.xml
[INFO] multiple-summaries-failing/pom.xml ............... SUCCESS (1.9 s)
[INFO] Building: jetty-war-test-failing/pom.xml
[INFO] run post-build script verify.bsh
[INFO] The post-build script returned false.
[INFO] jetty-war-test-failing/pom.xml ................... FAILED (5.0 s)
[INFO] Building: working-directory/pom.xml
[INFO] The build exited with code 1. See /home/herve/projets/maven/sources/plugins/core/surefire/maven-failsafe-plugin/target/it/working-directory/build.log for details.
[INFO] working-directory/pom.xml ........................ FAILED (2.0 s)
[INFO] Building: multiple-summaries/pom.xml
[INFO] The build exited with code 1. See /home/herve/projets/maven/sources/plugins/core/surefire/maven-failsafe-plugin/target/it/multiple-summaries/build.log for details.
[INFO] multiple-summaries/pom.xml ....................... FAILED (2.0 s)
[INFO] -------------------------------------------------
[INFO] Build Summary:
[INFO] Passed: 1, Failed: 4, Errors: 0, Skipped: 0
[INFO] -------------------------------------------------
[ERROR] The following builds failed:
[ERROR] * jetty-war-test-passing/pom.xml
[ERROR] * jetty-war-test-failing/pom.xml
[ERROR] * working-directory/pom.xml
[ERROR] * multiple-summaries/pom.xml
[INFO] -------------------------------------------------
...
Caused by: org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException: Missing:
----------
1) org.apache.maven.surefire:surefire-junit3:jar:3.0.0-M8-SNAPSHOT

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.apache.maven.surefire -DartifactId=surefire-junit3 -Dversion=3.0.0-M8-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.apache.maven.surefire -DartifactId=surefire-junit3 -Dversion=3.0.0-M8-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

----------
1 required artifact is missing.

for artifact:
org.apache.maven.surefire:surefire-junit3:jar:3.0.0-M8-SNAPSHOT

from the specified remote repositories:
central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)
```

---

**Affects:** 3.0.0-M7

**Issue Links:**
- [SUREFIRE-1956](https://issues.apache.org/jira/browse/SUREFIRE-1956) Project should pass built without installing artifacts
(_**"duplicates"**_)

**Remote Links:**
- [GitHub Pull Request #543
](https://github.com/apache/maven-surefire/pull/543)

1 votes, 3 watchers

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the linked pull request #543 and reproduce the failure with `mvn -Prun-its clean verify` in the maven-failsafe-plugin integration tests. Inspect the `target/it` build logs, especially the missing surefire-junit3 artifact, and confirm that the integration tests pass from a clean checkout without running install.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.