@@ -141,27 +141,14 @@ subprojects {
141
141
142
142
}
143
143
144
-
145
144
// We only have a single artifact for now - this additional metadata is
146
- // required for publishing to maven central. As above, only if we're running in a build pipeline
147
- // Environment variables are sourced from GitHub secrets in the CI pipeline
145
+ // required for publishing to maven central. Only doing signing in 'CI'
148
146
publishing {
149
147
publications {
150
- // definining a publication called 'connector'
151
148
connector(MavenPublication ) {
152
- // Pick up the standard java artifacts
153
149
from components. java
154
- // by default, gradle's groupId, artifactId, version are used for the maven coordinates
155
- // but we need additional metadata to align with Egeria (more may need to be added)
156
150
pom {
157
- // description = "${description}"
158
- // name = "${name}"
159
- // artifactId = "${project.artifact}"
160
151
url = ' http://egeria.odpi.org'
161
- // No additional properties for now
162
- // properties = [
163
- // propname: "propvalue"
164
- // ]
165
152
licenses {
166
153
// Code
167
154
license {
@@ -186,15 +173,15 @@ subprojects {
186
173
developerConnection = ' scm:git:ssh://github.com/odpi/egeria/egeria-database-connectors.git'
187
174
url = ' http://github.com/odpi/egeria-database-connectors/'
188
175
}
189
-
190
176
}
177
+ // Override the project name & description for the pom based on properties set in the child build.gradle (hard to default & required for maven central)
191
178
pom. withXml {
192
179
asNode(). appendNode(' name' , " ${ project.ext.name} " )
193
180
asNode(). appendNode(' description' , " ${ project.description} " )
194
181
}
195
182
}
196
-
197
183
}
184
+
198
185
// Release versions get pushed to staging area on maven central, snapshots to snapshot repo
199
186
// Secrets for credentials
200
187
if (System . getenv(" CI" )) {
@@ -214,7 +201,7 @@ subprojects {
214
201
}
215
202
}
216
203
217
- // To publish to ossrh we need to sign the artifacts
204
+ // To publish to ossrh we need to sign the artifacts - only in CI
218
205
if (System . getenv(" CI" )) {
219
206
signing {
220
207
// This is the publication to sign
0 commit comments