Skip to content

Commit 5b071d8

Browse files
committed
oss.sonatype maven repo
1 parent ece1bcb commit 5b071d8

File tree

2 files changed

+116
-30
lines changed

2 files changed

+116
-30
lines changed

api/build.gradle

+52-10
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ plugins {
22
id 'java'
33
id "com.diffplug.gradle.spotless" version "4.4.0"
44
id "maven-publish"
5+
id "signing"
56
id "jacoco"
67
}
78

89
group 'org.fairdatapipeline'
9-
version '0.0.2'
10+
version '1.0.0-alpha'
1011

1112
repositories {
1213
mavenCentral()
@@ -71,19 +72,60 @@ spotless {
7172
}
7273

7374
publishing {
75+
publications {
76+
mavenJava(MavenPublication) {
77+
artifactId = 'api'
78+
from components.java
79+
versionMapping {
80+
usage('java-api') {
81+
fromResolutionOf('runtimeClasspath')
82+
}
83+
usage('java-runtime') {
84+
fromResolutionResult()
85+
}
86+
}
87+
pom {
88+
name = 'javaDataPipeline API'
89+
description = 'javaDataPipeline API'
90+
url = 'http://www.fairdatapipeline.org/'
91+
licenses {
92+
license {
93+
name = 'GNU GENERAL PUBLIC LICENSE, Version 3.0'
94+
url = 'https://www.gnu.org/licenses/gpl-3.0.html'
95+
}
96+
}
97+
organization {
98+
name = 'THE SCOTTISH COVID-19 RESPONSE CONSORTIUM'
99+
url = 'https://www.gla.ac.uk/research/az/scrc/'
100+
}
101+
developers {
102+
developer {
103+
id = 'bram'
104+
name = 'Bram Boskamp'
105+
email = 'bram@boska.mp'
106+
organization = 'Biomathematics and Statistics Scotland'
107+
organizationUrl = 'https://www.bioss.ac.uk/'
108+
}
109+
}
110+
scm {
111+
connection = 'scm:git:https://github.com/FAIRDataPipeline/javaDataPipeline.git'
112+
developerConnection = 'scm:git:https://github.com/FAIRDataPipeline/javaDataPipeline.git'
113+
url = 'https://github.com/FAIRDataPipeline/javaDataPipeline'
114+
}
115+
}
116+
}
117+
}
74118
repositories {
75119
maven {
76-
name = "GitHubPackages"
77-
url = uri("https://maven.pkg.github.com/FAIRDataPipeline/javaDataPipeline")
120+
url = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
78121
credentials {
79-
username = project.findProperty("gpr.user") ?: System.getenv("PUBLISH_USERNAME")
80-
password = project.findProperty("gpr.key") ?: System.getenv("PUBLISH_TOKEN")
122+
username ossrhUsername
123+
password ossrhPassword
81124
}
82125
}
83126
}
84-
publications {
85-
gpr(MavenPublication) {
86-
from(components.java)
87-
}
88-
}
127+
}
128+
129+
signing {
130+
sign publishing.publications.mavenJava
89131
}

dataregistry/build.gradle

+64-20
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@ plugins {
22
id 'java'
33
id "com.diffplug.gradle.spotless" version "4.4.0"
44
id "maven-publish"
5+
id "signing"
56
id "jacoco"
67
}
78

89
group 'org.fairdatapipeline'
9-
version '0.0.2'
10+
version '1.0.0-alpha'
1011

1112
java {
1213
sourceCompatibility = JavaVersion.VERSION_11
1314
targetCompatibility = JavaVersion.VERSION_11
15+
withJavadocJar()
16+
withSourcesJar()
1417
}
1518

1619
repositories {
@@ -43,24 +46,6 @@ spotless {
4346
}
4447
}
4548

46-
publishing {
47-
repositories {
48-
maven {
49-
name = "GitHubPackages"
50-
url = uri("https://maven.pkg.github.com/FAIRDataPipeline/javaDataPipeline")
51-
credentials {
52-
username = project.findProperty("gpr.user") ?: System.getenv("PUBLISH_USERNAME")
53-
password = project.findProperty("gpr.key") ?: System.getenv("PUBLISH_TOKEN")
54-
}
55-
}
56-
}
57-
publications {
58-
gpr(MavenPublication) {
59-
from(components.java)
60-
}
61-
}
62-
}
63-
6449
test {
6550
useJUnitPlatform()
6651
testLogging {
@@ -74,4 +59,63 @@ jacocoTestReport {
7459
xml.enabled true
7560
html.enabled false
7661
}
77-
}
62+
}
63+
64+
publishing {
65+
publications {
66+
mavenJava(MavenPublication) {
67+
artifactId = 'dataregistry'
68+
from components.java
69+
versionMapping {
70+
usage('java-api') {
71+
fromResolutionOf('runtimeClasspath')
72+
}
73+
usage('java-runtime') {
74+
fromResolutionResult()
75+
}
76+
}
77+
pom {
78+
name = 'javaDataPipeline Dataregistry'
79+
description = 'The library used by javaDataPipeline API to access the FAIR DataPipeline Registry'
80+
url = 'http://www.fairdatapipeline.org/'
81+
licenses {
82+
license {
83+
name = 'GNU GENERAL PUBLIC LICENSE, Version 3.0'
84+
url = 'https://www.gnu.org/licenses/gpl-3.0.html'
85+
}
86+
}
87+
organization {
88+
name = 'THE SCOTTISH COVID-19 RESPONSE CONSORTIUM'
89+
url = 'https://www.gla.ac.uk/research/az/scrc/'
90+
}
91+
developers {
92+
developer {
93+
id = 'bram'
94+
name = 'Bram Boskamp'
95+
email = 'bram@boska.mp'
96+
organization = 'Biomathematics and Statistics Scotland'
97+
organizationUrl = 'https://www.bioss.ac.uk/'
98+
}
99+
}
100+
scm {
101+
connection = 'scm:git:https://github.com/FAIRDataPipeline/javaDataPipeline.git'
102+
developerConnection = 'scm:git:https://github.com/FAIRDataPipeline/javaDataPipeline.git'
103+
url = 'https://github.com/FAIRDataPipeline/javaDataPipeline'
104+
}
105+
}
106+
}
107+
}
108+
repositories {
109+
maven {
110+
url = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
111+
credentials {
112+
username ossrhUsername
113+
password ossrhPassword
114+
}
115+
}
116+
}
117+
}
118+
119+
signing {
120+
sign publishing.publications.mavenJava
121+
}

0 commit comments

Comments
 (0)