From issues-return-157575-archive-asf-public=cust-asf.ponee.io@maven.apache.org Thu Dec 19 13:48:05 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id E4E6618037A for ; Thu, 19 Dec 2019 14:48:04 +0100 (CET) Received: (qmail 46724 invoked by uid 500); 19 Dec 2019 13:48:03 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 46695 invoked by uid 99); 19 Dec 2019 13:48:03 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Dec 2019 13:48:03 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 05F02E2615 for ; Thu, 19 Dec 2019 13:48:02 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 8A8D878092B for ; Thu, 19 Dec 2019 13:48:00 +0000 (UTC) Date: Thu, 19 Dec 2019 13:48:00 +0000 (UTC) From: "Elliotte Rusty Harold (Jira)" To: issues@maven.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (MDEP-442) Failed to access file due to locked access when using more than one Maven worker thread MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MDEP-442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Elliotte Rusty Harold updated MDEP-442: --------------------------------------- Description: My multi-module POM contains of ten modules. Each of those 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 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. was: 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. > 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 those 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 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 (v8.3.4#803005)