Cannot deploy to artifactory

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 ""
  uploadArchives {
  repositories {
    mavenDeployer {
      repository(url: "") {
        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:
-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(
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(
        at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(
        at org.gradle.api.internal.changedetection.CacheLockHandlingTaskExecuter$
        at org.gradle.internal.Factories$1.create(
  Caused by: org.gradle.api.artifacts.PublishException: Could not publish configuration: [archives]
        at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactPublisher.publish(
        at org.gradle.api.tasks.Upload.upload(
        at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(
        at org.gradle.api.internal.BeanDynamicObject.invokeMethod(
         at org.gradle.api.internal.artifacts.ivyservice.IvyBackedArtifactPublisher.publish(
       at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactPublisher.publish(
       ... 68 more
aused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Error deploying artifact: Failed to transfer file:
SNAPSHOT/test-deploy-1.0-20121219.231659-1.jar. Return code is: 500
       at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(
       at org.apache.maven.artifact.ant.DeployTask.doExecute(

It I enter the first url:

into my browser I get:


If I enter the other url:

into my browser I get to an old school html index page. Any ideas why my deploy fails - previously it worked just fine?

500 is an internal server error. I recommend to check the Nexus logs.

Yes I did try to check the artifactory logs from its webinterface but the last entries are from 5 days ago, it stores no record of the deploys I try to make.

Then maybe it has run out of disk space or something. 500 is a problem on the server side, so I’d look there. Of course it can’t hurt to check the Gradle debug log as well.

I have the same problem when I try to deploy using maven so its not a gradle problem and hence a bit off-topic I guess :slight_smile: The machine running artifactory has around 3G left not much but should be enough.

I am a bit puzzled that no logfiles are “generated/written to” located in:


I have also tried to manually upload a jar file and that does not work either, and no changes in the log.

A service artifactory restart solved the problem.