Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
-
windows, maven 3.9.4
Description
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) on project foo.bar: Execution default-install of goal org.apache.maven.plugins:maven-install-plugin:3.1.1:install failed: Could not acquire lock(s) -> [Help 1]
I am using maven 3.9.4 on windows:
$ mvn -v Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9) Maven home: D:\projects\test\software\mvn Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: D:\projects\test\software\java Default locale: en_US, platform encoding: UTF-8 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
I searched for this bug and found issues like MRESOLVER-332 that first look identical or similar but do not really seem to be related so I decided to create this issue.
For this bug I made the following observations:
- it only happens with concurrent builds: mvn -T ...
- is seems to be windows related (at least mainly happens on windows)
- it is in-deterministic and is not so easy to create an isolated and simple project and a reproducible scenario that always results in this error. However, I get this very often in my current project with many modules (500+).
- it is not specific to the maven-install-plugin and also happens from other spots in maven:
I also got this stacktrace:
Suppressed: java.lang.IllegalStateException: Attempt 1: Could not acquire write lock for 'C:\Users\hohwille\.m2\repository\.locks\artifact~com.caucho~com.springsource.com.caucho~3.2.1.lock' in 30 SECONDS at org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire (NamedLockFactoryAdapter.java:202) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:271) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:259) at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies (DefaultRepositorySystem.java:352)
See also this related discussion:
https://github.com/apache/maven-mvnd/issues/836#issuecomment-1702488377
Attachments
Attachments
Issue Links
- is related to
-
MNG-7705 Sporadic failures on multiple builds sharing the same local repo when writing the .lastUpdated file
- Closed