9
9
10
10
buildscript {
11
11
repositories {
12
+
12
13
maven { url(" https://oss.sonatype.org/content/repositories/snapshots" ) }
13
14
mavenCentral()
14
15
}
@@ -98,8 +99,8 @@ subprojects {
98
99
}
99
100
// Maven Central (technically sonatype oss) requires we distribute source and javadoc
100
101
java {
101
- sourceCompatibility = " VERSION_1_8"
102
- targetCompatibility = " VERSION_1_8"
102
+ sourceCompatibility = JavaVersion . VERSION_1_8
103
+ targetCompatibility = JavaVersion . VERSION_1_8
103
104
withJavadocJar()
104
105
withSourcesJar()
105
106
}
@@ -144,53 +145,59 @@ subprojects {
144
145
// We only have a single artifact for now - this additional metadata is
145
146
// required for publishing to maven central. As above, only if we're running in a build pipeline
146
147
// Environment variables are sourced from GitHub secrets in the CI pipeline
147
- if (System . getenv(" CI" )) {
148
- publishing {
149
- publications {
150
- // definining a publication called 'connector'
151
- connector(MavenPublication ) {
152
- // Pick up the standard java artifacts
153
- 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
- pom {
157
- description = ' Postgres Connector for Egeria'
158
- url = ' http://egeria.odpi.org'
159
- // No additional properties for now
160
- // properties = [
161
- // propname: "propvalue"
162
- // ]
163
- licenses {
164
- // Code
165
- license {
166
- name = ' The Apache License, Version 2.0'
167
- url = ' http://www.apache.org/licenses/LICENSE-2.0.txt'
168
- }
169
- // Docs
170
- license {
171
- name = ' Creative Commons Attribution 4.0 International (CC BY 4.0)'
172
- url = ' https://creativecommons.org/licenses/by/4.0'
173
- }
148
+ publishing {
149
+ publications {
150
+ // definining a publication called 'connector'
151
+ connector(MavenPublication ) {
152
+ // Pick up the standard java artifacts
153
+ 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
+ pom {
157
+ // description = "${description}"
158
+ // name = "${name}"
159
+ // artifactId = "${project.artifact}"
160
+ url = ' http://egeria.odpi.org'
161
+ // No additional properties for now
162
+ // properties = [
163
+ // propname: "propvalue"
164
+ // ]
165
+ licenses {
166
+ // Code
167
+ license {
168
+ name = ' The Apache License, Version 2.0'
169
+ url = ' http://www.apache.org/licenses/LICENSE-2.0.txt'
174
170
}
175
- developers {
176
- developer {
177
- id = ' planetf1'
178
- name = ' Nigel Jones'
179
-
180
- }
171
+ // Docs
172
+ license {
173
+ name = ' Creative Commons Attribution 4.0 International (CC BY 4.0)'
174
+ url = ' https://creativecommons.org/licenses/by/4.0'
181
175
}
182
- scm {
183
- connection = ' scm:git:git://github.com/odpi/egeria-database-connectors.git'
184
- developerConnection = ' scm:git:ssh://github.com/odpi/egeria/egeria-database-connectors.git'
185
- url = ' http://github.com/odpi/egeria-database-connectors/'
176
+ }
177
+ developers {
178
+ developer {
179
+ id = ' planetf1'
180
+ name = ' Nigel Jones'
181
+
186
182
}
187
-
188
183
}
189
- }
184
+ scm {
185
+ connection = ' scm:git:git://github.com/odpi/egeria-database-connectors.git'
186
+ developerConnection = ' scm:git:ssh://github.com/odpi/egeria/egeria-database-connectors.git'
187
+ url = ' http://github.com/odpi/egeria-database-connectors/'
188
+ }
190
189
190
+ }
191
+ pom. withXml {
192
+ asNode(). appendNode(' name' , " ${ project.ext.name} " )
193
+ asNode(). appendNode(' description' , " ${ project.description} " )
194
+ }
191
195
}
192
- // Release versions get pushed to staging area on maven central, snapshots to snapshot repo
193
- // Secrets for credentials
196
+
197
+ }
198
+ // Release versions get pushed to staging area on maven central, snapshots to snapshot repo
199
+ // Secrets for credentials
200
+ if (System . getenv(" CI" )) {
194
201
repositories {
195
202
maven {
196
203
name = ' OSSRH'
@@ -205,8 +212,10 @@ subprojects {
205
212
}
206
213
}
207
214
}
215
+ }
208
216
209
- // To publish to ossrh we need to sign the artifacts
217
+ // To publish to ossrh we need to sign the artifacts
218
+ if (System . getenv(" CI" )) {
210
219
signing {
211
220
// This is the publication to sign
212
221
sign publishing. publications. connector
0 commit comments