Skip to content

ButterFaces/quarkus-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Using Quarkus and ButterFaces

Project is ON_HOLD - Reasons:

It works fine when using fast-jar or jvm mode.

Prerequisites

HINTS: Installing GraalVM on OSX

# install graalVM 11
$ brew install --cask graalvm/tap/graalvm-ce-java11

# show installed versions
$ /usr/libexec/java_home -v 11 -V 
Matching Java Virtual Machines (2):
    11.0.9.1 (x86_64) "AdoptOpenJDK" - "AdoptOpenJDK 11" /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
    11.0.9 (x86_64) "GraalVM Community" - "GraalVM CE 20.3.0" /Library/Java/JavaVirtualMachines/graalvm-ce-java11-20.3.0/Contents/Home
/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home

# uninstall adoptopenjdk11
$ brew uninstall --cask adoptopenjdk11

# set JAVA_HOME and GRAALVM_HOME
$ export JAVA_HOME=`/usr/libexec/java_home -v 11`
$ export GRAALVM_HOME=$JAVA_HOME

# try it out
$ java --version
openjdk 11.0.9 2020-10-20
OpenJDK Runtime Environment GraalVM CE 20.3.0 (build 11.0.9+10-jvmci-20.3-b06)
OpenJDK 64-Bit Server VM GraalVM CE 20.3.0 (build 11.0.9+10-jvmci-20.3-b06, mixed mode, sharing)

# on “graalvm-ce-<version>” can’t be opened because its integrity cannot be verified.
# see https://github.com/graalvm/homebrew-tap/issues/6
$ xattr -d com.apple.quarantine /Library/Java/JavaVirtualMachines/graalvm-ce-java11-20.3.0

# install native-image
$ ${GRAALVM_HOME}/bin/gu install native-image

Run it

maven

$ mvn quarkus:dev

executable jar

$ mvn clean package
$ java -jar target/quarkus-demo-*-runner.jar

native

$ mvn clean package -Pnative
$ ./target/quarkus-demo-1.0.0-SNAPSHOT-runner

Test it

curl http://localhost:8080/resteasy-jackson/quarks/

Docker it

native (from scratch)

$ DOCKER_BUILDKIT=1 docker build -f src/main/docker/Dockerfile.scratch -t butterfaces/quarkus-demo-scratch .
$ docker run -i --rm -p 8080:8080 butterfaces/quarkus-demo-scratch

native (from ubi-minimal)

$ DOCKER_BUILDKIT=1 docker build -f src/main/docker/Dockerfile.native -t butterfaces/quarkus-demo-native .
$ docker run -i --rm -p 8080:8080 butterfaces/quarkus-demo-native

jvm (fast-jar)

$ DOCKER_BUILDKIT=1 docker build -f src/main/docker/Dockerfile.fast-jar -t butterfaces/quarkus-demo-fast-jar .
$ docker run -i --rm -p 8080:8080 butterfaces/quarkus-demo-fast-jar

jvm (normal)

$ DOCKER_BUILDKIT=1 docker build -f src/main/docker/Dockerfile.jvm -t butterfaces/quarkus-demo-jvm .
$ docker run -i --rm -p 8080:8080 butterfaces/quarkus-demo-jvm

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published