@@ -20,7 +20,7 @@ plugins {
2020 id ' org.ajoberstar.grgit' version ' 2.3.0'
2121 id ' org.ec4j.editorconfig' version ' 0.0.3'
2222 id ' org.sonarqube' version ' 2.6.2'
23- id ' io.codearte.nexus-staging' version ' 0.11 .0'
23+ id ' io.codearte.nexus-staging' version ' 0.30 .0'
2424}
2525
2626subprojects {
@@ -68,69 +68,8 @@ editorconfig {
6868 ]
6969}
7070
71- def mavenProjectDescription = { proj ->
72- { it ->
73- name = proj. mavenName ?: proj. name
74- if (proj. description) {
75- description = proj. description
76- }
77- url = ' https://github.com/metafacture/metafacture-core'
78- inceptionYear = ' 2011'
79- developers {
80- developer {
81- id = ' mgeipel'
82- name = ' Markus M. Geipel'
83- 84- url = ' https://github.com/mgeipel'
85- roles = [' architect' , ' developer' ]
86- }
87- developer {
88- id = ' cboehme'
89- name = ' Christoph Böhme'
90- 91- url = ' https://github.com/cboehme'
92- roles = [' architect' , ' developer' ]
93- }
94- }
95- organization {
96- name = ' Metafacture'
97- url = ' https://github.com/metafacture'
98- }
99- licenses {
100- license {
101- name = ' The Apache License, Version 2.0'
102- url = ' http://www.apache.org/licenses/LICENSE-2.0.txt'
103- }
104- }
105- mailingLists {
106- mailingList {
107- name = ' Metafacture Mailing List'
108- 109- 110- 111- archive = ' http://lists.dnb.de/pipermail/metafacture/'
112- }
113- }
114- scm {
115- connection = ' scm:git:https://github.com/metafacture/metafacture-core.git'
116- developerConnection = ' scm:git:https://github.com/metafacture/metafacture-core.git'
117- url = ' https://github.com/metafacture/metafacture-core'
118- tag = rootProject. scmInfo. tag ?: ' HEAD'
119- }
120- issueManagement {
121- system = ' Github'
122- url = ' https://github.com/metafacture/metafacture-core/issues'
123- }
124- ciManagement {
125- system = ' Github Actions'
126- url = ' https://github.com/metafacture/metafacture-core/actions'
127- }
128- }
129- }
130-
13171subprojects {
13272 apply plugin : ' signing'
133- apply plugin : ' maven'
13473 apply plugin : ' jacoco'
13574 apply plugin : ' checkstyle'
13675 apply plugin : ' maven-publish'
@@ -193,13 +132,6 @@ subprojects {
193132 }
194133 }
195134
196- signing {
197- required {
198- scmInfo. isRelease() && gradle. taskGraph. hasTask(tasks. uploadArchives)
199- }
200- sign configurations. archives
201- }
202-
203135 repositories {
204136 mavenLocal()
205137 mavenCentral()
@@ -209,18 +141,74 @@ subprojects {
209141 publications {
210142 mavenArtifacts(MavenPublication ) {
211143 from components. java
144+
212145 afterEvaluate {
213- pom mavenProjectDescription(project)
214146 groupId = project. group
215147 artifactId = project. name
148+
149+ pom {
150+ name = project. mavenName ?: project. name
151+ description = project. description ?: project. name
152+ url = ' https://github.com/metafacture/metafacture-core'
153+ inceptionYear = ' 2011'
154+ developers {
155+ developer {
156+ id = ' mgeipel'
157+ name = ' Markus M. Geipel'
158+ 159+ url = ' https://github.com/mgeipel'
160+ roles = [' architect' , ' developer' ]
161+ }
162+ developer {
163+ id = ' cboehme'
164+ name = ' Christoph Böhme'
165+ 166+ url = ' https://github.com/cboehme'
167+ roles = [' architect' , ' developer' ]
168+ }
169+ }
170+ organization {
171+ name = ' Metafacture'
172+ url = ' https://github.com/metafacture'
173+ }
174+ licenses {
175+ license {
176+ name = ' The Apache License, Version 2.0'
177+ url = ' http://www.apache.org/licenses/LICENSE-2.0.txt'
178+ }
179+ }
180+ mailingLists {
181+ mailingList {
182+ name = ' Metafacture Mailing List'
183+ 184+ 185+ 186+ archive = ' http://lists.dnb.de/pipermail/metafacture/'
187+ }
188+ }
189+ scm {
190+ connection = ' scm:git:https://github.com/metafacture/metafacture-core.git'
191+ developerConnection = ' scm:git:https://github.com/metafacture/metafacture-core.git'
192+ url = ' https://github.com/metafacture/metafacture-core'
193+ tag = rootProject. scmInfo. tag ?: ' HEAD'
194+ }
195+ issueManagement {
196+ system = ' Github'
197+ url = ' https://github.com/metafacture/metafacture-core/issues'
198+ }
199+ ciManagement {
200+ system = ' Github Actions'
201+ url = ' https://github.com/metafacture/metafacture-core/actions'
202+ }
203+ }
216204 }
217205 }
218206 }
219207 repositories {
220208 maven {
221209 name = ' localEmbedded'
222210 // run generated gradle task `./gradlew
223- // publishMavenArtifactsPublicationToLocalEmbeddedRepository `
211+ // publishAllPublicationsToLocalEmbeddedRepository `
224212 // to publish all subprojects into the same local embedded repo:
225213 url = " file://${ rootDir} /build/repo"
226214 }
@@ -232,59 +220,38 @@ subprojects {
232220 password = System . getenv(" GITHUB_TOKEN" )
233221 }
234222 }
235- }
236- }
237- }
238-
239- gradle. projectsEvaluated {
240- subprojects {
241- configurations {
242- mavenDeploySupport
243- }
244-
245- dependencies {
246- mavenDeploySupport " org.apache.maven.wagon:wagon-http:2.2"
247- }
248-
249- install {
250- repositories {
251- mavenInstaller {
252- pom. project mavenProjectDescription(project)
253- beforeDeployment {
254- MavenDeployment deployment -> signing. signPom(deployment)
223+ if (scmInfo. isRelease() && project. hasProperty(' releaseRepositoryUrl' )) {
224+ maven {
225+ url = releaseRepositoryUrl
226+ credentials {
227+ username = releaseRepositoryUser
228+ password = releaseRepositoryPassword
255229 }
256230 }
257231 }
258- }
259-
260- uploadArchives {
261- repositories {
262- mavenDeployer {
263- configuration = configurations. mavenDeploySupport
264- if (project. hasProperty(' releaseRepositoryUrl' )) {
265- repository(url : releaseRepositoryUrl) {
266- if (project. hasProperty(' releaseRepositoryUser' )) {
267- authentication(userName : releaseRepositoryUser,
268- password : releaseRepositoryPassword)
269- }
270- }
271- }
272- if (project. hasProperty(' snapshotRepositoryUrl' )) {
273- snapshotRepository(url : snapshotRepositoryUrl) {
274- if (project. hasProperty(' snapshotRepositoryUser' )) {
275- authentication(userName : snapshotRepositoryUser,
276- password : snapshotRepositoryPassword)
277- }
278- }
279- }
280- pom. project mavenProjectDescription(project)
281- beforeDeployment {
282- MavenDeployment deployment -> signing. signPom(deployment)
232+ else if (project. hasProperty(' snapshotRepositoryUrl' )) {
233+ maven {
234+ url = snapshotRepositoryUrl
235+ credentials {
236+ username = snapshotRepositoryUser
237+ password = snapshotRepositoryPassword
283238 }
284239 }
285240 }
286241 }
287242 }
243+
244+ signing {
245+ required {
246+ scmInfo. isRelease()
247+ }
248+ sign publishing. publications. mavenArtifacts
249+ }
250+
251+ task install(dependsOn : publishToMavenLocal,
252+ description : " Installs the 'archives' artifacts into the local Maven repository. [deprecated]" ) {
253+ doFirst { println " This task is deprecated; use 'publishToMavenLocal' instead." }
254+ }
288255}
289256
290257sonarqube {
0 commit comments