Maven Dependency Plugin 3.4.0 fails with "Text file busy" when unpacking Linux ZIP dependencies
I recently upgraded the Maven Dependency Plugin from 3.3.0 to 3.4.0, and now my build fails during the unpack phase with the following error:
Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.4.0:unpack (unpack-dependencies) on project my-project: Error unpacking file: Text file busy
Observations:
- The error occurs when multiple threads or builds try to access the same file concurrently.
- The goal is executed during the generate-test-resources phase, and the unpacked files are used immediately in later phases.
- Downgrading back to 3.3.0 resolves the issue.
Question:
- Has anyone encountered this "Text file busy" issue with Maven Dependency Plugin 3.4.0?
- Is there a known workaround for safely unpacking dependencies in parallel builds without hitting this error?
Example Configuration:
org.apache.maven.plugins
maven-dependency-plugin
3.4.0
unpack-dependencies
generate-test-resources
unpack
com.example
my-artifact
1.0.0
linux
zip
${project.build.directory}/libs