You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2018/08/17 21:45:30 UTC

[GitHub] erikhakansson opened a new pull request #49: [MNG-2802] Concurrent-safe access to local Maven repository

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:
users@infra.apache.org


With regards,
Apache Git Services