spring-projects / spring-projects/spring-batch
Build failure in a Docker container
Open
Nobody has claimed this yet.
in: build
type: bug
- Dominant language
- Java
- Stars
- 3k
- Forks
- 2.5k
- Avg merge
- 6d 53m
- Merged PRs (30d)
- 3
Description
Trying to build the project inside a Docker container fails with the following error:
[ERROR] Failures:
[ERROR] FlatFileItemWriterTests.testOpenWithNonWritableFile:536 Should be readonly file: file [/spring-batch/spring-batch-infrastructure/target/no-such-file.foo]
[INFO]
[ERROR] Tests run: 1597, Failures: 1, Errors: 0, Skipped: 16
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Spring Batch 5.0.0-SNAPSHOT:
[INFO]
[INFO] Spring Batch ....................................... SUCCESS [04:22 min]
[INFO] Spring Batch Infrastructure ........................ FAILURE [01:18 min]
[INFO] Spring Batch Core .................................. SKIPPED
[INFO] Spring Batch Test .................................. SKIPPED
[INFO] Spring Batch Integration ........................... SKIPPED
[INFO] Spring Batch Samples ............................... SKIPPED
[INFO] Spring Batch JSR-352 TCK ........................... SKIPPED
[INFO] Spring Batch Docs .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:40 min
[INFO] Finished at: 2021-04-21T08:55:27Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project spring-batch-infrastructure: There are test failures.
[ERROR]
[ERROR] Please refer to /spring-batch/spring-batch-infrastructure/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] -> [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 full debug logging.
[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/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :spring-batch-infrastructure
Steps to reproduce the issue:
$ docker run -it maven:3-openjdk-8 bash
# git clone https://github.com/spring-projects/spring-batch.git
# cd spring-batch
# ./mvnw package
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the documented maven:3-openjdk-8 Docker command and ./mvnw package. Start with FlatFileItemWriterTests.testOpenWithNonWritableFile and its failure at line 536 in the spring-batch-infrastructure tests. Done means the test no longer fails in the container and the Maven package build completes successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java
- Domain
- build-system, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100