You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2023/01/16 08:43:00 UTC

[jira] [Commented] (MWRAPPER-91) Concurrent execution of mvnw to download wrapper fails

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

Michael Osipov commented on MWRAPPER-91:
----------------------------------------

[~cstamas], I can't stop laughing because I knew that this Maven Wrapper will just cause work for very little benefit...

> Concurrent execution of mvnw to download wrapper fails
> ------------------------------------------------------
>
>                 Key: MWRAPPER-91
>                 URL: https://issues.apache.org/jira/browse/MWRAPPER-91
>             Project: Maven Wrapper
>          Issue Type: Bug
>          Components: Maven Wrapper Scripts
>    Affects Versions: 3.1.0
>            Reporter: Alexander Schwartz
>            Priority: Major
>
> The script will download the executable maven wrapper JAR file directly to the final file name. 
> When multiple calls do this concurrently, it happens that the first call executes the JAR file that is currently overwritten by the second parallel call. 
> This leads to error like: 
> * {{NoClassDefFoundError: org/codehaus/plexus/PlexusContainer}}
> * {{ClassNotFoundException: org.apache.maven.wrapper.MavenWrapperMain}}
> A different solution might be to first download the JAR file to a temporary file, and then use an atomic file operator like a rename one the download is complete.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)