@@ -141,27 +141,14 @@ subprojects {
141141
142142 }
143143
144-
145144 // 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'
148146 publishing {
149147 publications {
150- // definining a publication called 'connector'
151148 connector(MavenPublication ) {
152- // Pick up the standard java artifacts
153149 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)
156150 pom {
157- // description = "${description}"
158- // name = "${name}"
159- // artifactId = "${project.artifact}"
160151 url = ' http://egeria.odpi.org'
161- // No additional properties for now
162- // properties = [
163- // propname: "propvalue"
164- // ]
165152 licenses {
166153 // Code
167154 license {
@@ -186,15 +173,15 @@ subprojects {
186173 developerConnection = ' scm:git:ssh://github.com/odpi/egeria/egeria-database-connectors.git'
187174 url = ' http://github.com/odpi/egeria-database-connectors/'
188175 }
189-
190176 }
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)
191178 pom. withXml {
192179 asNode(). appendNode(' name' , " ${ project.ext.name} " )
193180 asNode(). appendNode(' description' , " ${ project.description} " )
194181 }
195182 }
196-
197183 }
184+
198185 // Release versions get pushed to staging area on maven central, snapshots to snapshot repo
199186 // Secrets for credentials
200187 if (System . getenv(" CI" )) {
@@ -214,7 +201,7 @@ subprojects {
214201 }
215202 }
216203
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
218205 if (System . getenv(" CI" )) {
219206 signing {
220207 // This is the publication to sign
0 commit comments