Return-Path: X-Original-To: apmail-maven-issues-archive@minotaur.apache.org Delivered-To: apmail-maven-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3424B17B52 for ; Thu, 26 Mar 2015 14:11:18 +0000 (UTC) Received: (qmail 6826 invoked by uid 500); 26 Mar 2015 14:11:18 -0000 Delivered-To: apmail-maven-issues-archive@maven.apache.org Received: (qmail 6781 invoked by uid 500); 26 Mar 2015 14:11:18 -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 6765 invoked by uid 99); 26 Mar 2015 14:11:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Mar 2015 14:11:17 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [199.193.192.100] (HELO codehaus01.managed.contegix.com) (199.193.192.100) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Mar 2015 14:10:53 +0000 Received: from codehaus01 (localhost.localdomain [127.0.0.1]) by codehaus01.managed.contegix.com (Postfix) with ESMTP id E9A64B115B for ; Thu, 26 Mar 2015 09:10:20 -0500 (CDT) Date: Thu, 26 Mar 2015 09:10:20 -0500 (CDT) From: "Jason van Zyl (JIRA)" To: issues@maven.apache.org Message-ID: In-Reply-To: References: Subject: [jira] (MNG-5315) Artifact resolution sporadically fails in parallel builds MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 22cf62d5d84cf5bea94eb3b65e0ebd09 X-Virus-Checked: Checked by ClamAV on apache.org [ https://jira.codehaus.org/browse/MNG-5315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=365716#comment-365716 ] Jason van Zyl commented on MNG-5315: ------------------------------------ If you are on a reasonably newer version of Maven you can try: http://takari.io/book/30-team-maven.html#concurrent-safe-local-repository Or you can now use it as a core extension with Maven 3.3.1: http://takari.io/2015/03/19/core-extensions.html > Artifact resolution sporadically fails in parallel builds > --------------------------------------------------------- > > Key: MNG-5315 > URL: https://jira.codehaus.org/browse/MNG-5315 > Project: Maven > Issue Type: Bug > Components: Artifacts and Repositories > Affects Versions: 3.0.4 > Reporter: Ivan S. Dubrov > Assignee: Jason van Zyl > Priority: Minor > Fix For: Issues to be reviewed for 4.x > > Attachments: MNG-5315-3.0.x.patch, MNG-5315-3.1.2-SNAPSHOT.patch > > > Artifact resolution can fail during the parallel build if it was downloaded during the same session. > Scenario: > 1) Delete the whole Maven local repository. > 2) Run build "mvn compile -T1.5C" > 3) Build fails (see log extracts below) > 4) If I run build again, it succeeds. > It seems like the problem is due to two thread trying to resolve same artifact concurrently. This problem never happens once I have all dependencies cached in the local repository. > Extracts from the log output: > {noformat}Downloading: http://nexus/content/repositories/thirdparty/com/googlecode/guava-osgi/guava-osgi/11.0.0/guava-osgi-11.0.0.jar 12444/13937 KB ... > ... > [DEBUG] Skipped remote update check for commons-cli:commons-cli:jar:1.2, already updated during this session. > [DEBUG] Skipped remote update check for com.googlecode.guava-osgi:guava-osgi:jar:11.0.0, already updated during this session. > [DEBUG] Skipped remote update check for org.slf4j:slf4j-api:jar:1.6.4, already updated during this session. > [DEBUG] Skipped remote update check for org.slf4j:slf4j-jdk14:jar:1.6.4, already updated during this session. > ... > [ERROR] Failed to execute goal on project util: Could not resolve dependencies for project com.guidewire.pl:util:bundle:1.0-SNAPSHOT: The following artifacts could not be resolved: commons-cli:commons-cli:jar:1.2, com.googlecode.guava-osgi:guava-osgi:jar:11.0.0, org.slf4j:slf4j-api:jar:1.6.4, org.slf4j:slf4j-jdk14:jar:1.6.4: Failure to find commons-cli:commons-cli:jar:1.2 in http://nexus/content/repositories/thirdparty was cached in the local repository, resolution will not be reattempted until the update interval of gw.thirdparty has elapsed or updates are forced -> [Help 1] > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project util: Could not resolve dependencies for project com.guidewire.pl:util:bundle:1.0-SNAPSHOT: The following artifacts could not be resolved: commons-cli:commons-cli:jar:1.2, com.googlecode.guava-osgi:guava-osgi:jar:11.0.0, org.slf4j:slf4j-api:jar:1.6.4, org.slf4j:slf4j-jdk14:jar:1.6.4: Failure to find commons-cli:commons-cli:jar:1.2 in http://nexus/content/repositories/thirdparty was cached in the local repository, resolution will not be reattempted until the update interval of gw.thirdparty has elapsed or updates are forced > at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:210) > at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:117) > at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:258) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:201) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) > at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) > at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:167) > at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:163) > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > at java.util.concurrent.FutureTask.run(FutureTask.java:138) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > at java.util.concurrent.FutureTask.run(FutureTask.java:138) > at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:662) > Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project com.guidewire.pl:util:bundle:1.0-SNAPSHOT: The following artifacts could not be resolved: commons-cli:commons-cli:jar:1.2, com.googlecode.guava-osgi:guava-osgi:jar:11.0.0, org.slf4j:slf4j-api:jar:1.6.4, org.slf4j:slf4j-jdk14:jar:1.6.4: Failure to find commons-cli:commons-cli:jar:1.2 in http://nexus/content/repositories/thirdparty was cached in the local repository, resolution will not be reattempted until the update interval of gw.thirdparty has elapsed or updates are forced > at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:189) > at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:185) > ... 16 more > Caused by: org.sonatype.aether.resolution.DependencyResolutionException: The following artifacts could not be resolved: commons-cli:commons-cli:jar:1.2, com.googlecode.guava-osgi:guava-osgi:jar:11.0.0, org.slf4j:slf4j-api:jar:1.6.4, org.slf4j:slf4j-jdk14:jar:1.6.4: Failure to find commons-cli:commons-cli:jar:1.2 in http://nexus/content/repositories/thirdparty was cached in the local repository, resolution will not be reattempted until the update interval of gw.thirdparty has elapsed or updates are forced > at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:375) > at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:183) > ... 17 more > Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: commons-cli:commons-cli:jar:1.2, com.googlecode.guava-osgi:guava-osgi:jar:11.0.0, org.slf4j:slf4j-api:jar:1.6.4, org.slf4j:slf4j-jdk14:jar:1.6.4: Failure to find commons-cli:commons-cli:jar:1.2 in http://nexus/content/repositories/thirdparty was cached in the local repository, resolution will not be reattempted until the update interval of gw.thirdparty has elapsed or updates are forced > at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538) > at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216) > at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:358) > ... 18 more > Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Failure to find commons-cli:commons-cli:jar:1.2 in http://nexus/content/repositories/thirdparty was cached in the local repository, resolution will not be reattempted until the update interval of gw.thirdparty has elapsed or updates are forced > at org.sonatype.aether.impl.internal.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:230) > at org.sonatype.aether.impl.internal.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:176) > at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:427) > ... 20 more > {noformat} -- This message was sent by Atlassian JIRA (v6.1.6#6162)