Fixing nexus credential issue
This commit is contained in:
parent
23c95ca652
commit
6e56753d04
1 changed files with 22 additions and 9 deletions
|
|
@ -1,5 +1,4 @@
|
|||
// Documentation: https://jreleaser.org/guide/latest/examples/maven/maven-central.html#_gradle
|
||||
// Secrets stored in ~/.jreleaser/config.toml
|
||||
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'signing'
|
||||
|
|
@ -7,10 +6,9 @@ apply plugin: 'signing'
|
|||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
//def snapshotsRepoUrl = 'http://oss.sonatype.org/content/repositories/snapshots/'
|
||||
//def releaseRepoUrl = 'http://oss.sonatype.org/service/local/staging/deploy/maven2/'
|
||||
//url = project.hasProperty('release') ? releaseRepoUrl : snapshotsRepoUrl
|
||||
url = 'http://oss.sonatype.org/service/local/staging/deploy/maven2/'
|
||||
def snapshotsRepoUrl = 'http://oss.sonatype.org/content/repositories/snapshots/'
|
||||
def releaseRepoUrl = 'http://oss.sonatype.org/service/local/staging/deploy/maven2/'
|
||||
url = project.hasProperty('release') ? releaseRepoUrl : snapshotsRepoUrl
|
||||
|
||||
if (project.hasProperty('mavenCentralUsername') && project.hasProperty('mavenCentralPassword')) {
|
||||
credentials {
|
||||
|
|
@ -23,8 +21,6 @@ publishing {
|
|||
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
groupId = 'se.koc'
|
||||
artifactId = 'zutil'
|
||||
from components.java
|
||||
|
||||
pom {
|
||||
|
|
@ -58,7 +54,8 @@ publishing {
|
|||
|
||||
signing {
|
||||
required { hasProperty("signing.secretKeyRingFile") }
|
||||
sign publishing.publications.mavenJava
|
||||
//sign publishing.publications.mavenJava
|
||||
sign configurations.archives
|
||||
}
|
||||
|
||||
// Generate version.txt
|
||||
|
|
@ -78,3 +75,19 @@ Build-time: ${java.time.LocalDateTime.now()}
|
|||
}
|
||||
|
||||
sourceSets.main.output.dir genOutputDir, builtBy: generateVersionTxt
|
||||
|
||||
// Generate additional Jars
|
||||
|
||||
task javadocJar(type: Jar) {
|
||||
classifier = 'javadoc'
|
||||
from javadoc
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
classifier = 'sources'
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives javadocJar, sourcesJar
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue