Skip to content

Commit 78de417

Browse files
committed
switch release to maven central
1 parent bd021b7 commit 78de417

File tree

4 files changed

+110
-103
lines changed

4 files changed

+110
-103
lines changed

build.sbt

Lines changed: 5 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import sbtassembly.MergeStrategy
1+
import Dependencies.*
22
import M2Resolvers.m2Resolvers
3-
import Dependencies._
3+
import sbtassembly.MergeStrategy
44

55
name := getPackageName(is_silicon, is_gpu, is_aarch64)
66

@@ -34,100 +34,8 @@ Compile / doc / target := baseDirectory.value / "docs/api"
3434
coverageExcludedPackages := ".*nlp.embeddings.*;.*ml.tensorflow.*;.*nlp.annotators.classifier.dl.*;" +
3535
".*nlp.annotators.seq2seq.*;.*ml.*"
3636

37-
licenses += "Apache-2.0" -> url("https://opensource.org/licenses/Apache-2.0")
38-
3937
(ThisBuild / resolvers) := m2Resolvers
4038

41-
credentials += Credentials(Path.userHome / ".ivy2" / ".sbtcredentials")
42-
43-
sonatypeProfileName := "com.johnsnowlabs.nlp"
44-
45-
publishTo := sonatypePublishToBundle.value
46-
47-
sonatypeRepository := "https://s01.oss.sonatype.org/service/local"
48-
49-
sonatypeCredentialHost := "s01.oss.sonatype.org"
50-
51-
publishTo := {
52-
val nexus = "https://s01.oss.sonatype.org/"
53-
if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots")
54-
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
55-
}
56-
57-
homepage := Some(url("https://sparknlp.org"))
58-
59-
scmInfo := Some(
60-
ScmInfo(
61-
url("https://github.com/JohnSnowLabs/spark-nlp"),
62-
"scm:[email protected]:JohnSnowLabs/spark-nlp.git"))
63-
64-
(ThisBuild / developers) := List(
65-
Developer(
66-
id = "saifjsl",
67-
name = "Saif Addin",
68-
email = "[email protected]",
69-
url = url("https://github.com/saifjsl")),
70-
Developer(
71-
id = "maziyarpanahi",
72-
name = "Maziyar Panahi",
73-
email = "[email protected]",
74-
url = url("https://github.com/maziyarpanahi")),
75-
Developer(
76-
id = "albertoandreottiATgmail",
77-
name = "Alberto Andreotti",
78-
email = "[email protected]",
79-
url = url("https://github.com/albertoandreottiATgmail")),
80-
Developer(
81-
id = "danilojsl",
82-
name = "Danilo Burbano",
83-
email = "[email protected]",
84-
url = url("https://github.com/danilojsl")),
85-
Developer(
86-
id = "rohit13k",
87-
name = "Rohit Kumar",
88-
email = "[email protected]",
89-
url = url("https://github.com/rohit13k")),
90-
Developer(
91-
id = "aleksei-ai",
92-
name = "Aleksei Alekseev",
93-
email = "[email protected]",
94-
url = url("https://github.com/aleksei-ai")),
95-
Developer(
96-
id = "showy",
97-
name = "Eduardo Muñoz",
98-
email = "[email protected]",
99-
url = url("https://github.com/showy")),
100-
Developer(
101-
id = "C-K-Loan",
102-
name = "Christian Kasim Loan",
103-
email = "[email protected]",
104-
url = url("https://github.com/C-K-Loan")),
105-
Developer(
106-
id = "wolliq",
107-
name = "Stefano Lori",
108-
email = "[email protected]",
109-
url = url("https://github.com/wolliq")),
110-
Developer(
111-
id = "vankov",
112-
name = "Ivan Vankov",
113-
email = "[email protected]",
114-
url = url("https://github.com/vankov")),
115-
Developer(
116-
id = "alinapetukhova",
117-
name = "Alina Petukhova",
118-
email = "[email protected]",
119-
url = url("https://github.com/alinapetukhova")),
120-
Developer(
121-
id = "hatrungduc",
122-
name = "Devin Ha",
123-
email = "[email protected]",
124-
url = url("https://github.com/hatrungduc")),
125-
Developer(
126-
id = "ahmedlone127",
127-
name = "Khawja Ahmed Lone",
128-
email = "[email protected]",
129-
url = url("https://github.com/ahmedlone127")))
130-
13139
lazy val analyticsDependencies = Seq(
13240
"org.apache.spark" %% "spark-core" % sparkVer % Provided,
13341
"org.apache.spark" %% "spark-mllib" % sparkVer % Provided)
@@ -164,8 +72,7 @@ lazy val utilDependencies = Seq(
16472
exclude ("org.apache.logging.log4j", "log4j-api"),
16573
scratchpad
16674
exclude ("org.apache.logging.log4j", "log4j-api"),
167-
pdfBox
168-
)
75+
pdfBox)
16976

17077
lazy val typedDependencyParserDependencies = Seq(junit)
17178

@@ -238,7 +145,8 @@ lazy val root = (project in file("."))
238145

239146
(assembly / assemblyMergeStrategy) := {
240147
case PathList("META-INF", "versions", "9", "module-info.class") => MergeStrategy.discard
241-
case PathList("module-info.class") => MergeStrategy.discard // Discard any module-info.class globally
148+
case PathList("module-info.class") =>
149+
MergeStrategy.discard // Discard any module-info.class globally
242150
case PathList("apache.commons.lang3", _ @_*) => MergeStrategy.discard
243151
case PathList("org.apache.hadoop", _ @_*) => MergeStrategy.first
244152
case PathList("com.amazonaws", _ @_*) => MergeStrategy.last

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.8.0
1+
sbt.version=1.11.2

project/plugins.sbt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
resolvers += "Maven Central" at "https://repo1.maven.org/maven2/"
22

3-
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.5")
4-
5-
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1")
3+
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.11.2")
4+
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
65

76
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
87

98
/** scoverage */
109
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3")
11-
1210
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.2")
1311

14-
addDependencyTreePlugin
12+
addDependencyTreePlugin

publish.sbt

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
import xerial.sbt.Sonatype.sonatypeCentralHost
2+
3+
homepage := Some(url("https://sparknlp.org"))
4+
organizationName := "John Snow Labs"
5+
organizationHomepage := Some(url("https://www.johnsnowlabs.com/"))
6+
description := "Spark NLP is an open-source text processing library for advanced natural language processing."
7+
8+
scmInfo := Some(
9+
ScmInfo(
10+
url("https://github.com/JohnSnowLabs/spark-nlp"),
11+
"scm:[email protected]:JohnSnowLabs/spark-nlp.git"))
12+
13+
licenses += "Apache-2.0" -> url("https://opensource.org/licenses/Apache-2.0")
14+
15+
// Maven Central publishing settings
16+
credentials += Credentials(Path.userHome / ".sbt" / "sonatype_central_credentials")
17+
// Remove all additional repository other than Maven Central from POM
18+
ThisBuild / pomIncludeRepository := { _ => false }
19+
ThisBuild / publishMavenStyle := true
20+
21+
// new setting for the Central Portal
22+
//ThisBuild / publishTo := {
23+
// val centralSnapshots = "https://central.sonatype.com/repository/maven-snapshots/"
24+
// if (isSnapshot.value) Some("central-snapshots" at centralSnapshots)
25+
// else localStaging.value
26+
//}
27+
28+
// Use sonatype bundle instead
29+
publishTo := sonatypePublishToBundle.value
30+
31+
sonatypeProfileName := "com.johnsnowlabs.nlp"
32+
33+
sonatypeCredentialHost := sonatypeCentralHost
34+
35+
// Developers
36+
(ThisBuild / developers) := List(
37+
Developer(
38+
id = "saifjsl",
39+
name = "Saif Addin",
40+
email = "[email protected]",
41+
url = url("https://github.com/saifjsl")),
42+
Developer(
43+
id = "maziyarpanahi",
44+
name = "Maziyar Panahi",
45+
email = "[email protected]",
46+
url = url("https://github.com/maziyarpanahi")),
47+
Developer(
48+
id = "albertoandreottiATgmail",
49+
name = "Alberto Andreotti",
50+
email = "[email protected]",
51+
url = url("https://github.com/albertoandreottiATgmail")),
52+
Developer(
53+
id = "danilojsl",
54+
name = "Danilo Burbano",
55+
email = "[email protected]",
56+
url = url("https://github.com/danilojsl")),
57+
Developer(
58+
id = "rohit13k",
59+
name = "Rohit Kumar",
60+
email = "[email protected]",
61+
url = url("https://github.com/rohit13k")),
62+
Developer(
63+
id = "aleksei-ai",
64+
name = "Aleksei Alekseev",
65+
email = "[email protected]",
66+
url = url("https://github.com/aleksei-ai")),
67+
Developer(
68+
id = "showy",
69+
name = "Eduardo Muñoz",
70+
email = "[email protected]",
71+
url = url("https://github.com/showy")),
72+
Developer(
73+
id = "C-K-Loan",
74+
name = "Christian Kasim Loan",
75+
email = "[email protected]",
76+
url = url("https://github.com/C-K-Loan")),
77+
Developer(
78+
id = "wolliq",
79+
name = "Stefano Lori",
80+
email = "[email protected]",
81+
url = url("https://github.com/wolliq")),
82+
Developer(
83+
id = "vankov",
84+
name = "Ivan Vankov",
85+
email = "[email protected]",
86+
url = url("https://github.com/vankov")),
87+
Developer(
88+
id = "alinapetukhova",
89+
name = "Alina Petukhova",
90+
email = "[email protected]",
91+
url = url("https://github.com/alinapetukhova")),
92+
Developer(
93+
id = "DevinTDHa",
94+
name = "Devin Ha",
95+
email = "[email protected]",
96+
url = url("https://github.com/DevinTDHa")),
97+
Developer(
98+
id = "ahmedlone127",
99+
name = "Khawja Ahmed Lone",
100+
email = "[email protected]",
101+
url = url("https://github.com/ahmedlone127")))

0 commit comments

Comments
 (0)