Maven-publish plugin could not upload in parallel

We are using gradle from another build tool to publish artifacts to artifactory by using the maven-publish plugin.
When calling many gradle instances in parallel they seem to override each other pom/jar and tries to publish some jar/pom multiple times and some jar/pom not at all.
It only seems to happen when the groupName matches for the pom/jar.

Simple configuration to reproduce:

apply plugin: 'java'
apply plugin: 'maven-publish'

    publishing {
            publications {
                mavenJava(MavenPublication) {
                    groupId groupName
                    artifact file(artifactFilePath)
                    artifactId artifactName
                    version '001'
                }}}

Script that executes gradle in parallel 9 times with 3 different groupNames.

#!/bin/bash
TOP=3

for ((i=1; i<=$TOP; i++))
do
   for ((j=1; j<=$TOP; j++))
     do
        eval './gradlew publish -PartifactFilePath=empty.file -PgroupName=ciTest.subdir${i} -PartifactName=artifact${j}.file  -s &'
   done
done

I have tried the following flags without any luck:

-Dorg.gradle.daemon=false -Dorg.gradle.configureondemand=false -Dorg.gradle.parallel=false --project-cache-dir=/tmp/gradleCache/cache${i}${j}

One thing that helps is --recompile-scripts but that in turns makes the gradle publishing serial so I don’t know if it really fixes the issue or not.

Sample output logs for 4 parallel executions and 2 different groupNames using the bash script in my original post:
(It does not fail every time for only 4 in parallel, seems to be random/timing dependent)

fw:publishMavenJavaPublicationToAutoliv ArtifactoryRepository
Upload http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local/org/autoliv/aesl/ciTest/2/subdir1/artifact2.file/001/artifact2.file-001.file
Upload http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local/org/autoliv/aesl/ciTest/2/subdir1/artifact2.file/001/artifact2.file-001.file.sha1
Upload http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local/org/autoliv/aesl/ciTest/2/subdir1/artifact2.file/001/artifact2.file-001.file.md5
Upload http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local/org/autoliv/aesl/ciTest/2/subdir1/artifact2.file/001/artifact2.file-001.pom
Building 33% > :fw:publishMavenJavaUpload http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local/org/autoliv/aesl/ciTest/2/subdir1/artifact2.file/001/artifact2.file-001.pom.sha1
Upload http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local/org/autoliv/aesl/ciTest/2/subdir1/artifact2.file/001/artifact2.file-001.pom.md5
Upload http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local/org/autoliv/aesl/ciTest/2/subdir1/artifact2.file/maven-metadata.xml
Upload http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local/org/autoliv/aesl/ciTest/2/subdir1/artifact2.file/maven-metadata.xml.sha1
Upload http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local/org/autoliv/aesl/ciTest/2/subdir1/artifact2.file/maven-metadata.xml.md5
:fw:publish

BUILD SUCCESSFUL

Total time: 6.7 secs
:fw:generatePomFileForMavenJavaPublication
Building 33% :fw:publishMavenJavaPublicationToAutoliv ArtifacFAILEDpository

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:fw:publishMavenJavaPublicationToAutoliv ArtifactoryRepository’.
    Failed to publish publication ‘mavenJava’ to repository ‘Autoliv Artifactory’

    java.io.EOFException: input contained no data

  • Try:
    Run with --info or --debug option to get more log output.
  • Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:fw:publishMavenJavaPublicationToAutoliv ArtifactoryRepository’.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:62)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
    at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
    at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:158)
    at org.gradle.internal.Factories$1.create(Factories.java:22)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)

:fw:generatePomFileForMavenJavaPublication
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:155)
at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:36)
Building 66% > :fw:publishMavenJavaPublicationToAutoliv Artifac at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:103)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:97)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:97)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:102)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:47)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:32)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:77)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:47)
at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)
at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:170)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:33)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Caused by: org.gradle.api.artifacts.PublishException: Failed to publish publication ‘mavenJava’ to repository ‘Autoliv Artifactory’
at org.gradle.api.publish.internal.PublishOperation.run(PublishOperation.java:38)
at org.gradle.api.publish.maven.tasks.PublishToMavenRepository.doPublish(PublishToMavenRepository.java:77)
at org.gradle.api.publish.maven.tasks.PublishToMavenRepository.publish(PublishToMavenRepository.java:73)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:226)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:219)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:208)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
… 60 more
Caused by: org.gradle.api.UncheckedIOException: java.io.EOFException: input contained no data
at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:43)
at org.gradle.api.publication.maven.internal.action.AbstractMavenPublishAction.parsePom(AbstractMavenPublishAction.java:119)
at org.gradle.api.publication.maven.internal.action.AbstractMavenPublishAction.(AbstractMavenPublishAction.java:58)
at org.gradle.api.publication.maven.internal.action.MavenDeployAction.(MavenDeployAction.java:42)
at org.gradle.api.publish.maven.internal.publisher.MavenRemotePublisher$GradleWagonMavenDeployAction.(MavenRemotePublisher.java:68)
at org.gradle.api.publish.maven.internal.publisher.MavenRemotePublisher.createDeployTask(MavenRemotePublisher.java:48)
at org.gradle.api.publish.maven.internal.publisher.AbstractMavenPublisher.publish(AbstractMavenPublisher.java:45)
at org.gradle.api.publish.maven.internal.publisher.StaticLockingMavenPublisher.publish(StaticLockingMavenPublisher.java:38)
at org.gradle.api.publish.maven.internal.publisher.ValidatingMavenPublisher.publish(ValidatingMavenPublisher.java:48)
at org.gradle.api.publish.maven.tasks.PublishToMavenRepository$1.publish(PublishToMavenRepository.java:83)
at org.gradle.api.publish.internal.PublishOperation.run(PublishOperation.java:36)
… 70 more
Caused by: java.io.EOFException: input contained no data
at org.codehaus.plexus.util.xml.pull.MXParser.fillBuf(MXParser.java:3005)
at org.codehaus.plexus.util.xml.pull.MXParser.more(MXParser.java:3048)
at org.codehaus.plexus.util.xml.pull.MXParser.parseProlog(MXParser.java:1422)
at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:1407)
at org.codehaus.plexus.util.xml.pull.MXParser.next(MXParser.java:1105)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.java:4092)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.java:4021)
at org.gradle.api.publication.maven.internal.action.AbstractMavenPublishAction.parsePom(AbstractMavenPublishAction.java:117)
… 79 more

BUILD FAILED

Total time: 7.311 secs
:fw:publishMavenJavaPublicationToAutoliv ArtifactoryRepository
Upload http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local/org/autoliv/aesl/ciTest/2/subdir1/artifact1.file/001/artifact1.file-001.file
Upload http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local/org/autoliv/aesl/ciTest/2/subdir1/artifact1.file/001/artifact1.file-001.file.sha1
Upload http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local/org/autoliv/aesl/ciTest/2/subdir1/artifact1.file/001/artifact1.file-001.file.md5
Upload http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local/org/autoliv/aesl/ciTest/2/subdir1/artifact1.file/001/artifact1.file-001.pom
Upload http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local/org/autoliv/aesl/ciTest/2/subdir1/artifact1.file/001/artifact1.file-001.pom.sha1
Upload http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local/org/autoliv/aesl/ciTest/2/subdir1/artifact1.file/001/artifact1.file-001.pom.md5
Upload http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local/org/autoliv/aesl/ciTest/2/subdir1/artifact1.file/maven-metadata.xml
Upload http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local/org/autoliv/aesl/ciTest/2/subdir1/artifact1.file/maven-metadata.xml.sha1
Upload http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local/org/autoliv/aesl/ciTest/2/subdir1/artifact1.file/maven-metadata.xml.md5
:fw:publish

BUILD SUCCESSFUL

Total time: 8.39 secs
:fw:publishMavenJavaPublicationToAutoliv ArtifactoryRepository
Upload http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local/org/autoliv/aesl/ciTest/2/subdir1/artifact1.file/001/artifact1.file-001.file
Could not transfer artifact org.autoliv.aesl.ciTest.2.subdir1:artifact1.file:file:001 from/to remote (http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local): Could not write to resource ‘org/autoliv/aesl/ciTest/2/subdir1/artifact1.file/001/artifact1.file-001.file’
Upload http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local/org/autoliv/aesl/ciTest/2/subdir1/artifact1.file/001/artifact1.file-001.pom
Could not transfer artifact org.autoliv.aesl.ciTest.2.subdir1:artifact1.file:pom:001 from/to remote (http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local): Could not write to resource ‘org/autoliv/aesl/ciTest/2/subdir1/artifact1.file/001/artifact1.file-001.pom’
:fw:publishMavenJavaPublicationToAutoliv ArtifactoryRepository FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:fw:publishMavenJavaPublicationToAutoliv ArtifactoryRepository’.
    Failed to publish publication ‘mavenJava’ to repository ‘Autoliv Artifactory’

    Failed to deploy artifacts: Could not transfer artifact org.autoliv.aesl.ciTest.2.subdir1:artifact1.file:file:001 from/to remote (http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local): Could not write to resource ‘org/autoliv/aesl/ciTest/2/subdir1/artifact1.file/001/artifact1.file-001.file’

  • Try:
    Run with --info or --debug option to get more log output.
  • Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:fw:publishMavenJavaPublicationToAutoliv ArtifactoryRepository’.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:62)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
    at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
    at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:158)
    at org.gradle.internal.Factories$1.create(Factories.java:22)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:155)
    at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:36)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:103)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:97)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:97)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:102)
    at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:47)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:32)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:77)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:47)
    at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)
    at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
    at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:170)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
    at org.gradle.launcher.Main.doAction(Main.java:33)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
    at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
    Caused by: org.gradle.api.artifacts.PublishException: Failed to publish publication ‘mavenJava’ to repository ‘Autoliv Artifactory’
    at org.gradle.api.publish.internal.PublishOperation.run(PublishOperation.java:38)
    at org.gradle.api.publish.maven.tasks.PublishToMavenRepository.doPublish(PublishToMavenRepository.java:77)
    at org.gradle.api.publish.maven.tasks.PublishToMavenRepository.publish(PublishToMavenRepository.java:73)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:226)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:219)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:208)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
    … 60 more
    Caused by: org.gradle.api.GradleException: Failed to deploy artifacts: Could not transfer artifact org.autoliv.aesl.ciTest.2.subdir1:artifact1.file:file:001 from/to remote (http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local): Could not write to resource ‘org/autoliv/aesl/ciTest/2/subdir1/artifact1.file/001/artifact1.file-001.file’
    at org.gradle.api.publication.maven.internal.action.AbstractMavenPublishAction.publish(AbstractMavenPublishAction.java:87)
    at org.gradle.api.publication.maven.internal.action.MavenDeployAction.publish(MavenDeployAction.java:34)
    at org.gradle.api.publish.maven.internal.publisher.MavenRemotePublisher$GradleWagonMavenDeployAction.publish(MavenRemotePublisher.java:88)
    at org.gradle.api.publish.maven.internal.publisher.AbstractMavenPublisher.execute(AbstractMavenPublisher.java:70)
    at org.gradle.api.publish.maven.internal.publisher.AbstractMavenPublisher.publish(AbstractMavenPublisher.java:47)
    at org.gradle.api.publish.maven.internal.publisher.StaticLockingMavenPublisher.publish(StaticLockingMavenPublisher.java:38)
    at org.gradle.api.publish.maven.internal.publisher.ValidatingMavenPublisher.publish(ValidatingMavenPublisher.java:48)
    at org.gradle.api.publish.maven.tasks.PublishToMavenRepository$1.publish(PublishToMavenRepository.java:83)
    at org.gradle.api.publish.internal.PublishOperation.run(PublishOperation.java:36)
    … 70 more
    Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact org.autoliv.aesl.ciTest.2.subdir1:artifact1.file:file:001 from/to remote (http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local): Could not write to resource ‘org/autoliv/aesl/ciTest/2/subdir1/artifact1.file/001/artifact1.file-001.file’
    at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:280)
    at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:211)
    at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:443)
    at org.gradle.api.publication.maven.internal.action.MavenDeployAction.publishArtifacts(MavenDeployAction.java:75)
    at org.gradle.api.publication.maven.internal.action.AbstractMavenPublishAction.publish(AbstractMavenPublishAction.java:85)
    … 78 more
    Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact org.autoliv.aesl.ciTest.2.subdir1:artifact1.file:file:001 from/to remote (http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local): Could not write to resource ‘org/autoliv/aesl/ciTest/2/subdir1/artifact1.file/001/artifact1.file-001.file’
    at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:951)
    at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:941)
    at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:837)
    at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:467)
    at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:274)
    … 82 more
    Caused by: org.apache.maven.wagon.TransferFailedException: Could not write to resource ‘org/autoliv/aesl/ciTest/2/subdir1/artifact1.file/001/artifact1.file-001.file’
    at org.gradle.api.publication.maven.internal.wagon.RepositoryTransportDeployWagon.put(RepositoryTransportDeployWagon.java:97)
    at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:811)
    … 84 more
    Caused by: java.io.IOException: Could not PUT ‘http://aes-build.eu.autoliv.int:9999/artifactory/libs-release-local/org/autoliv/aesl/ciTest/2/subdir1/artifact1.file/001/artifact1.file-001.file’. Received status code 401 from server: Unauthorized
    at org.gradle.internal.resource.transport.http.HttpResourceUploader.upload(HttpResourceUploader.java:44)
    at org.gradle.internal.resource.transfer.DefaultExternalResourceConnector.upload(DefaultExternalResourceConnector.java:58)
    at org.gradle.internal.resource.transfer.ProgressLoggingExternalResourceUploader.upload(ProgressLoggingExternalResourceUploader.java:39)
    at org.gradle.internal.resource.transport.DefaultExternalResourceRepository.put(DefaultExternalResourceRepository.java:73)
    at org.gradle.api.publication.maven.internal.wagon.RepositoryTransportWagonAdapter.putRemoteFile(RepositoryTransportWagonAdapter.java:54)
    at org.gradle.api.publication.maven.internal.wagon.RepositoryTransportDeployWagon.put(RepositoryTransportDeployWagon.java:94)
    … 85 more

BUILD FAILED

Total time: 8.611 secs