Skip to content

Commit

Permalink
update docker-related filee to ues jdk8
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 committed Mar 31, 2018
1 parent 177c010 commit 64037ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
set -euo pipefail

# GEN_DIR allows to share the entrypoint between Dockerfile and run-in-docker.sh (backward compatible)
GEN_DIR=${GEN_DIR:-/opt/swagger-codegen}
GEN_DIR=${GEN_DIR:-/opt/openapi-generator}
JAVA_OPTS=${JAVA_OPTS:-"-Xmx1024M -DloggerPath=conf/log4j.properties"}

cli="${GEN_DIR}/modules/swagger-codegen-cli"
codegen="${cli}/target/swagger-codegen-cli.jar"
cmdsrc="${cli}/src/main/java/io/swagger/codegen/cmd"
cli="${GEN_DIR}/modules/openapi-generator-cli"
codegen="${cli}/target/openapi-generator-cli.jar"
cmdsrc="${cli}/src/main/java/org/openapitools/codegen/cmd"

pattern="@Command(name = \"$1\""
if expr "x$1" : 'x[a-z][a-z-]*$' > /dev/null && fgrep -qe "$pattern" "$cmdsrc"/*.java || expr "$1" = 'help' > /dev/null; then
# If ${GEN_DIR} has been mapped elsewhere from default, and that location has not been built
if [[ ! -f "${codegen}" ]]; then
(cd "${GEN_DIR}" && exec mvn -am -pl "modules/swagger-codegen-cli" -Duser.home=$(dirname MAVEN_CONFIG) package)
(cd "${GEN_DIR}" && exec mvn -am -pl "modules/openapi-generator-cli" -Duser.home=$(dirname MAVEN_CONFIG) package)
fi
command=$1
shift
Expand Down
2 changes: 1 addition & 1 deletion run-in-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ docker run --rm -it \
-v "${PWD}:/gen" \
-v "${maven_cache_repo}:/var/maven/.m2/repository" \
--entrypoint /gen/docker-entrypoint.sh \
maven:3-jdk-7 "$@"
maven:3-jdk-8 "$@"

0 comments on commit 64037ee

Please sign in to comment.