Starting point
This commit is contained in:
35
.github/workflows/deploy.yml
vendored
Normal file
35
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
|
||||||
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build and Deploy On Push
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.repository == 'spring-projects-experimental/spring-grpc' }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Set up JDK 17
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
java-version: '17'
|
||||||
|
distribution: 'temurin'
|
||||||
|
cache: maven
|
||||||
|
- name: Deploy with Maven
|
||||||
|
env:
|
||||||
|
spring_username: ${{ secrets.ARTIFACTORY_USERNAME }}
|
||||||
|
spring_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
||||||
|
sonatype_username: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }}
|
||||||
|
sonatype_password: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }}
|
||||||
|
signing_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
|
passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
||||||
|
run: |
|
||||||
|
echo "${signing_key}" > private.asc
|
||||||
|
gpg --import --batch --no-tty private.asc
|
||||||
|
./mvnw -B deploy -s .mvn/settings.xml
|
||||||
|
|
||||||
38
.gitignore
vendored
Normal file
38
.gitignore
vendored
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
target
|
||||||
|
.classpath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
bin/
|
||||||
|
build.log
|
||||||
|
integration-repo
|
||||||
|
ivy-cache
|
||||||
|
spring-build
|
||||||
|
.idea
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
*.iws
|
||||||
|
.*.swp
|
||||||
|
.DS_Store
|
||||||
|
.springBeans
|
||||||
|
build
|
||||||
|
.gradle
|
||||||
|
out
|
||||||
|
|
||||||
|
/.gradletasknamecache
|
||||||
|
**/*.flattened-pom.xml
|
||||||
|
|
||||||
|
vscode
|
||||||
|
settings.json
|
||||||
|
|
||||||
|
node
|
||||||
|
node_modules
|
||||||
|
package-lock.json
|
||||||
|
package.json
|
||||||
|
.vscode
|
||||||
|
.antlr
|
||||||
|
|
||||||
|
shell.log
|
||||||
|
|
||||||
|
.profiler
|
||||||
|
nbproject/
|
||||||
|
|
||||||
46
.mvn/settings.xml
Normal file
46
.mvn/settings.xml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<settings>
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>release</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>true</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
<properties>
|
||||||
|
<gpg.passphrase>${env.passphrase}</gpg.passphrase>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
<servers>
|
||||||
|
<server>
|
||||||
|
<id>sonatype-nexus-staging</id>
|
||||||
|
<username>${env.sonatype_username}</username>
|
||||||
|
<password>${env.sonatype_password}</password>
|
||||||
|
</server>
|
||||||
|
<server>
|
||||||
|
<id>repo.spring.io</id>
|
||||||
|
<username>${env.spring_username}</username>
|
||||||
|
<password>${env.spring_password}</password>
|
||||||
|
</server>
|
||||||
|
<server>
|
||||||
|
<id>spring-libs-milestones</id>
|
||||||
|
<username>${env.spring_username}</username>
|
||||||
|
<password>${env.spring_password}</password>
|
||||||
|
</server>
|
||||||
|
<server>
|
||||||
|
<id>spring-libs-snapshots</id>
|
||||||
|
<username>${env.spring_username}</username>
|
||||||
|
<password>${env.spring_password}</password>
|
||||||
|
</server>
|
||||||
|
<server>
|
||||||
|
<id>spring-libs-releases</id>
|
||||||
|
<username>${env.spring_username}</username>
|
||||||
|
<password>${env.spring_password}</password>
|
||||||
|
</server>
|
||||||
|
<server>
|
||||||
|
<id>spring-libs-plugins</id>
|
||||||
|
<username>${env.spring_username}</username>
|
||||||
|
<password>${env.spring_password}</password>
|
||||||
|
</server>
|
||||||
|
</servers>
|
||||||
|
</settings>
|
||||||
BIN
.mvn/wrapper/maven-wrapper.jar
vendored
Normal file
BIN
.mvn/wrapper/maven-wrapper.jar
vendored
Normal file
Binary file not shown.
1
.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
1
.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
|
||||||
8
README.md
Normal file
8
README.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Spring Grpc [](https://github.com/spring-projects/spring-ai/actions/workflows/deploy.yml)
|
||||||
|
|
||||||
|
Welcome to the Spring Grpc project!
|
||||||
|
|
||||||
|
The Spring Grpc project provides a Spring-friendly API and abstractions for developing Grpc applications.
|
||||||
|
|
||||||
|
For further information go to our [Spring Grpc reference documentation](https://docs.spring.io/spring-gprc/reference/).
|
||||||
|
|
||||||
253
mvnw
vendored
Executable file
253
mvnw
vendored
Executable file
@@ -0,0 +1,253 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# Maven2 Start Up Batch script
|
||||||
|
#
|
||||||
|
# Required ENV vars:
|
||||||
|
# ------------------
|
||||||
|
# JAVA_HOME - location of a JDK home dir
|
||||||
|
#
|
||||||
|
# Optional ENV vars
|
||||||
|
# -----------------
|
||||||
|
# M2_HOME - location of maven2's installed home dir
|
||||||
|
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||||
|
# e.g. to debug Maven itself, use
|
||||||
|
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||||
|
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if [ -z "$MAVEN_SKIP_RC" ] ; then
|
||||||
|
|
||||||
|
if [ -f /etc/mavenrc ] ; then
|
||||||
|
. /etc/mavenrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$HOME/.mavenrc" ] ; then
|
||||||
|
. "$HOME/.mavenrc"
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
# OS specific support. $var _must_ be set to either true or false.
|
||||||
|
cygwin=false;
|
||||||
|
darwin=false;
|
||||||
|
mingw=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN*) cygwin=true ;;
|
||||||
|
MINGW*) mingw=true;;
|
||||||
|
Darwin*) darwin=true
|
||||||
|
#
|
||||||
|
# Look for the Apple JDKs first to preserve the existing behaviour, and then look
|
||||||
|
# for the new JDKs provided by Oracle.
|
||||||
|
#
|
||||||
|
if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then
|
||||||
|
#
|
||||||
|
# Apple JDKs
|
||||||
|
#
|
||||||
|
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ] ; then
|
||||||
|
#
|
||||||
|
# Apple JDKs
|
||||||
|
#
|
||||||
|
export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ] ; then
|
||||||
|
#
|
||||||
|
# Oracle JDKs
|
||||||
|
#
|
||||||
|
export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ] && [ -x "/usr/libexec/java_home" ]; then
|
||||||
|
#
|
||||||
|
# Apple JDKs
|
||||||
|
#
|
||||||
|
export JAVA_HOME=`/usr/libexec/java_home`
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ] ; then
|
||||||
|
if [ -r /etc/gentoo-release ] ; then
|
||||||
|
JAVA_HOME=`java-config --jre-home`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$M2_HOME" ] ; then
|
||||||
|
## resolve links - $0 may be a link to maven's home
|
||||||
|
PRG="$0"
|
||||||
|
|
||||||
|
# need this for relative symlinks
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG="`dirname "$PRG"`/$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
saveddir=`pwd`
|
||||||
|
|
||||||
|
M2_HOME=`dirname "$PRG"`/..
|
||||||
|
|
||||||
|
# make it fully qualified
|
||||||
|
M2_HOME=`cd "$M2_HOME" && pwd`
|
||||||
|
|
||||||
|
cd "$saveddir"
|
||||||
|
# echo Using m2 at $M2_HOME
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||||
|
if $cygwin ; then
|
||||||
|
[ -n "$M2_HOME" ] &&
|
||||||
|
M2_HOME=`cygpath --unix "$M2_HOME"`
|
||||||
|
[ -n "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||||
|
[ -n "$CLASSPATH" ] &&
|
||||||
|
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Migwn, ensure paths are in UNIX format before anything is touched
|
||||||
|
if $mingw ; then
|
||||||
|
[ -n "$M2_HOME" ] &&
|
||||||
|
M2_HOME="`(cd "$M2_HOME"; pwd)`"
|
||||||
|
[ -n "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
|
||||||
|
# TODO classpath?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ]; then
|
||||||
|
javaExecutable="`which javac`"
|
||||||
|
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
|
||||||
|
# readlink(1) is not available as standard on Solaris 10.
|
||||||
|
readLink=`which readlink`
|
||||||
|
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
|
||||||
|
if $darwin ; then
|
||||||
|
javaHome="`dirname \"$javaExecutable\"`"
|
||||||
|
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
|
||||||
|
else
|
||||||
|
javaExecutable="`readlink -f \"$javaExecutable\"`"
|
||||||
|
fi
|
||||||
|
javaHome="`dirname \"$javaExecutable\"`"
|
||||||
|
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
|
||||||
|
JAVA_HOME="$javaHome"
|
||||||
|
export JAVA_HOME
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVACMD" ] ; then
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
|
else
|
||||||
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD="`which java`"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
echo "Error: JAVA_HOME is not defined correctly." >&2
|
||||||
|
echo " We cannot execute $JAVACMD" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ] ; then
|
||||||
|
echo "Warning: JAVA_HOME environment variable is not set."
|
||||||
|
fi
|
||||||
|
|
||||||
|
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
||||||
|
|
||||||
|
# For Cygwin, switch paths to Windows format before running java
|
||||||
|
if $cygwin; then
|
||||||
|
[ -n "$M2_HOME" ] &&
|
||||||
|
M2_HOME=`cygpath --path --windows "$M2_HOME"`
|
||||||
|
[ -n "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
|
||||||
|
[ -n "$CLASSPATH" ] &&
|
||||||
|
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# traverses directory structure from process work directory to filesystem root
|
||||||
|
# first directory with .mvn subdirectory is considered project base directory
|
||||||
|
find_maven_basedir() {
|
||||||
|
local basedir=$(pwd)
|
||||||
|
local wdir=$(pwd)
|
||||||
|
while [ "$wdir" != '/' ] ; do
|
||||||
|
if [ -d "$wdir"/.mvn ] ; then
|
||||||
|
basedir=$wdir
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
wdir=$(cd "$wdir/.."; pwd)
|
||||||
|
done
|
||||||
|
echo "${basedir}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# concatenates all lines of a file
|
||||||
|
concat_lines() {
|
||||||
|
if [ -f "$1" ]; then
|
||||||
|
echo "$(tr -s '\n' ' ' < "$1")"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)}
|
||||||
|
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
|
||||||
|
|
||||||
|
# Provide a "standardized" way to retrieve the CLI args that will
|
||||||
|
# work with both Windows and non-Windows executions.
|
||||||
|
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
|
||||||
|
export MAVEN_CMD_LINE_ARGS
|
||||||
|
|
||||||
|
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||||
|
|
||||||
|
echo "Running version check"
|
||||||
|
VERSION=$( sed '\!<parent!,\!</parent!d' `dirname $0`/pom.xml | grep '<version' | head -1 | sed -e 's/.*<version>//' -e 's!</version>.*$!!' )
|
||||||
|
echo "The found version is [${VERSION}]"
|
||||||
|
|
||||||
|
if echo $VERSION | egrep -q 'M|RC'; then
|
||||||
|
echo Activating \"milestone\" profile for version=\"$VERSION\"
|
||||||
|
echo $MAVEN_ARGS | grep -q milestone || MAVEN_ARGS="$MAVEN_ARGS -Pmilestone"
|
||||||
|
else
|
||||||
|
echo Deactivating \"milestone\" profile for version=\"$VERSION\"
|
||||||
|
echo $MAVEN_ARGS | grep -q milestone && MAVEN_ARGS=$(echo $MAVEN_ARGS | sed -e 's/-Pmilestone//')
|
||||||
|
fi
|
||||||
|
|
||||||
|
if echo $VERSION | egrep -q '[0-9]*\.[0-9]*\.[0-9]*$|RELEASE'; then
|
||||||
|
echo Activating \"central\" profile for version=\"$VERSION\"
|
||||||
|
echo $MAVEN_ARGS | grep -q milestone || MAVEN_ARGS="$MAVEN_ARGS -Pcentral"
|
||||||
|
else
|
||||||
|
echo Deactivating \"central\" profile for version=\"$VERSION\"
|
||||||
|
echo $MAVEN_ARGS | grep -q central && MAVEN_ARGS=$(echo $MAVEN_ARGS | sed -e 's/-Pcentral//')
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$JAVACMD" \
|
||||||
|
$MAVEN_OPTS \
|
||||||
|
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
|
||||||
|
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||||
|
${WRAPPER_LAUNCHER} ${MAVEN_ARGS} "$@"
|
||||||
145
mvnw.cmd
vendored
Normal file
145
mvnw.cmd
vendored
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
@REM Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
@REM or more contributor license agreements. See the NOTICE file
|
||||||
|
@REM distributed with this work for additional information
|
||||||
|
@REM regarding copyright ownership. The ASF licenses this file
|
||||||
|
@REM to you under the Apache License, Version 2.0 (the
|
||||||
|
@REM "License"); you may not use this file except in compliance
|
||||||
|
@REM with the License. You may obtain a copy of the License at
|
||||||
|
@REM
|
||||||
|
@REM https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@REM
|
||||||
|
@REM Unless required by applicable law or agreed to in writing,
|
||||||
|
@REM software distributed under the License is distributed on an
|
||||||
|
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
@REM KIND, either express or implied. See the License for the
|
||||||
|
@REM specific language governing permissions and limitations
|
||||||
|
@REM under the License.
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
@REM Maven2 Start Up Batch script
|
||||||
|
@REM
|
||||||
|
@REM Required ENV vars:
|
||||||
|
@REM JAVA_HOME - location of a JDK home dir
|
||||||
|
@REM
|
||||||
|
@REM Optional ENV vars
|
||||||
|
@REM M2_HOME - location of maven2's installed home dir
|
||||||
|
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
|
||||||
|
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
|
||||||
|
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||||
|
@REM e.g. to debug Maven itself, use
|
||||||
|
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||||
|
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
|
||||||
|
@echo off
|
||||||
|
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
|
||||||
|
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
||||||
|
|
||||||
|
@REM set %HOME% to equivalent of $HOME
|
||||||
|
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
||||||
|
|
||||||
|
@REM Execute a user defined script before this one
|
||||||
|
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
|
||||||
|
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
|
||||||
|
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
|
||||||
|
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
|
||||||
|
:skipRcPre
|
||||||
|
|
||||||
|
@setlocal
|
||||||
|
|
||||||
|
set ERROR_CODE=0
|
||||||
|
|
||||||
|
@REM To isolate internal variables from possible post scripts, we use another setlocal
|
||||||
|
@setlocal
|
||||||
|
|
||||||
|
@REM ==== START VALIDATION ====
|
||||||
|
if not "%JAVA_HOME%" == "" goto OkJHome
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Error: JAVA_HOME not found in your environment. >&2
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||||
|
echo location of your Java installation. >&2
|
||||||
|
echo.
|
||||||
|
goto error
|
||||||
|
|
||||||
|
:OkJHome
|
||||||
|
if exist "%JAVA_HOME%\bin\java.exe" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Error: JAVA_HOME is set to an invalid directory. >&2
|
||||||
|
echo JAVA_HOME = "%JAVA_HOME%" >&2
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||||
|
echo location of your Java installation. >&2
|
||||||
|
echo.
|
||||||
|
goto error
|
||||||
|
|
||||||
|
@REM ==== END VALIDATION ====
|
||||||
|
|
||||||
|
:init
|
||||||
|
|
||||||
|
set MAVEN_CMD_LINE_ARGS=%*
|
||||||
|
|
||||||
|
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
|
||||||
|
@REM Fallback to current working directory if not found.
|
||||||
|
|
||||||
|
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
|
||||||
|
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
|
||||||
|
|
||||||
|
set EXEC_DIR=%CD%
|
||||||
|
set WDIR=%EXEC_DIR%
|
||||||
|
:findBaseDir
|
||||||
|
IF EXIST "%WDIR%"\.mvn goto baseDirFound
|
||||||
|
cd ..
|
||||||
|
IF "%WDIR%"=="%CD%" goto baseDirNotFound
|
||||||
|
set WDIR=%CD%
|
||||||
|
goto findBaseDir
|
||||||
|
|
||||||
|
:baseDirFound
|
||||||
|
set MAVEN_PROJECTBASEDIR=%WDIR%
|
||||||
|
cd "%EXEC_DIR%"
|
||||||
|
goto endDetectBaseDir
|
||||||
|
|
||||||
|
:baseDirNotFound
|
||||||
|
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
|
||||||
|
cd "%EXEC_DIR%"
|
||||||
|
|
||||||
|
:endDetectBaseDir
|
||||||
|
|
||||||
|
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
|
||||||
|
|
||||||
|
@setlocal EnableExtensions EnableDelayedExpansion
|
||||||
|
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
|
||||||
|
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
|
||||||
|
|
||||||
|
:endReadAdditionalConfig
|
||||||
|
|
||||||
|
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
||||||
|
|
||||||
|
set WRAPPER_JAR="".\.mvn\wrapper\maven-wrapper.jar""
|
||||||
|
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||||
|
|
||||||
|
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
|
||||||
|
if ERRORLEVEL 1 goto error
|
||||||
|
goto end
|
||||||
|
|
||||||
|
:error
|
||||||
|
set ERROR_CODE=1
|
||||||
|
|
||||||
|
:end
|
||||||
|
@endlocal & set ERROR_CODE=%ERROR_CODE%
|
||||||
|
|
||||||
|
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
|
||||||
|
@REM check for post script, once with legacy .bat ending and once with .cmd ending
|
||||||
|
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
|
||||||
|
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
|
||||||
|
:skipRcPost
|
||||||
|
|
||||||
|
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
|
||||||
|
if "%MAVEN_BATCH_PAUSE%" == "on" pause
|
||||||
|
|
||||||
|
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
|
||||||
|
|
||||||
|
exit /B %ERROR_CODE%
|
||||||
499
pom.xml
Normal file
499
pom.xml
Normal file
@@ -0,0 +1,499 @@
|
|||||||
|
<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>
|
||||||
|
|
||||||
|
<groupId>org.springframework.grpc</groupId>
|
||||||
|
<artifactId>spring-grpc</artifactId>
|
||||||
|
<version>0.1.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<url>https://github.com/spring-projects-experimental/spring-grpc</url>
|
||||||
|
|
||||||
|
<name>Spring Grpc</name>
|
||||||
|
<description>Building Grpc applications with Spring Boot</description>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>spring-grpc-docs</module>
|
||||||
|
<module>spring-grpc-bom</module>
|
||||||
|
<module>spring-grpc-core</module>
|
||||||
|
<module>spring-grpc-test</module>
|
||||||
|
<module>spring-grpc-spring-boot-autoconfigure</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
<organization>
|
||||||
|
<name>Broadcom Inc.</name>
|
||||||
|
<url>https://spring.io</url>
|
||||||
|
</organization>
|
||||||
|
<scm>
|
||||||
|
<url>https://github.com/spring-projects-experimental/spring-grpc</url>
|
||||||
|
<connection>git://github.com/spring-projects-experimental/spring-grpc.git</connection>
|
||||||
|
<developerConnection>git@github.com:spring-projects-experimental/spring-grpc.git</developerConnection>
|
||||||
|
</scm>
|
||||||
|
<issueManagement>
|
||||||
|
<system>Github Issues</system>
|
||||||
|
<url>https://github.com/spring-projects-experimental/spring-grpc/issues</url>
|
||||||
|
</issueManagement>
|
||||||
|
<ciManagement>
|
||||||
|
<system>Github Actions</system>
|
||||||
|
<url>https://github.com/spring-projects-experimental/spring-grpc/actions</url>
|
||||||
|
</ciManagement>
|
||||||
|
<distributionManagement>
|
||||||
|
<downloadUrl>https://github.com/spring-projects-experimental/spring-grpc</downloadUrl>
|
||||||
|
<site>
|
||||||
|
<id>spring-docs</id>
|
||||||
|
<url>scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-grpc/docs/${project.artifactId}/${project.version}</url>
|
||||||
|
</site>
|
||||||
|
<repository>
|
||||||
|
<id>sonatype-nexus-staging</id>
|
||||||
|
<name>Nexus Release Repository</name>
|
||||||
|
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||||
|
</repository>
|
||||||
|
<snapshotRepository>
|
||||||
|
<id>repo.spring.io</id>
|
||||||
|
<url>https://repo.spring.io/libs-snapshot-local</url>
|
||||||
|
<releases>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</releases>
|
||||||
|
</snapshotRepository>
|
||||||
|
</distributionManagement>
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>Apache 2.0</name>
|
||||||
|
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||||
|
<distribution>repo</distribution>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
<java.version>17</java.version>
|
||||||
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
|
|
||||||
|
<!-- production dependencies -->
|
||||||
|
<spring-cloud-function-context.version>4.1.3</spring-cloud-function-context.version>
|
||||||
|
<spring-boot.version>3.3.3</spring-boot.version>
|
||||||
|
<spring-framework.version>6.1.4</spring-framework.version>
|
||||||
|
|
||||||
|
<!-- Protobuf -->
|
||||||
|
<protobuf-java.version>3.25.2</protobuf-java.version>
|
||||||
|
<grpc.version>1.63.0</grpc.version>
|
||||||
|
|
||||||
|
<!-- testing dependencies -->
|
||||||
|
<httpclient5.version>5.3.1</httpclient5.version>
|
||||||
|
|
||||||
|
<!-- testing dependencies -->
|
||||||
|
<testcontainers.version>1.20.1</testcontainers.version>
|
||||||
|
<testcontainers.opensearch.version>2.0.1</testcontainers.opensearch.version>
|
||||||
|
|
||||||
|
<!-- documentation dependencies -->
|
||||||
|
<io.spring.maven.antora-version>0.0.4</io.spring.maven.antora-version>
|
||||||
|
<asciidoctorj-pdf.version>1.6.2</asciidoctorj-pdf.version> <!-- FIXME build failure with
|
||||||
|
version 2.3.9 -->
|
||||||
|
<asciidoctorj-epub.version>1.5.1</asciidoctorj-epub.version>
|
||||||
|
<spring-asciidoctor-backends.version>0.0.6</spring-asciidoctor-backends.version>
|
||||||
|
|
||||||
|
<!-- plugin versions -->
|
||||||
|
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
|
||||||
|
<maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
|
||||||
|
<maven-failsafe-plugin.version>3.1.2</maven-failsafe-plugin.version>
|
||||||
|
<maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>
|
||||||
|
<maven-source-plugin.version>3.3.0</maven-source-plugin.version>
|
||||||
|
<jacoco-maven-plugin.version>0.8.10</jacoco-maven-plugin.version>
|
||||||
|
<flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version>
|
||||||
|
<maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>
|
||||||
|
<asciidoctor-maven-plugin.version>2.2.3</asciidoctor-maven-plugin.version>
|
||||||
|
<maven-assembly-plugin.version>3.7.0</maven-assembly-plugin.version>
|
||||||
|
<maven-dependency-plugin.version>3.5.0</maven-dependency-plugin.version>
|
||||||
|
<!-- <maven-site-plugin.version>3.12.1</maven-site-plugin.version> -->
|
||||||
|
<maven-site-plugin.version>4.0.0-M13</maven-site-plugin.version>
|
||||||
|
<maven-project-info-reports-plugin.version>3.4.5</maven-project-info-reports-plugin.version>
|
||||||
|
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
|
||||||
|
<spring-javaformat-maven-plugin.version>0.0.39</spring-javaformat-maven-plugin.version>
|
||||||
|
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>io.spring.javaformat</groupId>
|
||||||
|
<artifactId>spring-javaformat-maven-plugin</artifactId>
|
||||||
|
<version>${spring-javaformat-maven-plugin.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>validate</phase>
|
||||||
|
<inherited>true</inherited>
|
||||||
|
<goals>
|
||||||
|
<goal>validate</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-site-plugin</artifactId>
|
||||||
|
<version>${maven-site-plugin.version}</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>${maven-compiler-plugin.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<release>${java.version}</release>
|
||||||
|
<compilerArgs>
|
||||||
|
<compilerArg>-parameters</compilerArg>
|
||||||
|
</compilerArgs>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>${maven-surefire-plugin.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<argLine>${surefireArgLine}</argLine>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<version>${maven-jar-plugin.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<archive>
|
||||||
|
<manifestEntries>
|
||||||
|
<Implementation-Title>${project.artifactId}</Implementation-Title>
|
||||||
|
<Implementation-Version>${project.version}</Implementation-Version>
|
||||||
|
</manifestEntries>
|
||||||
|
</archive>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
|
<version>${maven-source-plugin.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>generate-sources</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>flatten-maven-plugin</artifactId>
|
||||||
|
<version>${flatten-maven-plugin.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>flatten</id>
|
||||||
|
<phase>process-resources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>flatten</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<updatePomFile>true</updatePomFile>
|
||||||
|
<flattenMode>ossrh</flattenMode>
|
||||||
|
<pomElements>
|
||||||
|
<distributionManagement>remove</distributionManagement>
|
||||||
|
<dependencyManagement>remove</dependencyManagement>
|
||||||
|
<repositories>remove</repositories>
|
||||||
|
<scm>keep</scm>
|
||||||
|
<url>keep</url>
|
||||||
|
<organization>resolve</organization>
|
||||||
|
</pomElements>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>clean</id>
|
||||||
|
<phase>clean</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>clean</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
|
<version>${maven-deploy-plugin.version}</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>license</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>false</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.mycila</groupId>
|
||||||
|
<artifactId>license-maven-plugin</artifactId>
|
||||||
|
<version>4.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>validate</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>check</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<properties>
|
||||||
|
<owner>the original author or authors.</owner>
|
||||||
|
<email />
|
||||||
|
<year>2024</year>
|
||||||
|
</properties>
|
||||||
|
<licenseSets>
|
||||||
|
<licenseSet>
|
||||||
|
<inlineHeader>
|
||||||
|
<!-- @formatter:off --> Copyright 2023 - ${year} the original author or
|
||||||
|
authors. Licensed under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0 Unless required
|
||||||
|
by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS"
|
||||||
|
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||||
|
express or implied. See the License for the specific
|
||||||
|
language governing permissions and limitations under the
|
||||||
|
License. <!-- @formatter:on -->
|
||||||
|
</inlineHeader>
|
||||||
|
<excludes>
|
||||||
|
<exclude>**/.antlr/**</exclude>
|
||||||
|
<exclude>**/aot.factories</exclude>
|
||||||
|
<exclude>**/.sdkmanrc</exclude>
|
||||||
|
<exclude>**/*.adoc</exclude>
|
||||||
|
<exclude>**/*.puml</exclude>
|
||||||
|
<exclude>**/pom.xml</exclude>
|
||||||
|
<exclude>**/*.properties</exclude>
|
||||||
|
<exclude>**/*.yaml</exclude>
|
||||||
|
<exclude>**/*.yml</exclude>
|
||||||
|
<exclude>**/*.map</exclude>
|
||||||
|
<exclude>**/*.html</exclude>
|
||||||
|
<exclude>**/*.xhtml</exclude>
|
||||||
|
<exclude>**/*.jsp</exclude>
|
||||||
|
<exclude>**/*.js</exclude>
|
||||||
|
<exclude>**/*.css</exclude>
|
||||||
|
<exclude>**/*.txt</exclude>
|
||||||
|
<exclude>**/*.xjb</exclude>
|
||||||
|
<exclude>**/*.ftl</exclude>
|
||||||
|
<exclude>**/*.xsd</exclude>
|
||||||
|
<exclude>**/*.xml</exclude>
|
||||||
|
<exclude>**/*.sh</exclude>
|
||||||
|
<exclude>**/generated/**</exclude>
|
||||||
|
<exclude>**/Dockerfile</exclude>
|
||||||
|
</excludes>
|
||||||
|
</licenseSet>
|
||||||
|
</licenseSets>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>javadoc</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>false</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>${maven-javadoc-plugin.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<excludePackageNames>org.springframework.grpc.sample.*</excludePackageNames>
|
||||||
|
<overview>
|
||||||
|
${project.basedir}/spring-grpc-docs/src/main/javadoc/overview.html</overview>
|
||||||
|
<detectJavaApiLink>false</detectJavaApiLink>
|
||||||
|
<doclint>none</doclint>
|
||||||
|
<!-- <doclint>all,-missing</doclint>-->
|
||||||
|
<quiet>true</quiet>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>generate-javadocs</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>generate-aggregate-javadocs</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>aggregate</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>integration-tests</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>false</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-failsafe-plugin</artifactId>
|
||||||
|
<version>${maven-failsafe-plugin.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>integration-test</goal>
|
||||||
|
<goal>verify</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>test-coverage</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<version>${jacoco-maven-plugin.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>prepare-agent</id>
|
||||||
|
<goals>
|
||||||
|
<goal>prepare-agent</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>report</id>
|
||||||
|
<goals>
|
||||||
|
<goal>report</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>staging</id>
|
||||||
|
<distributionManagement>
|
||||||
|
<repository>
|
||||||
|
<id>repo.spring.io</id>
|
||||||
|
<url>https://repo.spring.io/libs-staging-local</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
</distributionManagement>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>milestone</id>
|
||||||
|
<distributionManagement>
|
||||||
|
<repository>
|
||||||
|
<id>repo.spring.io</id>
|
||||||
|
<url>https://repo.spring.io/libs-milestone-local</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
</distributionManagement>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-dependencies</artifactId>
|
||||||
|
<version>${spring-boot.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.protobuf</groupId>
|
||||||
|
<artifactId>protobuf-bom</artifactId>
|
||||||
|
<version>${protobuf-java.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.grpc</groupId>
|
||||||
|
<artifactId>grpc-bom</artifactId>
|
||||||
|
<version>${grpc.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>maven-central</id>
|
||||||
|
<url>https://repo.maven.apache.org/maven2/</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
<releases>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</releases>
|
||||||
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>spring-snapshots</id>
|
||||||
|
<name>Spring Snapshots</name>
|
||||||
|
<url>https://repo.spring.io/snapshot</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</snapshots>
|
||||||
|
<releases>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</releases>
|
||||||
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>spring-milestones</id>
|
||||||
|
<name>Spring Milestones</name>
|
||||||
|
<url>https://repo.spring.io/milestone</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<id>dsyer</id>
|
||||||
|
<name>Dave Syer</name>
|
||||||
|
<email>david.syer at broadcom.com</email>
|
||||||
|
<organization>Broadcom</organization>
|
||||||
|
<organizationUrl>http://www.spring.io</organizationUrl>
|
||||||
|
<roles>
|
||||||
|
<role>lead</role>
|
||||||
|
</roles>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
|
||||||
|
<reporting>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
<version>${maven-project-info-reports-plugin.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<skip>true</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</reporting>
|
||||||
|
|
||||||
|
</project>
|
||||||
90
spring-grpc-bom/pom.xml
Normal file
90
spring-grpc-bom/pom.xml
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
<?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.springframework.grpc</groupId>
|
||||||
|
<artifactId>spring-grpc</artifactId>
|
||||||
|
<version>0.1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>spring-grpc-bom</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<name>Spring Grpc BOM</name>
|
||||||
|
<description>Bill of Materials POM (BOM) for the Spring Grpc modules</description>
|
||||||
|
|
||||||
|
<url>https://github.com/spring-projects-experimental/spring-grpc</url>
|
||||||
|
|
||||||
|
<scm>
|
||||||
|
<url>https://github.com/spring-projects-experimental/spring-grpc</url>
|
||||||
|
<connection>git://github.com/spring-projects-experimental/spring-grpc.git</connection>
|
||||||
|
<developerConnection>git@github.com:spring-projects-experimental/spring-grpc.git</developerConnection>
|
||||||
|
</scm>
|
||||||
|
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.grpc</groupId>
|
||||||
|
<artifactId>spring-grpc-core</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Utilities -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.grpc</groupId>
|
||||||
|
<artifactId>spring-grpc-test</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.grpc</groupId>
|
||||||
|
<artifactId>spring-grpc-spring-boot-autoconfigure</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>flatten-maven-plugin</artifactId>
|
||||||
|
<version>${flatten-maven-plugin.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>flatten</id>
|
||||||
|
<phase>process-resources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>flatten</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<updatePomFile>true</updatePomFile>
|
||||||
|
<flattenMode>ossrh</flattenMode>
|
||||||
|
<pomElements>
|
||||||
|
<distributionManagement>remove</distributionManagement>
|
||||||
|
<dependencyManagement>keep</dependencyManagement>
|
||||||
|
<repositories>remove</repositories>
|
||||||
|
<scm>keep</scm>
|
||||||
|
<url>keep</url>
|
||||||
|
<organization>resolve</organization>
|
||||||
|
</pomElements>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>clean</id>
|
||||||
|
<phase>clean</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>clean</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
44
spring-grpc-core/pom.xml
Normal file
44
spring-grpc-core/pom.xml
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<?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/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.springframework.grpc</groupId>
|
||||||
|
<artifactId>spring-grpc</artifactId>
|
||||||
|
<version>0.1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
<artifactId>spring-grpc-core</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<name>Spring Grpc Core</name>
|
||||||
|
<description>Core domgrpcn for Grpc programming</description>
|
||||||
|
<url>https://github.com/spring-projects-experimental/spring-grpc</url>
|
||||||
|
|
||||||
|
<scm>
|
||||||
|
<url>https://github.com/spring-projects-experimental/spring-grpc</url>
|
||||||
|
<connection>git://github.com/spring-projects-experimental/spring-grpc.git</connection>
|
||||||
|
<developerConnection>git@github.com:spring-projects-experimental/spring-grpc.git</developerConnection>
|
||||||
|
</scm>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-context</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.grpc</groupId>
|
||||||
|
<artifactId>grpc-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- test dependencies -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2024-2024 the original author or authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package org.springframework.grpc;
|
||||||
69
spring-grpc-docs/pom.xml
Normal file
69
spring-grpc-docs/pom.xml
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
<?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/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.springframework.grpc</groupId>
|
||||||
|
<artifactId>spring-grpc</artifactId>
|
||||||
|
<version>0.1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
<artifactId>spring-grpc-docs</artifactId>
|
||||||
|
<name>Spring Grpc Docs</name>
|
||||||
|
<description>Spring Grpc documentation</description>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>io.spring.maven.antora</groupId>
|
||||||
|
<artifactId>antora-maven-plugin</artifactId>
|
||||||
|
<version>${io.spring.maven.antora-version}</version>
|
||||||
|
<extensions>true</extensions>
|
||||||
|
<configuration>
|
||||||
|
<playbook>src/main/antora/antora-playbook.yml</playbook>
|
||||||
|
<packages>
|
||||||
|
<package>@antora/atlas-extension@1.0.0-alpha.1</package>
|
||||||
|
<package>@antora/collector-extension@1.0.0-alpha.3</package>
|
||||||
|
<package>@asciidoctor/tabs@1.0.0-beta.3</package>
|
||||||
|
<package>@springio/antora-extensions@1.5.0</package>
|
||||||
|
<package>@springio/asciidoctor-extensions@1.0.0-alpha.9</package>
|
||||||
|
<package>@djencks/asciidoctor-mathjax@0.0.9</package>
|
||||||
|
</packages>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>io.spring.maven.antora</groupId>
|
||||||
|
<artifactId>antora-component-version-maven-plugin</artifactId>
|
||||||
|
<version>${io.spring.maven.antora-version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>antora-component-version</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>${maven-assembly-plugin.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>src/assembly/javadocs.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
<finalName>spring-grpc-${project.version}</finalName>
|
||||||
|
<appendAssemblyId>true</appendAssemblyId>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
|
<version>${maven-deploy-plugin.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<skip>true</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
15
spring-grpc-docs/src/assembly/javadocs.xml
Normal file
15
spring-grpc-docs/src/assembly/javadocs.xml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
|
||||||
|
<id>docs</id>
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<directory>../target/site/apidocs</directory>
|
||||||
|
<outputDirectory>api</outputDirectory>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
</assembly>
|
||||||
39
spring-grpc-docs/src/main/antora/antora-playbook.yml
Normal file
39
spring-grpc-docs/src/main/antora/antora-playbook.yml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# PACKAGES antora@3.2.0-alpha.2 @antora/atlas-extension:1.0.0-alpha.1 @antora/collector-extension@1.0.0-alpha.3 @springio/antora-extensions@1.1.0-alpha.2 @asciidoctor/tabs@1.0.0-alpha.12 @opendevise/antora-release-line-extension@1.0.0-alpha.2
|
||||||
|
#
|
||||||
|
# The purpose of this Antora playbook is to build the docs in the current branch.
|
||||||
|
antora:
|
||||||
|
extensions:
|
||||||
|
- '@antora/collector-extension'
|
||||||
|
- require: '@springio/antora-extensions/root-component-extension'
|
||||||
|
root_component_name: 'grpc'
|
||||||
|
site:
|
||||||
|
title: Spring Grpc Reference
|
||||||
|
url: https://docs.spring.io/spring-grpc/reference
|
||||||
|
content:
|
||||||
|
sources:
|
||||||
|
- url: ./../../../..
|
||||||
|
branches: HEAD
|
||||||
|
start_path: spring-grpc-docs/src/main/antora
|
||||||
|
worktrees: true
|
||||||
|
asciidoc:
|
||||||
|
attributes:
|
||||||
|
page-pagination: ''
|
||||||
|
hide-uri-scheme: '@'
|
||||||
|
tabs-sync-option: '@'
|
||||||
|
chomp: 'all'
|
||||||
|
stem: 'asciimath'
|
||||||
|
extensions:
|
||||||
|
- '@asciidoctor/tabs'
|
||||||
|
- '@springio/asciidoctor-extensions'
|
||||||
|
- '@djencks/asciidoctor-mathjax'
|
||||||
|
sourcemap: true
|
||||||
|
urls:
|
||||||
|
latest_version_segment: ''
|
||||||
|
runtime:
|
||||||
|
log:
|
||||||
|
failure_level: warn
|
||||||
|
format: pretty
|
||||||
|
ui:
|
||||||
|
bundle:
|
||||||
|
url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.3.6/ui-bundle.zip
|
||||||
|
snapshot: true
|
||||||
12
spring-grpc-docs/src/main/antora/antora.yml
Normal file
12
spring-grpc-docs/src/main/antora/antora.yml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
name: grpc
|
||||||
|
version: true
|
||||||
|
title: Spring Grpc
|
||||||
|
nav:
|
||||||
|
- modules/ROOT/nav.adoc
|
||||||
|
ext:
|
||||||
|
collector:
|
||||||
|
- run:
|
||||||
|
command: mvnw process-resources
|
||||||
|
local: true
|
||||||
|
scan:
|
||||||
|
dir: spring-grpc-docs/target/classes/antora-resources
|
||||||
6
spring-grpc-docs/src/main/antora/modules/ROOT/nav.adoc
Normal file
6
spring-grpc-docs/src/main/antora/modules/ROOT/nav.adoc
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
* xref:index.adoc[Overview]
|
||||||
|
* xref:concepts.adoc[Grpc Concepts]
|
||||||
|
* xref:getting-started.adoc[Getting Started]
|
||||||
|
|
||||||
|
* xref:contribution-guidelines.adoc[Contribution Guidelines]
|
||||||
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
[[concepts]]
|
||||||
|
= Grpc Concepts
|
||||||
|
|
||||||
|
This section describes core concepts that Spring Grpc uses. We recommend reading it closely to understand the ideas behind how Spring Grpc is implemented.
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
[[contribution-guidelines]]
|
||||||
|
= Contribution Guidelines
|
||||||
|
|
||||||
|
== Code Formatting and Javadoc
|
||||||
|
|
||||||
|
Before submitting a PR, please run the following commands to ensure proper formatting and Javadoc processing
|
||||||
|
|
||||||
|
```
|
||||||
|
./mvnw spring-javaformat:apply javadoc:javadoc -Pjavadoc
|
||||||
|
```
|
||||||
|
|
||||||
|
The `-Pjavadoc` is a profile that enables Javadoc processing so as to avoid a long build time when developing.
|
||||||
|
|
||||||
|
== Contributing a New Grpc Model Implementation
|
||||||
|
|
||||||
|
This section outlines the steps for contributing a new Grpc model implementation.
|
||||||
|
Grpc models vary significantly, with diverse inputs and outputs -- from chat models that
|
||||||
|
translate text input into text output, to text-to-image models that generate images
|
||||||
|
from text descriptions.
|
||||||
|
Complex models may even handle multiple types of input and output, such as combining text,
|
||||||
|
images, and videos to produce mixed media output.
|
||||||
|
|
||||||
|
To contribute a new feature, adhere to the following steps:
|
||||||
|
|
||||||
|
. *Implement Auto-Configuration and a Spring Boot Starter*: This step involves creating the
|
||||||
|
necessary auto-configuration and Spring Boot Starter to easily instantiate the new model with
|
||||||
|
Spring Boot applications.
|
||||||
|
|
||||||
|
. *Write Tests*: All new classes should be accompanied by comprehensive tests.
|
||||||
|
Existing tests can serve as a useful reference for structuring and implementing your tests.
|
||||||
|
|
||||||
|
. *Document Your Contribution*: Ensure your documentation follows the existing format,
|
||||||
|
using the `spring-javaformat` plugin to format your code and Javadoc comments.
|
||||||
|
|
||||||
|
By following these guidelines, we can greatly expand the framework's range of supported models
|
||||||
|
while following a common implementation and documentation pattern.
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
[[getting-started]]
|
||||||
|
= Getting Started
|
||||||
|
|
||||||
|
This section offers jumping off points for how to get started using Spring Grpc.
|
||||||
|
|
||||||
|
You should follow the steps in each of the following section according to your needs.
|
||||||
|
|
||||||
|
NOTE: Spring Grpc supports Spring Boot 3.3.x
|
||||||
|
|
||||||
|
[[repositories]]
|
||||||
|
== Add Milestone and Snapshot Repositories
|
||||||
|
|
||||||
|
If you prefer to add the dependency snippets by hand, follow the directions in the following sections.
|
||||||
|
|
||||||
|
To use the Milestone and Snapshot version, you need to add references to the Spring Milestone and/or Snapshot repositories in your build file.
|
||||||
|
|
||||||
|
For Maven, add the following repository definitions as needed:
|
||||||
|
|
||||||
|
[source,xml]
|
||||||
|
----
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>spring-milestones</id>
|
||||||
|
<name>Spring Milestones</name>
|
||||||
|
<url>https://repo.spring.io/milestone</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>spring-snapshots</id>
|
||||||
|
<name>Spring Snapshots</name>
|
||||||
|
<url>https://repo.spring.io/snapshot</url>
|
||||||
|
<releases>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</releases>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
----
|
||||||
|
|
||||||
|
For Gradle, add the following repository definitions as needed:
|
||||||
|
|
||||||
|
[source,groovy]
|
||||||
|
----
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
maven { url 'https://repo.spring.io/milestone' }
|
||||||
|
maven { url 'https://repo.spring.io/snapshot' }
|
||||||
|
}
|
||||||
|
----
|
||||||
|
|
||||||
|
|
||||||
|
[[dependency-management]]
|
||||||
|
== Dependency Management
|
||||||
|
|
||||||
|
The Spring Grpc Bill of Materials (BOM) declares the recommended versions of all the dependencies used by a given release of Spring Grpc.
|
||||||
|
Using the BOM from your application’s build script avoids the need for you to specify and maintain the dependency versions yourself.
|
||||||
|
Instead, the version of the BOM you’re using determines the utilized dependency versions.
|
||||||
|
It also ensures that you’re using supported and tested versions of the dependencies by default, unless you choose to override them.
|
||||||
|
|
||||||
|
If you’re a Maven user, you can use the BOM by adding the following to your pom.xml file -
|
||||||
|
|
||||||
|
[source,xml]
|
||||||
|
----
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.ai</groupId>
|
||||||
|
<artifactId>spring-grpc-bom</artifactId>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
----
|
||||||
|
|
||||||
|
Gradle users can also use the Spring Grpc BOM by leveraging Gradle (5.0+) native support for declaring dependency constraints using a Maven BOM.
|
||||||
|
This is implemented by adding a 'platform' dependency handler method to the dependencies section of your Gradle build script.
|
||||||
|
As shown in the snippet below this can then be followed by version-less declarations of the Starter Dependencies for the one or more spring-grpc modules you wish to use, e.g. spring-grpc-openai.
|
||||||
|
|
||||||
|
[source,gradle]
|
||||||
|
----
|
||||||
|
dependencies {
|
||||||
|
implementation platform("org.springframework.ai:spring-grpc-bom:1.0.0-SNAPSHOT")
|
||||||
|
// Replace the following with the starter dependencies of specific modules you wish to use
|
||||||
|
implementation 'org.springframework.ai:spring-grpc-openai'
|
||||||
|
}
|
||||||
|
----
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
[[introduction]]
|
||||||
|
= Spring Grpc
|
||||||
|
|
||||||
|
The `Spring Grpc` project aims to streamline the development of Grpc applications.
|
||||||
|
|
||||||
|
The xref:concepts.adoc[concepts section] provides a high-level overview of Grpc concepts and their representation in Spring Grpc.
|
||||||
|
|
||||||
|
The xref:getting-started.adoc[Getting Started] section shows you how to create your first Grpc application.
|
||||||
|
Subsequent sections delve into each component and common use cases with a code-focused approach.
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
version: ${antora-component.version}
|
||||||
|
prerelease: ${antora-component.prerelease}
|
||||||
17
spring-grpc-docs/src/main/javadoc/overview.html
Normal file
17
spring-grpc-docs/src/main/javadoc/overview.html
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<p>
|
||||||
|
This document is the API specification for <a href="https://docs.spring.io/spring-grpc/reference" target="_top">Spring Grpc</a>
|
||||||
|
</p>
|
||||||
|
<div id="overviewBody">
|
||||||
|
<p>
|
||||||
|
For further API reference and developer documentation, see the
|
||||||
|
<a href="https://docs.spring.io/spring-grpc/reference/" target="_top">
|
||||||
|
Spring Grpc reference documentation</a>.
|
||||||
|
That documentation contains more detailed, developer-targeted
|
||||||
|
descriptions, with conceptual overviews, definitions of terms,
|
||||||
|
and working code examples.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
86
spring-grpc-spring-boot-autoconfigure/pom.xml
Normal file
86
spring-grpc-spring-boot-autoconfigure/pom.xml
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
<?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/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.springframework.grpc</groupId>
|
||||||
|
<artifactId>spring-grpc</artifactId>
|
||||||
|
<version>0.1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
<artifactId>spring-grpc-spring-boot-autoconfigure</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<name>Spring Grpc Auto Configuration</name>
|
||||||
|
<description>Spring Grpc Auto Configuration</description>
|
||||||
|
<url>https://github.com/spring-projects-experimental/spring-grpc</url>
|
||||||
|
|
||||||
|
<scm>
|
||||||
|
<url>https://github.com/spring-projects-experimental/spring-grpc</url>
|
||||||
|
<connection>git://github.com/spring-projects-experimental/spring-grpc.git</connection>
|
||||||
|
<developerConnection>git@github.com:spring-projects-experimental/spring-grpc.git</developerConnection>
|
||||||
|
</scm>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.protobuf</groupId>
|
||||||
|
<artifactId>protobuf-java</artifactId>
|
||||||
|
<version>${protobuf-java.version}</version>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- production dependencies -->
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.grpc</groupId>
|
||||||
|
<artifactId>spring-grpc-core</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- test dependencies -->
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.grpc</groupId>
|
||||||
|
<artifactId>spring-grpc-test</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-testcontainers</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.testcontainers</groupId>
|
||||||
|
<artifactId>testcontainers</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.awaitility</groupId>
|
||||||
|
<artifactId>awaitility</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-observation-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
||||||
52
spring-grpc-test/pom.xml
Normal file
52
spring-grpc-test/pom.xml
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<?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/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.springframework.grpc</groupId>
|
||||||
|
<artifactId>spring-grpc</artifactId>
|
||||||
|
<version>0.1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
<artifactId>spring-grpc-test</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<name>Spring Grpc Test</name>
|
||||||
|
<description>Test support for Grpc programming</description>
|
||||||
|
<url>https://github.com/spring-projects-experimental/spring-grpc</url>
|
||||||
|
|
||||||
|
<scm>
|
||||||
|
<url>https://github.com/spring-projects-experimental/spring-grpc</url>
|
||||||
|
<connection>git://github.com/spring-projects-experimental/spring-grpc.git</connection>
|
||||||
|
<developerConnection>git@github.com:spring-projects-experimental/spring-grpc.git</developerConnection>
|
||||||
|
</scm>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-webmvc</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.grpc</groupId>
|
||||||
|
<artifactId>spring-grpc-core</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>com.vaadin.external.google</groupId>
|
||||||
|
<artifactId>android-json</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
Reference in New Issue
Block a user