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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 23 additions & 3 deletions .github/workflows/java-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ jobs:
# List of some artifacts to check
ARTIFACTS=(
"lance-namespace-apache-client"
"lance-namespace-async-client"
"lance-namespace-core"
"lance-namespace-core-async"
)

echo "Waiting for version $VERSION to be available in Maven Central..."
Expand Down Expand Up @@ -137,23 +139,41 @@ jobs:
echo ""
echo "Users can now add the following dependencies to their projects:"
echo ""
echo "Maven (interface):"
echo "Maven (sync interface):"
echo "<dependency>"
echo " <groupId>org.lance</groupId>"
echo " <artifactId>lance-namespace-core</artifactId>"
echo " <version>${VERSION}</version>"
echo "</dependency>"
echo ""
echo "Maven (generated client):"
echo "Maven (async interface - Java 11+):"
echo "<dependency>"
echo " <groupId>org.lance</groupId>"
echo " <artifactId>lance-namespace-core-async</artifactId>"
echo " <version>${VERSION}</version>"
echo "</dependency>"
echo ""
echo "Maven (sync client):"
echo "<dependency>"
echo " <groupId>org.lance</groupId>"
echo " <artifactId>lance-namespace-apache-client</artifactId>"
echo " <version>${VERSION}</version>"
echo "</dependency>"
echo ""
echo "Gradle:"
echo "Maven (async client - Java 11+):"
echo "<dependency>"
echo " <groupId>org.lance</groupId>"
echo " <artifactId>lance-namespace-async-client</artifactId>"
echo " <version>${VERSION}</version>"
echo "</dependency>"
echo ""
echo "Gradle (sync):"
echo "implementation 'org.lance:lance-namespace-core:${VERSION}'"
echo "implementation 'org.lance:lance-namespace-apache-client:${VERSION}'"
echo ""
echo "Gradle (async - Java 11+):"
echo "implementation 'org.lance:lance-namespace-core-async:${VERSION}'"
echo "implementation 'org.lance:lance-namespace-async-client:${VERSION}'"
exit 0
fi

Expand Down
12 changes: 12 additions & 0 deletions java/.async-client-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
**build.gradle
**.travis.yml
**build.sbt
**git_push.sh
**gradle.properties
**gradlew
**gradlew.bat
**settings.gradle
**.gitignore
**/gradle/**
**/.github/**
**/src/test/**
53 changes: 48 additions & 5 deletions java/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,36 @@

VERSION = 0.5.2

.PHONY: clean-async-client
clean-async-client:
rm -rf lance-namespace-async-client

.PHONY: gen-async-client
gen-async-client: clean-async-client
uv run openapi-generator-cli generate \
-i ../docs/src/rest.yaml \
-g java \
-o lance-namespace-async-client \
--ignore-file-override=.async-client-ignore \
--type-mappings=file=byte[] \
--additional-properties=groupId=org.lance,artifactId=lance-namespace-async-client,artifactVersion=$(VERSION),parentGroupId=org.lance,parentArtifactId=lance-namespace-root,parentVersion=$(VERSION),parentRelativePath=pom.xml,library=native,asyncNative=true,apiPackage=org.lance.namespace.client.async.api,modelPackage=org.lance.namespace.model,hideGenerationTimestamp=true,licenseName=Apache-2.0,licenseUrl=https://www.apache.org/licenses/LICENSE-2.0.txt
rm -rf lance-namespace-async-client/.openapi-generator-ignore
rm -rf lance-namespace-async-client/.openapi-generator
rm -rf lance-namespace-async-client/pom.xml
cp async-client-pom.xml lance-namespace-async-client/pom.xml

.PHONY: lint-async-client
lint-async-client: gen-async-client
./mvnw spotless:apply -pl lance-namespace-async-client -am

.PHONY: build-async-client
build-async-client: gen-async-client lint-async-client
./mvnw install -pl lance-namespace-async-client -am

.PHONY: check-async-client
check-async-client:
./mvnw checkstyle:check spotless:check -pl lance-namespace-async-client -am

.PHONY: clean-apache-client
clean-apache-client:
rm -rf lance-namespace-apache-client
Expand Down Expand Up @@ -75,11 +105,24 @@ build-core: build-apache-client lint-core
check-core:
./mvnw checkstyle:check spotless:check -pl lance-namespace-core -am

# lance-namespace-core-async module (hand-written, no codegen)
.PHONY: lint-core-async
lint-core-async: gen-async-client
./mvnw spotless:apply -pl lance-namespace-core-async -am

.PHONY: build-core-async
build-core-async: build-async-client lint-core-async
./mvnw install -pl lance-namespace-core-async -am

.PHONY: check-core-async
check-core-async:
./mvnw checkstyle:check spotless:check -pl lance-namespace-core-async -am

.PHONY: clean
clean: clean-apache-client clean-springboot-server
clean: clean-apache-client clean-async-client clean-springboot-server

.PHONY: gen
gen: gen-apache-client gen-springboot-server lint-apache-client lint-springboot-server
gen: gen-apache-client gen-async-client gen-springboot-server lint-apache-client lint-async-client lint-springboot-server

.PHONY: check-apache-client
check-apache-client:
Expand All @@ -90,10 +133,10 @@ check-springboot-server:
./mvnw checkstyle:check spotless:check -pl lance-namespace-springboot-server -am

.PHONY: check
check: check-apache-client check-springboot-server check-core
check: check-apache-client check-async-client check-springboot-server check-core check-core-async

.PHONY: lint
lint: lint-apache-client lint-springboot-server lint-core
lint: lint-apache-client lint-async-client lint-springboot-server lint-core lint-core-async

.PHONY: build
build: build-apache-client build-springboot-server build-core
build: build-apache-client build-async-client build-springboot-server build-core build-core-async
116 changes: 116 additions & 0 deletions java/async-client-pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.lance</groupId>
<artifactId>lance-namespace-root</artifactId>
<version>0.5.2</version>
</parent>

<artifactId>lance-namespace-async-client</artifactId>
<packaging>jar</packaging>

<name>lance-namespace-async-client</name>
<description>Lance Namespace async HTTP client using Java 11+ native HttpClient</description>

<dependencies>
<!-- JSON processing: jackson -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>jackson-databind-nullable</artifactId>
<version>${jackson-databind-nullable-version}</version>
</dependency>

<!-- @Nullable annotation -->
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>${jakarta-annotation-version}</version>
<scope>provided</scope>
</dependency>

<!-- test dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3</version>
</requireMavenVersion>
<requireJavaVersion>
<version>11</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<source>11</source>
<target>11</target>
<release>11</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
</plugin>
</plugins>
</build>

<properties>
<jackson-version>2.17.1</jackson-version>
<jackson-databind-nullable-version>0.2.6</jackson-databind-nullable-version>
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
</properties>
</project>
4 changes: 4 additions & 0 deletions java/checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
<suppressions>
<suppress checks="MethodName" files="lance-namespace-apache-client/src/main/java/org/lance/namespace/client/apache/*"/>
<suppress checks="MethodName" files="lance-namespace-apache-client/src/main/java/org/lance/namespace/model/*"/>
<suppress checks="MethodName" files="lance-namespace-async-client/src/main/java/org/lance/namespace/client/async/*"/>
<suppress checks="MethodName" files="lance-namespace-async-client/src/main/java/org/lance/namespace/model/*"/>
<suppress checks="MethodName" files="lance-namespace-springboot-server/src/main/java/org/lance/namespace/server/springboot/*"/>
<suppress checks="LineLength" files="lance-namespace-apache-client/src/main/java/org/lance/namespace/client/apache/*"/>
<suppress checks="LineLength" files="lance-namespace-async-client/src/main/java/org/lance/namespace/client/async/*"/>
<suppress checks="LineLength" files="lance-namespace-springboot-server/src/main/java/org/lance/namespace/server/springboot/*"/>
<suppress checks="RedundantModifier" files="lance-namespace-springboot-server/src/main/java/org/lance/namespace/server/springboot/*"/>
<suppress checks="NeedBraces" files="lance-namespace-apache-client/src/main/java/org/lance/namespace/client/apache/*"/>
<suppress checks="NeedBraces" files="lance-namespace-async-client/src/main/java/org/lance/namespace/client/async/*"/>
</suppressions>
Loading
Loading