I am using gradle 2.10 on a multi-module gradle project.
under subProjects, I have defined the following:
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: sonatypeUsername, password: sonatypePassword);
}
pom.project {
url "http://www.apereo.org/cas"
inceptionYear 2004
issueManagement {
system "Github"
url "https://github.com/Jasig/cas/issues"
}
scm {
url 'scm:git@github.com:Jasig/cas.git'
connection 'scm:git@github.com:Jasig/cas.git'
developerConnection 'scm:git@github.com:Jasig/cas.git'
}
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
developers {
developer {
id 'leleuj'
name 'Jérôme Leleu'
}
}
contributors {
contributor {
name "Adam Rybicki"
email "arybicki@unicon.net"
}
}
mailingLists {
mailingList {
name "cas-user"
subscribe "https://groups.google.com/a/apereo.org/forum/#!forum/cas-user"
unsubscribe "https://groups.google.com/a/apereo.org/forum/#!forum/cas-user"
post "cas-user@apereo.org"
archive "https://groups.google.com/forum/#!forum/jasig-cas-user"
}
mailingList {
name "cas-dev"
subscribe "https://groups.google.com/a/apereo.org/forum/#!forum/cas-dev"
unsubscribe "https://groups.google.com/a/apereo.org/forum/#!forum/cas-dev"
post "cas-dev@apereo.org"
archive "https://groups.google.com/forum/#!forum/jasig-cas-dev"
}
mailingList {
name "cas-announce"
subscribe "https://groups.google.com/a/apereo.org/forum/#!forum/cas-announce"
unsubscribe "https://groups.google.com/a/apereo.org/forum/#!forum/cas-announce"
post "cas-announce@apereo.org"
archive "https://groups.google.com/a/apereo.org/forum/#!forum/cas-announce"
}
}
}
}
}
}
In my gradle.properties file I have also define:
signing.keyId=xxxxx
signing.password=xxxxx
signing.secretKeyRingFile=c:\\System\\.gnupg\\secring.gpg
I run the following command at in a submodule directory from the prompt:
gradle uploadArchives -DpublishReleases=true -DsonatypeUsername=xxxx -DsonatypePassword=xxx --info
Log output tells me:
Skipping task ':module-name:uploadArchives' as task onlyIf is false.
Why? How?
P.S: snapshot releases work correctly