I would like to install a 'pom' artifact in my local repository, that contains all the dependencies declared with gradle. Here is what I got:
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 }
}
The INFO output shows:
:publishToMavenLocal
Skipping task ':publishToMavenLocal' as it has no actions.
:publishToMavenLocal UP-TO-DATE
:publishToMavenLocal (Thread[Daemon worker,5,main]) completed. Took 0.002 secs.
How can I get rid of that checking?
UPDATE:
Added a publication:
publishing {
publications {
mavenJava(MavenPublication) {
}
}
}
Now the artifact does install but the pom.xml doesn't have any dependency in it.
UPDATE2:
According to this, "Gradle makes it pretty easy to upload JAR files with signing etc. but there is no way to publish just a POM.", is that still the case?