Gradle Artifactory插件不生成Pom文件

agr*_*ner 10 java artifactory gradle maven

当我尝试将"artifactoryPublish"发送到远程工件库时,会出现一个奇怪的问题.

我有任务运行

./gradlew clean jar artifactoryPublish
Run Code Online (Sandbox Code Playgroud)

这只在几天前有效.现在我收到此错误:

: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.
Run Code Online (Sandbox Code Playgroud)

我究竟做错了什么?

Viv*_*eja 20

我遇到了类似的问题,我已经优化了gradle.properties以进行快速编译.

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
Run Code Online (Sandbox Code Playgroud)

删除它们并编译代码工作,您可以在生成pom后将它们添加回来.

最有可能"parallel = true"是罪魁祸首.

希望能帮助到你!

  • 圣洁的moly这很有帮助!对我来说,我需要禁用`configureondemand`. (11认同)

JBa*_*uch 2

问题中的 Gradle 构建片段可能有用,但如果我必须盲目猜测,我敢打赌您没有应用maven插件maven-publish(或者您应用了错误的插件)。