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

ASF GitHub Bot commented on MNG-2802:
-------------------------------------

erikhakansson opened a new pull request #49: [MNG-2802] Concurrent-safe access 
to local Maven repository
URL: https://github.com/apache/maven-wagon/pull/49
 
 
   Made file wagon optionally lock files using an adapted version of 
LockableFileWriter from commons-io.
   
   Integration test is made by forking two separate java processes that 
attempts to lock the same file. Only the first will succeed.
   
   At first I tried using Java's FileLock, but that proved impossible on 
Windows Subsystem for Linux as that doesn't reliably support file locks, and 
after some googling I realized the native FileLocks are generally unreliable 
from Java. Instead I opted to use lockfiles using the commons-io approach.
   
   Use system property maven.wagon.file.fileLock=true to enable file lock. 
Default is off, default timeout is 300 seconds, but configurable with 
maven.wagon.file.fileLock.timeout

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Concurrent-safe access to local Maven repository
> ------------------------------------------------
>
>                 Key: MNG-2802
>                 URL: https://issues.apache.org/jira/browse/MNG-2802
>             Project: Maven
>          Issue Type: Improvement
>          Components: Artifacts and Repositories
>            Reporter: Stepan Roh
>            Assignee: John Casey
>            Priority: Major
>             Fix For: Issues to be reviewed for 3.x
>
>
> It seems that access to local Maven repository is not concurrent-safe that is 
> multiple Mavens running in parallel may damage contents of local Maven 
> repository. It would be a nice improvement, because sharing of local 
> repository will lower the need for contacting any other repository. I know 
> that Maven proxy can be used, but that adds another layer which may 
> unnecessarily stress the machine it runs on.
> *NOTE:* 
> http://takari.io/book/30-team-maven.html#concurrent-safe-local-repository is 
> a Takari Extension for Apache Maven that introduces a concurrent-safe 
> local-repository.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to