[ 
https://issues.apache.org/jira/browse/MDEP-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15086206#comment-15086206
 ] 

David Hoffer commented on MDEP-442:
-----------------------------------

Is there an ETA on this fix?  I think this might be the reason we have seen 
similar errors both in the case of when we use the new Maven worker threads 
feature (-T) (which is a must have due to excessive build times) and when 
building w/o the worker thread feature but on very fast multi-core systems with 
SS drives.  Our error messages are less clear than what was reported in this 
issue, typically 'access denied', 'file locked' or something similar. 

Also we are generally using other goals, the most common being unpack and 
unpack-dependencies but i would guess the file access code is the same.

We are generally using Maven version 3.2.5 & JDK8 on one project and 3.0.5 & 
JDK7 on another.

I'd really like to try a fix for this as quickly as possible as this issue has 
been causing quite a bit of trouble in our builds.

> Failed to access file due to locked access when using more than one Maven 
> worker thread
> ---------------------------------------------------------------------------------------
>
>                 Key: MDEP-442
>                 URL: https://issues.apache.org/jira/browse/MDEP-442
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>          Components: copy
>    Affects Versions: 2.8
>         Environment: MVN 3.0.4, JDK 1.7, Win 7 Pro SP1 64 Bit
>            Reporter: Markus Karg
>            Priority: Critical
>             Fix For: waiting-for-feedback
>
>         Attachments: maven-thread-test-update.zip, maven-thread-test.zip
>
>
> My multi-module POM contains of ten modules. Each of that modules does the 
> same: Invoke the 'copy' goal of the dependency plugin. The idea is to have 
> ten copies of the identical source, which then will end up in ten different 
> targets by getting furthere processed.
> As long as I do not use more than one Maven worker thread, everything works 
> well always. But when using -T 5 to have five worker threads, rather often 
> the reactor fails because the source file (!) is locked:
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-dependency-plugin:2.8:copy (copy) on project 
> MYARTIFACT: Unable to resolve artifact. Could not transfer artifact 
> mygroup:myartifact:dll:4.36.1-20140415.143537-37 from/to nexus 
> (http://nexus/nexus/content/groups/public): 
> C:\Users\jenkins.QUIPSY\.m2\repository\mygroup\myartifact\4.36.1-SNAPSHOT\myartifact-4.36.1-20140415.143537-37.dll
>  (The process cannot access the file, because it is in use by another process)
> {noformat}
> So it seems that the 'copy' task actually is locking the source file, which 
> is not multi-threading-compatible. Hence, either that is a bug and should get 
> fixed, or it is on purpose, then this goal has to be marked as 
> non-multithreading-able.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to