Skip to content

Commit

Permalink
chore(bindings/java): post release 0.1.0 (#2352)
Browse files Browse the repository at this point in the history
Signed-off-by: tison <wander4096@gmail.com>
  • Loading branch information
tisonkun authored May 28, 2023
1 parent 504df15 commit 72a518a
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 33 deletions.
80 changes: 49 additions & 31 deletions bindings/java/README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,59 @@
# OpenDAL Java Bindings

## Usage
[![Maven Central](https://img.shields.io/maven-central/v/org.apache.opendal/opendal-java.svg?logo=Apache+Maven&logoColor=blue)](https://central.sonatype.com/search?q=opendal-java&smo=true)
[![Website](https://img.shields.io/badge/opendal-OpenDAL_Website-red?logo=Apache&logoColor=red)](https://opendal.apache.org/docs/java/)

You can use the package by adding the dependency as following:

## Getting Started

This project is built upon the native OpenDAL lib. And it is released for multiple platforms that you can use a classifier to specify the platform you are building the application on.

Generally, you can first add the `os-maven-plugin` for automatically detect the classifier based on your platform:

```xml
<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.7.0</version>
</extension>
</extensions>
</build>
```

Then add the dependency to `opendal-java` as following:

```xml
<project>
<repositories>
<dependency>
<groupId>org.apache.opendal</groupId>
<artifactId>opendal-java</artifactId>
<version>${opendal.version}</version>
<classifier>${os.detected.classifier}</classifier>
</dependency>
```

If you'd rather like the latest snapshots of the upcoming major version, use ASF Maven snapshot repository:

```xml
<repositories>
<repository>
<id>apache.snapshots</id>
<name>Apache Snapshot Repository</name>
<url>https://repository.apache.org/snapshots</url>
<releases>
<enabled>true</enabled>
</releases>
<id>apache.snapshots</id>
<name>Apache Snapshot Repository</name>
<url>https://repository.apache.org/snapshots</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>org.apache.opendal</groupId>
<artifactId>opendal-java</artifactId>
<version>0.1.0-SNAPSHOT</version>
<classifier>${os.detected.classifier}</classifier>
</dependency>
</dependencies>

<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.7.0</version>
</extension>
</extensions>
</build>
</project>
</repositories>
```

... and declare the appropriate dependency version:

```xml
<dependency>
<groupId>org.apache.opendal</groupId>
<artifactId>opendal-java</artifactId>
<version>${opendal.snapshot-version}</version>
<classifier>${os.detected.classifier}</classifier>
</dependency>
```

## Build
Expand Down
5 changes: 3 additions & 2 deletions bindings/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

<groupId>org.apache.opendal</groupId>
<artifactId>opendal-java</artifactId>
<version>0.1.0-SNAPSHOT</version>
<version>0.2.0-SNAPSHOT</version>

<url>https://opendal.apache.org</url>
<mailingLists>
Expand Down Expand Up @@ -61,6 +61,7 @@

<maven-surefire-plugin.version>3.0.0</maven-surefire-plugin.version>
<exec-maven-plugin.version>3.1.0</exec-maven-plugin.version>
<os-maven-plugin.version>1.7.0</os-maven-plugin.version>
<spotless.version>2.37.0</spotless.version>
</properties>

Expand Down Expand Up @@ -151,7 +152,7 @@
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.7.0</version>
<version>${os-maven-plugin.version}</version>
</extension>
</extensions>

Expand Down

0 comments on commit 72a518a

Please sign in to comment.