I am trying to deploy a project to artifactory using the following build.gradle file:
apply plugin: 'groovy'
apply plugin: 'maven'
group = 'com.mygroup'
version = '1.0.0-SNAPSHOT'
repositories {
maven {
url "http://nexus.comp.com/artifactory/simple/repo"
}
mavenLocal()
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: "http://nexus.comp.com/artifactory/libs-snapshot-local") {
authentication(userName: 'admin', password: 'password')
}
}
}
}
but when I build with:
gradle clean install uploadArchives
I get:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':uploadArchives'.
> Could not publish configuration: [archives]
> Error deploying artifact 'com.mygroup:test-deploy:jar': Error deploying artifact: Failed to transfer file: http://nexus.comp.com/artifactory/libs-snapshot-local/com/mygroup/test-deploy/1.0-SNAPSHOT/test
-deploy-1.0-20121219.230734-1.jar. Return code is: 500
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':uploadArchives'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:68)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:34)
at org.gradle.api.internal.changedetection.CacheLockHandlingTaskExecuter$1.run(CacheLockHandlingTaskExecuter.java:34)
at org.gradle.internal.Factories$1.create(Factories.java:22)
Caused by: org.gradle.api.artifacts.PublishException: Could not publish configuration: [archives]
at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactPublisher.publish(ErrorHandlingArtifactPublisher.java:48)
at org.gradle.api.tasks.Upload.upload(Upload.java:64)
at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:216)
at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:122)
at org.gradle.api.internal.artifacts.ivyservice.IvyBackedArtifactPublisher.publish(IvyBackedArtifactPublisher.java:71)
at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactPublisher.publish(ErrorHandlingArtifactPublisher.java:41)
... 68 more
aused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Error deploying artifact: Failed to transfer file: http://nexus.comp.com/artifactory/libs-snapshot-local/com/mygroup/test-deploy/1.0
SNAPSHOT/test-deploy-1.0-20121219.231659-1.jar. Return code is: 500
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:121)
at org.apache.maven.artifact.ant.DeployTask.doExecute(DeployTask.java:125)
It I enter the first url:
http://nexus.comp.com/artifactory/simple/repo
into my browser I get:
HTTP ERROR 404
If I enter the other url:
http://nexus.comp.com/artifactory/libs-snapshot-local
into my browser I get to an old school html index page. Any ideas why my deploy fails - previously it worked just fine?