-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Execution failed for task ':closeRepository'. #217
Comments
Are you sure, you have the credentials configured properly? Have you tried to re-run it with
If no, you can - temporarily - put your username and password/key directly in the build.gradle to check if it helps (just locally, do NOT commit it to GitHub!). |
You print some properties, but the |
you mean just sent you an example of my build.gradle?
…On Sun, Aug 7, 2022 at 2:04 PM Marcin Zajączkowski ***@***.***> wrote:
You print some properties, but the closeRepository task doesn't print
them on its own, so they might not be properly set in the plugin. Please
paste the way how you configure gradle-nexus-staging-plugin, especially
credentials.
—
Reply to this email directly, view it on GitHub
<#217 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXMRFEO2JLWE6XZY75SNOWLVYAQE5ANCNFSM53IFXRLQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
here is my build.gradle
/*
* *
* * Created by SOFTKNIFE on 7/1/20
* * Copyright SOFTKNIFE (c) 2021 . All rights reserved.
* * Last modified 6/5/21 6:50 PM
*
*/
plugins {
// Apply the java-library plugin to add support for Java Library
id 'java-library'
id 'idea'
id "com.adarshr.test-logger" version "2.1.0"
id 'signing'
id 'maven-publish'
id 'io.codearte.nexus-staging' version '0.30.0'
id "io.freefair.lombok" version "5.0.0-rc4"
id "io.github.gradle-nexus.publish-plugin" version "1.0.0"
}
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
//TODO jcenter will be sunset soon - find another option
jcenter()
mavenCentral()
}
compileJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
group = 'com.softknife'
description = 'Quality, Release and Automation support'
version = '0.0.1'
dependencies {
api 'com.squareup.okhttp3:okhttp:5.0.0-alpha.2'
implementation 'com.squareup.okhttp3:mockwebserver:5.0.0-alpha.2'
implementation 'org.slf4j:slf4j-api:1.7.28'
implementation group: 'ch.qos.logback', name: 'logback-classic',
version: '1.2.3'
implementation group: 'org.aeonbits.owner', name: 'owner', version:
'1.0.10'//
implementation group: 'org.apache.commons', name: 'commons-exec',
version: '1.3'
implementation group: 'org.apache.commons', name: 'commons-lang3',
version: '3.11'
//json/models
implementation group: 'com.fasterxml.jackson.core', name:
'jackson-core', version: '2.11.2'
implementation group: 'com.fasterxml.jackson.core', name:
'jackson-databind', version: '2.11.2'
implementation group: 'com.jayway.jsonpath', name: 'json-path',
version: '2.4.0'
//jira
api 'io.atlassian.fugue:fugue:4.7.2'
api 'com.atlassian.jira:jira-rest-java-client-core:5.2.1'
api 'com.atlassian.jira:jira-rest-java-client-api:5.2.1'
//apache
implementation group: 'org.apache.commons', name: 'commons-text',
version: '1.8'
implementation group: 'org.apache.directory.studio', name: '
org.apache.commons.io', version: '2.4'
implementation group: 'org.apache.commons', name:
'commons-collections4', version: '4.4'
// This dependency is used internally, and not exposed to consumers on
their own compile classpath.
implementation 'com.google.guava:guava:28.0-jre'
//swagger
implementation group: 'io.swagger', name: 'swagger-core', version:
'2.0.0-rc2'
implementation group: 'io.swagger', name: 'swagger-parser', version:
'2.0.0-rc1'
//openapi
implementation group: 'io.swagger.core.v3', name: 'swagger-core',
version: '2.1.5'
implementation group: 'io.swagger.core.v3', name: 'swagger-models',
version: '2.1.5'
implementation group: 'io.swagger.parser.v3', name:
'swagger-parser-v3', version: '2.0.23'
//for creating request body
implementation group: 'io.swagger', name: 'swagger-inflector', version:
'2.0.5'
//lombok
implementation group: 'org.projectlombok', name: 'lombok', version:
'1.18.12'
//templates
implementation group: 'org.freemarker', name: 'freemarker', version:
'2.3.30'
implementation group: 'org.jtwig', name: 'jtwig-json-extension',
version: '5.86.1.RELEASE'
//mocking
implementation group: 'com.github.tomakehurst', name:
'wiremock-standalone', version: '2.27.2'
//needed for data provider
implementation group: 'org.testng', name: 'testng', version: '7.4.0'
// Use TestNG framework, also requires calling test.useTestNG() below
testImplementation group: 'org.testng', name: 'testng', version: '7.4.0'
}
configurations {
childJars
}
dependencies {
subprojects.each {
childJars project(it.path)
}
}
jar {
dependsOn configurations.childJars
from { configurations.childJars.collect { zipTree(it) } }
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
test {
// Use TestNG for unit tests
useTestNG()
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
}
}
ext.admin = hasProperty('sonatypeUsername')
println("hie")
println(hasProperty('sonatypeUsername'))
artifacts {
archives jar
archives sourcesJar
archives javadocJar
}
signing {
required { false }
sign publishing.publications
}
nexusPublishing {
//packageGroup = "com.example.mycompany.myproject" //defaults to
'project.group'
repositories {
sonatype { //or custom repository name
//stagingProfileId = "yourStagingProfileId" //can reduce
execution time by even 10 seconds
//defaults to project properties 'sonatypeUsername' and
'sonatypePassword', where 'sonatype' is name of configured repository
username = project.findProperty("sonatypeUsername")
password = project.findProperty("sonatypePassword")
}
}
clientTimeout = Duration.ofSeconds(300)
connectTimeout = Duration.ofSeconds(60)
transitionCheckOptions {
maxRetries.set(40)
delayBetween.set(java.time.Duration.ofMillis(3000))
}
}
//publishing {
// publications {
// mavenJava(MavenPublication) {
// from components.java
// customizePom(pom, rootProject)
//
// artifact sourcesJar
// artifact javadocJar
// }
// }
// repositories {
// maven {
// //url "
https://oss.sonatype.org/service/local/staging/deploy/maven2"
// url "https://s01.oss.sonatype.org/service/local/"
// if (admin) {
// credentials {
// username 'sonatypeUsername'
// password 'sonatypePassword'
// }
// }
// }
// }
//}
model {
tasks.publish {
dependsOn(project.tasks.build)
}
tasks.install {
dependsOn(project.tasks.build)
}
}
def customizePom(pom, gradleProject) {
pom.withXml {
def root = asNode()
// modify POM and add optional flag where needed
root.dependencies.'*'.findAll {
ext.artifactId = it.artifactId.text()
ext.fulldep = it.groupId.text() + ':' + it.artifactId.text() +
':' + it.version.text()
}
// add all items necessary for maven central publication
root.children().last() + {
println("Name:" + gradleProject.name)
description gradleProject.description// moduleDescription
resolveStrategy = Closure.DELEGATE_FIRST
name 'Repo Qreasp'
description gradleProject.description
url 'https://github.com/softknife2021/qreasp'
organization {
name 'Softknife'
url 'https://softknife.com'
}
issueManagement {
system 'GitHub'
url 'https://github.com/softknife2021/qreasp/issues'
}
licenses {
license {
name 'The Apache Software License, Version 2.0'
url '
https://github.com/softknife2021/qreasp/blob/master/LICENSE'
distribution 'repo'
}
}
scm {
url 'https://github.com/softknife/qreasp'
connection 'scm:git:git://
github.com/softknife2021/qreasp.git'
developerConnection 'scm:git:ssh://
***@***.***/softknife2021/qreasp.git'
}
developers {
developer {
id 'Alex'
name 'Alexander Matsaylo'
email ***@***.***'
timezone '+1'
}
}
}
}
}
testlogger {
theme 'mocha' // project level
slowThreshold 5000
}
task install(dependsOn: publishToMavenLocal) {
group = 'Publishing'
description = 'Installs artifacts to local Maven repository'
}
//
// RELEASE
//
task release() {
group 'Project'
description 'Builds everything for the release.'
dependsOn build
dependsOn javadoc
//dependsOn jacocoTestReport
}
On Mon, Oct 10, 2022 at 4:30 PM alex softknife ***@***.***>
wrote:
… you mean just sent you an example of my build.gradle?
On Sun, Aug 7, 2022 at 2:04 PM Marcin Zajączkowski <
***@***.***> wrote:
> You print some properties, but the closeRepository task doesn't print
> them on its own, so they might not be properly set in the plugin. Please
> paste the way how you configure gradle-nexus-staging-plugin, especially
> credentials.
>
> —
> Reply to this email directly, view it on GitHub
> <#217 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AXMRFEO2JLWE6XZY75SNOWLVYAQE5ANCNFSM53IFXRLQ>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
You mix two plugins doing (almost) the same. As mentioned in the README, So, remove |
Configure build.gradle and ran this command but has a failure below, what I am doing wrong?
./gradlew closeAndReleaseRepository
FAILURE: Build failed with an exception.
Execution failed for task ':closeRepository'.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 3s
1 actionable task: 1 executed
The text was updated successfully, but these errors were encountered: