[prev in list] [next in list] [prev in thread] [next in thread]
List: maven-user
Subject: Re: Maven resilience to interrupted install to local repository
From: Stanimir Stamenkov <s7an10 () netscape ! net ! INVALID>
Date: 2024-02-29 13:31:43
Message-ID: af7618a4-c7ee-406c-9008-2032911034e1 () netscape ! net
[Download RAW message or body]
Thu, 29 Feb 2024, /Tamás Cservenák/:
> am not Windows user, but we had several reports about issues, like this one:
> https://issues.apache.org/jira/browse/MRESOLVER-372
I see. Thank you for the reference.
As far as I'm aware, such "access denied" exceptions on Windows are not
specific to atomic moves. It could happen one process has opened a file
for reading, preventing another from overwriting it immediately. I
guess such updates need a retry mechanism, at least for the atomic move
part.
> On Thu, Feb 29, 2024 at 1:40 PM Stanimir Stamenkov wrote:
> > Thu, 29 Feb 2024, /Tamás Cservenák/:
> >
> > > Resolver 1.9.18 uses the temp file technique you describe:
> > > copies to (random) temp file located in the same directory where target
> > > file is, and then atomically moves the file to its place
> > > (unless OS is windows, for obvious reasons).
> >
> > Doesn't atomic file move/replace work on Windows? I'm using
> > Files.move() [1] with ATOMIC_MOVE [2] option to achieve the same
> > technique on Windows successfully.
> >
> > [1] https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/nio/file/Files.html#move(java.nio.file.Path,java.nio.file.Path,java.nio.file.CopyOption..
> >
> > .)
> > [2] https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/nio/file/StandardCopyOption.html#ATOMIC_MOVE
> >
--
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic