A weird issue is occurring when I try to "artifactoryPublish" to a remote artifactory repository.
I have the task run
./gradlew clean jar artifactoryPublish
Which worked only a couple days ago. Now I am getting this error:
:artifactoryPublish FAILED
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':artifactoryPublish'.
> File '/Users/me/Programming/android/LibraryPlugin/build/poms/pom-default.xml' specified for property 'mavenDescriptor' does not exist.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
What am I doing wrong?
I was facing the similar issue, I had optimised the gradle.properties for fast compiling.
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx3072m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.parallel=true
org.gradle.configureondemand=true
Removing them once and compiling the code worked, you can add them back once the pom is generated.
Most probably "parallel=true" was the culprit.
Hope it helps!
Gradle build snippet in the question could be useful, but if I have to blindly guess, I bet that you don't have maven
or maven-publish
plugin applied (or you applied the wrong one).
We had this same issue after upgrading our Gradle version but found it was an issue with using old settings for the com.github.dcendents.android-maven plugin. To resolve the issue we removed the configure block and instead created a task to create the pom-defaults.xml file. Here's the relevant parts of our gradle file:
task writeNewPom {
pom {
project {
packaging 'aar'
name 'Some Name'
url 'http://www.example.com'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
}
}.writeTo("$buildDir/poms/pom-default.xml")
}
artifactoryPublish {
dependsOn assembleRelease
dependsOn sourcesJar
dependsOn writeNewPom
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With