hallvard
11/20/2019, 7:45 PMmaven-publish
plugin, I do this, which works well for me:
publishing {
publications {
maven(MavenPublication) {
pom {
name = 'projectname'
description = 'Whatever ...'
}
artifactId project.name
groupId project.group
version project.version
// Without the following line, these gradle build scripts publish no jar to maven
// We have not succeeded in finding out why (as of May 2019)
from components.java
}
}
repositories {
maven {
def releasesRepoUrl = "(url here)"
def snapshotsRepoUrl = "(url here)"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username mavenUser
password mavenPassword
}
}
}
}
JoakimForslund
11/20/2019, 7:47 PM