@@ -20,7 +20,7 @@ plugins {
20
20
id ' org.ajoberstar.grgit' version ' 2.3.0'
21
21
id ' org.ec4j.editorconfig' version ' 0.0.3'
22
22
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'
24
24
}
25
25
26
26
subprojects {
@@ -68,69 +68,8 @@ editorconfig {
68
68
]
69
69
}
70
70
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
-
131
71
subprojects {
132
72
apply plugin : ' signing'
133
- apply plugin : ' maven'
134
73
apply plugin : ' jacoco'
135
74
apply plugin : ' checkstyle'
136
75
apply plugin : ' maven-publish'
@@ -193,13 +132,6 @@ subprojects {
193
132
}
194
133
}
195
134
196
- signing {
197
- required {
198
- scmInfo. isRelease() && gradle. taskGraph. hasTask(tasks. uploadArchives)
199
- }
200
- sign configurations. archives
201
- }
202
-
203
135
repositories {
204
136
mavenLocal()
205
137
mavenCentral()
@@ -209,18 +141,74 @@ subprojects {
209
141
publications {
210
142
mavenArtifacts(MavenPublication ) {
211
143
from components. java
144
+
212
145
afterEvaluate {
213
- pom mavenProjectDescription(project)
214
146
groupId = project. group
215
147
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
+ }
216
204
}
217
205
}
218
206
}
219
207
repositories {
220
208
maven {
221
209
name = ' localEmbedded'
222
210
// run generated gradle task `./gradlew
223
- // publishMavenArtifactsPublicationToLocalEmbeddedRepository `
211
+ // publishAllPublicationsToLocalEmbeddedRepository `
224
212
// to publish all subprojects into the same local embedded repo:
225
213
url = " file://${ rootDir} /build/repo"
226
214
}
@@ -232,59 +220,38 @@ subprojects {
232
220
password = System . getenv(" GITHUB_TOKEN" )
233
221
}
234
222
}
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
255
229
}
256
230
}
257
231
}
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
283
238
}
284
239
}
285
240
}
286
241
}
287
242
}
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
+ }
288
255
}
289
256
290
257
sonarqube {
0 commit comments