我想安装一个' pom'我的本地存储库中的工件,包含使用gradle声明的所有依赖项。这是我得到的:
apply plugin: 'base'
apply plugin: 'maven-publish'
dependencies {
(...)
}
group = 'org.test'
version = '1.0-SNAPSHOT'
publishing {
repositories {
maven {
url "http://maven/nexus/content/groups/public"
}
}
}
publishToMavenLocal {
outputs.upToDateWhen { false }
}
INFO输出显示:
:publishToMavenLocal
Skipping task ':publishToMavenLocal' as it has no actions.
:publishToMavenLocal UP-TO-DATE
:publishToMavenLocal (Thread[Daemon worker,5,main]) completed. Took 0.002 secs.
如何摆脱这种检查?
更新:
添加了一个出版物:
publishing {
publications {
mavenJava(MavenPublication) {
}
}
}
现在工件已安装,但pom.xml没有任何依赖。
UPDATE2:
根据this," Gradle可以很容易地通过签名等上传JAR文件,但是没有办法只发布一个POM。",是不是仍然如此?