Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 1 addition & 18 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,15 @@ $ git submodule update --init

If you are using Idea, go to Project Root in Idea, right click on `milvus-sdk-java` and select `Maven` -> `Reload Project`

Note: For now, current project do not support JDK 21+. The minimal Lombok version compatible with JDK 21 is 1.18.30.

## Building Milvus java SDK

Call the following command to generate protobuf related code
```shell
$ mvn install
```

## Update Milvus proto files
Milvus proto files are managed by a submodule project under the directory: sdk-core/src/main/milvus-proto
Before developing new interfaces, you need to get the latest proto files by the following command:
```shell
$ git submodule update --remote
```

## Building Milvus
See detailed information at:
https://github.com/milvus-io/milvus/blob/master/DEVELOPMENT.md

## Start a Milvus cluster
You need to start a latest milvus cluster to test the java SDK, see instructions at:
https://milvus.io/docs/v2.0.0/install_standalone-docker.md

### Unit Tests
All unit test is under director src/test
Unit tests are under sdk-core/src/test and sdk-bulkwriter/src/test

## GitHub Flow
Milvus SDK repo follows the same git work flow as milvus main repo, see
Expand Down
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ To use BulkWriter, import milvus-sdk-java-bulkwriter to your project.

Please refer to [examples](https://github.com/milvus-io/milvus-sdk-java/tree/master/examples) folder for Java SDK examples.

### Documentation



### Troubleshooting

- If you encounter the following error when running your application:
Expand All @@ -99,19 +95,19 @@ Please refer to [examples](https://github.com/milvus-io/milvus-sdk-java/tree/mas
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.30</version>
<version>1.7.36</version>
</dependency>
```

- Gradle/Groovy

```groovy
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.30'
implementation 'org.slf4j:slf4j-api:1.7.36'
```
- Gradle/Kotlin

```kotlin
implementation("org.slf4j:slf4j-api:1.7.30")
implementation("org.slf4j:slf4j-api:1.7.36")
```

### Development
Expand Down
33 changes: 33 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Milvus Java SDK Examples

This is a standalone Maven project containing example code for the Milvus Java SDK. It is **not** part of the main SDK build — it has its own `pom.xml` and runs independently.

## Prerequisites

- Java 8 or higher
- Apache Maven
- A running Milvus instance (default: `localhost:19530`)

## Build

```shell
cd examples
mvn compile
```

## Run an example

```shell
mvn exec:java -Dexec.mainClass="io.milvus.v2.SimpleExample"
```

## Project structure

- `src/main/java/io/milvus/v2/` — Examples using the V2 SDK (`MilvusClientV2`)
- `src/main/java/io/milvus/v1/` — Examples using the V1 SDK (`MilvusServiceClient`)
- `src/main/java/io/milvus/v2/bulkwriter/` — BulkWriter examples

## Notes

- This project depends on `milvus-sdk-java` and `milvus-sdk-java-bulkwriter` from your local Maven repository. If you've made local changes to the SDK, run `mvn install -DskipTests` from the project root first.
- Some examples require additional services (e.g., MinIO for BulkWriter, external table examples). Check the comments at the top of each example file for specific requirements.
62 changes: 55 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,60 @@
</repository>
</repositories>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-bom</artifactId>
<version>${grpc.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.api.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>${errorprone.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-common</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-bom</artifactId>
<version>${testcontainers.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.xerial.snappy</groupId>
<artifactId>snappy-java</artifactId>
<version>${snappy.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

<properties>
<revision>2.6.17</revision>
<maven.compiler.source>8</maven.compiler.source>
Expand All @@ -93,8 +147,6 @@
<protobuf.version>3.25.5</protobuf.version>
<protoc.version>3.25.5</protoc.version>
<commons-collections4.version>4.3</commons-collections4.version>
<versio.maven.deploy.plugin>2.8.2</versio.maven.deploy.plugin>
<versio.maven.source.plugin>3.2.1</versio.maven.source.plugin>
<javax.annotation.version>1.2</javax.annotation.version>
<commons.text.version>1.10.0</commons.text.version>
<slf4j.api.version>1.7.36</slf4j.api.version>
Expand All @@ -121,14 +173,12 @@
<errorprone.version>2.38.0</errorprone.version>

<!--for BulkWriter-->
<plexus.version>3.0.24</plexus.version>
<hadoop.version>3.3.6</hadoop.version>
<hbase.version>1.2.0</hbase.version>
<parquet.version>1.13.1</parquet.version>
<unirest.version>3.13.10</unirest.version>
<snappy.version>1.1.10.5</snappy.version>
<aws-java-sdk-s3.version>1.12.687</aws-java-sdk-s3.version>
<minio-java-sdk.veresion>8.5.7</minio-java-sdk.veresion>
<minio-java-sdk.version>8.5.7</minio-java-sdk.version>
<azure-java-blob-sdk.version>12.25.3</azure-java-blob-sdk.version>
<azure-java-identity-sdk.version>1.10.1</azure-java-identity-sdk.version>
</properties>
Expand Down Expand Up @@ -156,8 +206,6 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven.javadoc.plugin.version}</version>
<configuration>
<javadocExecutable>/usr/bin/javadoc</javadocExecutable>
<!-- <additionalOptions>-Xdoclint:none</additionalOptions>-->
<additionalJOption>-Xdoclint:none</additionalJOption>
</configuration>
<executions>
Expand Down
56 changes: 1 addition & 55 deletions sdk-bulkwriter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,60 +19,6 @@
<skip.maven.deploy>false</skip.maven.deploy>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-bom</artifactId>
<version>${grpc.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.api.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>${errorprone.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-common</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.xerial.snappy</groupId>
<artifactId>snappy-java</artifactId>
<version>${snappy.version}</version>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-bom</artifactId>
<version>${testcontainers.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>io.milvus</groupId>
Expand Down Expand Up @@ -168,7 +114,7 @@
<dependency>
<groupId>io.minio</groupId>
<artifactId>minio</artifactId>
<version>${minio-java-sdk.veresion}</version>
<version>${minio-java-sdk.version}</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
Expand Down
49 changes: 0 additions & 49 deletions sdk-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,55 +19,6 @@
<skip.maven.deploy>false</skip.maven.deploy>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-bom</artifactId>
<version>${grpc.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.api.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>${errorprone.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-common</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-bom</artifactId>
<version>${testcontainers.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.mockito</groupId>
Expand Down
Loading