From 6070f9214dd2e5e2b312e087d49a931e65b410da Mon Sep 17 00:00:00 2001 From: Artem IG Date: Mon, 24 Oct 2022 01:13:13 +0300 Subject: [PATCH] !!master --- README.md | 18 +++++++++--------- src/main/kotlin/maven/PomParsing.kt | 12 ++++++++++++ 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e53ecd2..3c5786b 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,6 @@ the [Signing](https://docs.gradle.org/current/userguide/signing_plugin.html) and
Why not publish with plugins? - - Building locally - Publishing somewhere @@ -267,19 +266,20 @@ myrootproject/
- - # Publishing
Keep in mind -When publishing, the servers may not return meaningful error responses. They -often return a generic "500 Internal Server Error" code, or accept the file, but -never publish it as a maven package. +When publishing, the servers may not return meaningful error responses. + +They often return a generic "500 Internal Server Error" code, spontaneous +"403 Forbidden" or accept the file, but never publish it as a maven package. + +If publishing a package fails for any reason, sometimes this can be fixed by: -If publishing a package fails for any reason, the problem may be in the meta -data. Something does not match with something: package name, authors, -signatures. +* retrying +* retrying later +* editing your package's metadata
diff --git a/src/main/kotlin/maven/PomParsing.kt b/src/main/kotlin/maven/PomParsing.kt index bed220d..77bdcfe 100644 --- a/src/main/kotlin/maven/PomParsing.kt +++ b/src/main/kotlin/maven/PomParsing.kt @@ -83,6 +83,18 @@ data class PomXml(val xml: String) { .firstOrNull()?.text()?.toInt() }) ?: 8 +// fun mavenCompilerTarget(): Int = mavenCompiler("maven.compiler.target") +// +// // https://www.baeldung.com/maven-java-version#compiler +// private fun mavenCompiler(tag: String): Int = +// rethrowingState( +// {"POM error: $tag"}, +// { +// projectElement.selectXpath("properties/$tag") +// .firstOrNull()?.text()?.toInt() }) +// ?: 6 + + fun group() = Group(required("project > groupId")) fun version() = Version(required("project > version"))