Skip to content

Commit eeee32a

Browse files
committed
Refine pom files
Signed-off-by: yhmo <yihua.mo@zilliz.com>
1 parent b6d229b commit eeee32a

6 files changed

Lines changed: 88 additions & 126 deletions

File tree

DEVELOPMENT.md

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,15 @@ $ git submodule update --init
2121

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

24-
Note: For now, current project do not support JDK 21+. The minimal Lombok version compatible with JDK 21 is 1.18.30.
25-
2624
## Building Milvus java SDK
2725

2826
Call the following command to generate protobuf related code
2927
```shell
3028
$ mvn install
3129
```
3230

33-
## Update Milvus proto files
34-
Milvus proto files are managed by a submodule project under the directory: sdk-core/src/main/milvus-proto
35-
Before developing new interfaces, you need to get the latest proto files by the following command:
36-
```shell
37-
$ git submodule update --remote
38-
```
39-
40-
## Building Milvus
41-
See detailed information at:
42-
https://github.com/milvus-io/milvus/blob/master/DEVELOPMENT.md
43-
44-
## Start a Milvus cluster
45-
You need to start a latest milvus cluster to test the java SDK, see instructions at:
46-
https://milvus.io/docs/v2.0.0/install_standalone-docker.md
47-
4831
### Unit Tests
49-
All unit test is under director src/test
32+
Unit tests are under sdk-core/src/test and sdk-bulkwriter/src/test
5033

5134
## GitHub Flow
5235
Milvus SDK repo follows the same git work flow as milvus main repo, see

README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@ To use BulkWriter, import milvus-sdk-java-bulkwriter to your project.
7979

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

82-
### Documentation
83-
84-
85-
8682
### Troubleshooting
8783

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

106102
- Gradle/Groovy
107103

108104
```groovy
109-
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.30'
105+
implementation 'org.slf4j:slf4j-api:1.7.36'
110106
```
111107
- Gradle/Kotlin
112108

113109
```kotlin
114-
implementation("org.slf4j:slf4j-api:1.7.30")
110+
implementation("org.slf4j:slf4j-api:1.7.36")
115111
```
116112

117113
### Development

examples/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Milvus Java SDK Examples
2+
3+
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.
4+
5+
## Prerequisites
6+
7+
- Java 8 or higher
8+
- Apache Maven
9+
- A running Milvus instance (default: `localhost:19530`)
10+
11+
## Build
12+
13+
```shell
14+
cd examples
15+
mvn compile
16+
```
17+
18+
## Run an example
19+
20+
```shell
21+
mvn exec:java -Dexec.mainClass="io.milvus.v2.SimpleExample"
22+
```
23+
24+
## Project structure
25+
26+
- `src/main/java/io/milvus/v2/` — Examples using the V2 SDK (`MilvusClientV2`)
27+
- `src/main/java/io/milvus/v1/` — Examples using the V1 SDK (`MilvusServiceClient`)
28+
- `src/main/java/io/milvus/v2/bulkwriter/` — BulkWriter examples
29+
30+
## Notes
31+
32+
- 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.
33+
- 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.

pom.xml

Lines changed: 50 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,55 @@
8181
</repository>
8282
</repositories>
8383

84+
<dependencyManagement>
85+
<dependencies>
86+
<dependency>
87+
<groupId>io.grpc</groupId>
88+
<artifactId>grpc-bom</artifactId>
89+
<version>${grpc.version}</version>
90+
<type>pom</type>
91+
<scope>import</scope>
92+
</dependency>
93+
<dependency>
94+
<groupId>org.slf4j</groupId>
95+
<artifactId>slf4j-api</artifactId>
96+
<version>${slf4j.api.version}</version>
97+
</dependency>
98+
<dependency>
99+
<groupId>com.google.guava</groupId>
100+
<artifactId>guava</artifactId>
101+
<version>${guava.version}</version>
102+
</dependency>
103+
<dependency>
104+
<groupId>com.google.errorprone</groupId>
105+
<artifactId>error_prone_annotations</artifactId>
106+
<version>${errorprone.version}</version>
107+
</dependency>
108+
<dependency>
109+
<groupId>org.jetbrains.kotlin</groupId>
110+
<artifactId>kotlin-stdlib-jdk8</artifactId>
111+
<version>${kotlin.version}</version>
112+
</dependency>
113+
<dependency>
114+
<groupId>org.jetbrains.kotlin</groupId>
115+
<artifactId>kotlin-stdlib-common</artifactId>
116+
<version>${kotlin.version}</version>
117+
</dependency>
118+
<dependency>
119+
<groupId>org.jetbrains.kotlin</groupId>
120+
<artifactId>kotlin-stdlib</artifactId>
121+
<version>${kotlin.version}</version>
122+
</dependency>
123+
<dependency>
124+
<groupId>org.testcontainers</groupId>
125+
<artifactId>testcontainers-bom</artifactId>
126+
<version>${testcontainers.version}</version>
127+
<type>pom</type>
128+
<scope>import</scope>
129+
</dependency>
130+
</dependencies>
131+
</dependencyManagement>
132+
84133
<properties>
85134
<revision>2.6.17</revision>
86135
<maven.compiler.source>8</maven.compiler.source>
@@ -93,8 +142,6 @@
93142
<protobuf.version>3.25.5</protobuf.version>
94143
<protoc.version>3.25.5</protoc.version>
95144
<commons-collections4.version>4.3</commons-collections4.version>
96-
<versio.maven.deploy.plugin>2.8.2</versio.maven.deploy.plugin>
97-
<versio.maven.source.plugin>3.2.1</versio.maven.source.plugin>
98145
<javax.annotation.version>1.2</javax.annotation.version>
99146
<commons.text.version>1.10.0</commons.text.version>
100147
<slf4j.api.version>1.7.36</slf4j.api.version>
@@ -121,14 +168,12 @@
121168
<errorprone.version>2.38.0</errorprone.version>
122169

123170
<!--for BulkWriter-->
124-
<plexus.version>3.0.24</plexus.version>
125171
<hadoop.version>3.3.6</hadoop.version>
126-
<hbase.version>1.2.0</hbase.version>
127172
<parquet.version>1.13.1</parquet.version>
128173
<unirest.version>3.13.10</unirest.version>
129174
<snappy.version>1.1.10.5</snappy.version>
130175
<aws-java-sdk-s3.version>1.12.687</aws-java-sdk-s3.version>
131-
<minio-java-sdk.veresion>8.5.7</minio-java-sdk.veresion>
176+
<minio-java-sdk.version>8.5.7</minio-java-sdk.version>
132177
<azure-java-blob-sdk.version>12.25.3</azure-java-blob-sdk.version>
133178
<azure-java-identity-sdk.version>1.10.1</azure-java-identity-sdk.version>
134179
</properties>
@@ -156,8 +201,6 @@
156201
<artifactId>maven-javadoc-plugin</artifactId>
157202
<version>${maven.javadoc.plugin.version}</version>
158203
<configuration>
159-
<javadocExecutable>/usr/bin/javadoc</javadocExecutable>
160-
<!-- <additionalOptions>-Xdoclint:none</additionalOptions>-->
161204
<additionalJOption>-Xdoclint:none</additionalJOption>
162205
</configuration>
163206
<executions>

sdk-bulkwriter/pom.xml

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -21,55 +21,11 @@
2121

2222
<dependencyManagement>
2323
<dependencies>
24-
<dependency>
25-
<groupId>io.grpc</groupId>
26-
<artifactId>grpc-bom</artifactId>
27-
<version>${grpc.version}</version>
28-
<type>pom</type>
29-
<scope>import</scope>
30-
</dependency>
31-
<dependency>
32-
<groupId>org.slf4j</groupId>
33-
<artifactId>slf4j-api</artifactId>
34-
<version>${slf4j.api.version}</version>
35-
</dependency>
36-
<dependency>
37-
<groupId>com.google.guava</groupId>
38-
<artifactId>guava</artifactId>
39-
<version>${guava.version}</version>
40-
</dependency>
41-
<dependency>
42-
<groupId>com.google.errorprone</groupId>
43-
<artifactId>error_prone_annotations</artifactId>
44-
<version>${errorprone.version}</version>
45-
</dependency>
46-
<dependency>
47-
<groupId>org.jetbrains.kotlin</groupId>
48-
<artifactId>kotlin-stdlib-jdk8</artifactId>
49-
<version>${kotlin.version}</version>
50-
</dependency>
51-
<dependency>
52-
<groupId>org.jetbrains.kotlin</groupId>
53-
<artifactId>kotlin-stdlib-common</artifactId>
54-
<version>${kotlin.version}</version>
55-
</dependency>
56-
<dependency>
57-
<groupId>org.jetbrains.kotlin</groupId>
58-
<artifactId>kotlin-stdlib</artifactId>
59-
<version>${kotlin.version}</version>
60-
</dependency>
6124
<dependency>
6225
<groupId>org.xerial.snappy</groupId>
6326
<artifactId>snappy-java</artifactId>
6427
<version>${snappy.version}</version>
6528
</dependency>
66-
<dependency>
67-
<groupId>org.testcontainers</groupId>
68-
<artifactId>testcontainers-bom</artifactId>
69-
<version>${testcontainers.version}</version>
70-
<type>pom</type>
71-
<scope>import</scope>
72-
</dependency>
7329
</dependencies>
7430
</dependencyManagement>
7531

@@ -168,7 +124,7 @@
168124
<dependency>
169125
<groupId>io.minio</groupId>
170126
<artifactId>minio</artifactId>
171-
<version>${minio-java-sdk.veresion}</version>
127+
<version>${minio-java-sdk.version}</version>
172128
</dependency>
173129
<dependency>
174130
<groupId>com.azure</groupId>

sdk-core/pom.xml

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -19,55 +19,6 @@
1919
<skip.maven.deploy>false</skip.maven.deploy>
2020
</properties>
2121

22-
<dependencyManagement>
23-
<dependencies>
24-
<dependency>
25-
<groupId>io.grpc</groupId>
26-
<artifactId>grpc-bom</artifactId>
27-
<version>${grpc.version}</version>
28-
<type>pom</type>
29-
<scope>import</scope>
30-
</dependency>
31-
<dependency>
32-
<groupId>org.slf4j</groupId>
33-
<artifactId>slf4j-api</artifactId>
34-
<version>${slf4j.api.version}</version>
35-
</dependency>
36-
<dependency>
37-
<groupId>com.google.guava</groupId>
38-
<artifactId>guava</artifactId>
39-
<version>${guava.version}</version>
40-
</dependency>
41-
<dependency>
42-
<groupId>com.google.errorprone</groupId>
43-
<artifactId>error_prone_annotations</artifactId>
44-
<version>${errorprone.version}</version>
45-
</dependency>
46-
<dependency>
47-
<groupId>org.jetbrains.kotlin</groupId>
48-
<artifactId>kotlin-stdlib-jdk8</artifactId>
49-
<version>${kotlin.version}</version>
50-
</dependency>
51-
<dependency>
52-
<groupId>org.jetbrains.kotlin</groupId>
53-
<artifactId>kotlin-stdlib-common</artifactId>
54-
<version>${kotlin.version}</version>
55-
</dependency>
56-
<dependency>
57-
<groupId>org.jetbrains.kotlin</groupId>
58-
<artifactId>kotlin-stdlib</artifactId>
59-
<version>${kotlin.version}</version>
60-
</dependency>
61-
<dependency>
62-
<groupId>org.testcontainers</groupId>
63-
<artifactId>testcontainers-bom</artifactId>
64-
<version>${testcontainers.version}</version>
65-
<type>pom</type>
66-
<scope>import</scope>
67-
</dependency>
68-
</dependencies>
69-
</dependencyManagement>
70-
7122
<dependencies>
7223
<dependency>
7324
<groupId>org.mockito</groupId>

0 commit comments

Comments
 (0)