I’m learning how to use gradle. My build produces a war file. I would like to publish this to an Artifactory repository. No success so far.
I’ve tried to use uploadArchives
uploadArchives {
repositories {
mavenDeployer {
repository {
url = "http://iaa44.papyrus.com/artifactory/libs-releases-local"
authentication = [
username: "deployer",
password: "xxxx"
]
}
}
}
}
Which produces
Caused by: java.lang.NullPointerException
at org.apache.maven.artifact.ant.DeployTask.createDeploymentArtifactRepository(DeployTask.java:56)
at org.apache.maven.artifact.ant.DeployTask.getDeploymentRepository(DeployTask.java:182)
at org.apache.maven.artifact.ant.DeployTask.doExecute(DeployTask.java:115)
at org.gradle.api.publication.maven.internal.ant.CustomDeployTask.doExecute(CustomDeployTask.java:39)
And maven-publish
publishing {
publications {
mavenWeb(MavenPublication) {
from components.web
}
}
repositories {
maven {
url "http://iaa44.papyrus.com/artifactory/libs-snapshot-local"
credentials {
username "deployer"
password "xxxx"
}
}
}
}
Which produces
Failed to transfer file: http://iaa44.papyrus.com/artifactory/libs-snapshot-local/com/papyrus/pct/pct/unspecified/pct-unspecified.war. Return code is: 409
Artifactory apparently returns 409 for checksum problems.
Also, what do I have to do to replace ‘-unspecified’ with a snapshot version - is this something that Artifactory does?