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
|
// Documentation: https://jreleaser.org/guide/latest/examples/maven/maven-central.html#_gradle
|
||||||
// Secrets stored in ~/.jreleaser/config.toml
|
|
||||||
|
|
||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
apply plugin: 'signing'
|
apply plugin: 'signing'
|
||||||
|
|
@ -7,10 +6,9 @@ apply plugin: 'signing'
|
||||||
publishing {
|
publishing {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
//def snapshotsRepoUrl = 'http://oss.sonatype.org/content/repositories/snapshots/'
|
def snapshotsRepoUrl = 'http://oss.sonatype.org/content/repositories/snapshots/'
|
||||||
//def releaseRepoUrl = 'http://oss.sonatype.org/service/local/staging/deploy/maven2/'
|
def releaseRepoUrl = 'http://oss.sonatype.org/service/local/staging/deploy/maven2/'
|
||||||
//url = project.hasProperty('release') ? releaseRepoUrl : snapshotsRepoUrl
|
url = project.hasProperty('release') ? releaseRepoUrl : snapshotsRepoUrl
|
||||||
url = 'http://oss.sonatype.org/service/local/staging/deploy/maven2/'
|
|
||||||
|
|
||||||
if (project.hasProperty('mavenCentralUsername') && project.hasProperty('mavenCentralPassword')) {
|
if (project.hasProperty('mavenCentralUsername') && project.hasProperty('mavenCentralPassword')) {
|
||||||
credentials {
|
credentials {
|
||||||
|
|
@ -23,8 +21,6 @@ publishing {
|
||||||
|
|
||||||
publications {
|
publications {
|
||||||
mavenJava(MavenPublication) {
|
mavenJava(MavenPublication) {
|
||||||
groupId = 'se.koc'
|
|
||||||
artifactId = 'zutil'
|
|
||||||
from components.java
|
from components.java
|
||||||
|
|
||||||
pom {
|
pom {
|
||||||
|
|
@ -58,7 +54,8 @@ publishing {
|
||||||
|
|
||||||
signing {
|
signing {
|
||||||
required { hasProperty("signing.secretKeyRingFile") }
|
required { hasProperty("signing.secretKeyRingFile") }
|
||||||
sign publishing.publications.mavenJava
|
//sign publishing.publications.mavenJava
|
||||||
|
sign configurations.archives
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate version.txt
|
// Generate version.txt
|
||||||
|
|
@ -78,3 +75,19 @@ Build-time: ${java.time.LocalDateTime.now()}
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets.main.output.dir genOutputDir, builtBy: generateVersionTxt
|
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