[GRADLE-822] NPE when executing upload archives task Created: 15/Feb/10  Updated: 04/Jan/13  Resolved: 24/Nov/10

Status: Resolved
Project: Gradle
Affects Version/s: 0.9
Fix Version/s: 0.9-rc-1

Type: Bug
Reporter: Tomer Cohen Assignee: Hans Dockter
Resolution: Fixed Votes: 0


 Description   

StackTrace:
xecution failed for task ':uploadArchives'.
at org.gradle.api.internal.tasks.DefaultTaskExecuter.executeActions(DefaultTaskExecuter.java:64)
at org.gradle.api.internal.tasks.DefaultTaskExecuter.execute(DefaultTaskExecuter.java:42)
at org.gradle.api.internal.project.taskfactory.ExecutionShortCircuitTaskExecuter.execute(ExecutionShortCircuitTaskExecuter.java:59)
at org.gradle.api.internal.tasks.SkipTaskExecuter.doExecute(SkipTaskExecuter.java:56)
at org.gradle.api.internal.tasks.SkipTaskExecuter.execute(SkipTaskExecuter.java:35)
at org.gradle.api.internal.AbstractTask.execute(AbstractTask.java:220)
at org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTaskGraphExecuter.java:167)
at org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGraphExecuter.java:160)
at org.gradle.execution.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:78)
at org.gradle.execution.TaskNameResolvingBuildExecuter.execute(TaskNameResolvingBuildExecuter.java:161)
at org.gradle.execution.DelegatingBuildExecuter.execute(DelegatingBuildExecuter.java:54)
at org.gradle.GradleLauncher.doBuildStages(GradleLauncher.java:198)
at org.gradle.GradleLauncher.doBuild(GradleLauncher.java:133)
at org.gradle.GradleLauncher.run(GradleLauncher.java:103)
at org.gradle.launcher.Main.execute(Main.java:93)
at org.gradle.launcher.Main.main(Main.java:42)
at org.gradle.launcher.GradleMain.main(GradleMain.java:54)
Caused by: org.gradle.api.GradleException: Could not publish configurations [configuration 'archives'].
at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingIvyService.publish(ErrorHandlingIvyService.java:44)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.publish(DefaultConfiguration.java:198)
at org.gradle.api.tasks.Upload.upload(Upload.java:57)
at org.gradle.api.DefaultTask.invokeMethod(DefaultTask.groovy)
at org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:25)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$2.execute(AnnotationProcessingTaskFactory.java:129)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$2.execute(AnnotationProcessingTaskFactory.java:127)
at org.gradle.api.internal.tasks.DefaultTaskExecuter.executeActions(DefaultTaskExecuter.java:56)
... 16 common frames omitted
Caused by: java.lang.NullPointerException: null
at org.apache.maven.artifact.ant.DeployTask.createDeploymentArtifactRepository(DeployTask.java:58)
at org.apache.maven.artifact.ant.DeployTask.getDeploymentRepository(DeployTask.java:187)
at org.apache.maven.artifact.ant.DeployTask.doExecute(DeployTask.java:117)
at org.gradle.api.internal.artifacts.publish.maven.deploy.CustomDeployTask.doExecute(CustomDeployTask.java:42)
at org.apache.maven.artifact.ant.AbstractArtifactTask.execute(AbstractArtifactTask.java:721)
at org.gradle.api.internal.artifacts.publish.maven.deploy.AbstractMavenResolver.execute(AbstractMavenResolver.java:195)
at org.gradle.api.internal.artifacts.publish.maven.deploy.AbstractMavenResolver.commitPublishTransaction(AbstractMavenResolver.java:186)
at org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:263)
at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyPublisher.publish(DefaultIvyDependencyPublisher.java:54)
at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyService.publish(DefaultIvyService.java:144)
at org.gradle.api.internal.artifacts.ivyservice.ShortcircuitEmptyConfigsIvyService.publish(ShortcircuitEmptyConfigsIvyService.java:61)
at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingIvyService.publish(ErrorHandlingIvyService.java:42)

uploadArchives configuration:

uploadArchives{
repositories.mavenDeployer{
repository{
authentication(userName: USER, password: PASSWORD)
}
}
}



 Comments   
Comment by Hans Dockter [ 19/Apr/10 ]

Hi Tomer,

do you still run into this issue?

Comment by Tomer Cohen [ 19/Apr/10 ]

Hi Hans,

Nope, works great

Comment by Yong Geng [ 07/Jul/11 ]

I get the same issue on my env. I use nexus to manage my repository and use gradle to public my artifact to this repository. Then I get the same issue.

Generated at Wed Jun 30 11:39:49 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.