Skip to content

Commit da08492

Browse files
package to 2.1.0 version
Signed-off-by: shaoting-huang <[email protected]>
1 parent dfb9ac9 commit da08492

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

build.sbt

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,30 @@
11
import scala.sys.process.Process
2+
import scala.io.Source
23

34
import xerial.sbt.Sonatype._
45
import Dependencies._
56

7+
// Load Sonatype Central credentials
8+
credentials += {
9+
val credFile = Path.userHome / ".sbt" / "sonatype_central_credentials"
10+
if (credFile.exists) {
11+
val lines = Source.fromFile(credFile).getLines().toList
12+
val props = lines.map { line =>
13+
val parts = line.split("=", 2)
14+
if (parts.length == 2) Some(parts(0).trim -> parts(1).trim) else None
15+
}.flatten.toMap
16+
17+
Credentials(
18+
"Sonatype Nexus Repository Manager",
19+
props.getOrElse("host", "central.sonatype.com"),
20+
props.getOrElse("user", ""),
21+
props.getOrElse("password", "")
22+
)
23+
} else {
24+
Credentials(Path.userHome / ".sbt" / "sonatype.credentials")
25+
}
26+
}
27+
628
ThisBuild / organizationName := "zilliz"
729
ThisBuild / organizationHomepage := Some(url("https://zilliz.com/"))
830
// For cross-compiling (if applicable)
@@ -54,7 +76,7 @@ lazy val root = (project in file("."))
5476
assembly / parallelExecution := true,
5577
Test / parallelExecution := true,
5678
Compile / compile / parallelExecution := true,
57-
version := "0.1.14-SNAPSHOT",
79+
version := "0.2.1-SNAPSHOT",
5880
organization := "com.zilliz",
5981

6082
// Fork JVM for run and tests to properly load native libraries

scripts/spark_submit_demo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ export LD_PRELOAD=$(pwd)/src/main/resources/native/libmilvus-storage.so && \
1414
--conf "spark.driver.userClassPathFirst=true" \
1515
--conf "spark.executor.userClassPathFirst=true" \
1616
--class example.MilvusStorageMain \
17-
target/scala-2.13/spark-connector-assembly-0.1.14-SNAPSHOT.jar
17+
target/scala-2.13/spark-connector-assembly-0.2.1-SNAPSHOT.jar

src/main/scala/example/MilvusStorageMain.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import scala.collection.JavaConverters._
1717
* It reads test data from src/test/data directory by default.
1818
*
1919
* Usage:
20-
* spark-submit --class example.MilvusStorageMain target/scala-2.13/spark-connector-assembly-0.1.14-SNAPSHOT.jar [test_data_directory]
20+
* spark-submit --class example.MilvusStorageMain target/scala-2.13/spark-connector-assembly-0.2.1-SNAPSHOT.jar [test_data_directory]
2121
*/
2222
object MilvusStorageMain {
2323

0 commit comments

Comments
 (0)