Quarkus: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 1: | Line 1: | ||
{| | {| | ||
| valign="top" | | | valign="top" | | ||
< | <syntaxhighlight lang="bash"> | ||
export GRAALVM_HOME=/d/opt/cli/mandrel-java11-21.2.0.0-Final | export GRAALVM_HOME=/d/opt/cli/mandrel-java11-21.2.0.0-Final | ||
export PATH=$JAVA11_HOME/bin:$PATH:$GRAALVM_HOME/bin | export PATH=$JAVA11_HOME/bin:$PATH:$GRAALVM_HOME/bin | ||
export JAVA_HOME=$JAVA11_HOME | export JAVA_HOME=$JAVA11_HOME | ||
</ | </syntaxhighlight> | ||
'''OR''' | '''OR''' | ||
< | <syntaxhighlight lang="bash"> | ||
export GRAALVM_HOME=/d/opt/cli/graalvm-ce-java11-21.2.0 | export GRAALVM_HOME=/d/opt/cli/graalvm-ce-java11-21.2.0 | ||
export PATH=$JAVA11_HOME/bin:$PATH:$GRAALVM_HOME/bin | export PATH=$JAVA11_HOME/bin:$PATH:$GRAALVM_HOME/bin | ||
export JAVA_HOME=$JAVA11_HOME | export JAVA_HOME=$JAVA11_HOME | ||
gu install native-image | gu install native-image | ||
</ | </syntaxhighlight> | ||
| valign="top" | | | valign="top" | | ||
< | <syntaxhighlight lang="bat"> | ||
set GRAALVM_HOME=D:\opt\cli\mandrel-java11-21.2.0.0-Final | set GRAALVM_HOME=D:\opt\cli\mandrel-java11-21.2.0.0-Final | ||
set PATH=%JAVA11_HOME%/bin;%PATH%;%GRAALVM_HOME%/bin | set PATH=%JAVA11_HOME%/bin;%PATH%;%GRAALVM_HOME%/bin | ||
set JAVA_HOME=%JAVA11_HOME% | set JAVA_HOME=%JAVA11_HOME% | ||
</ | </syntaxhighlight> | ||
'''OR''' | '''OR''' | ||
< | <syntaxhighlight lang="bat"> | ||
set GRAALVM_HOME=D:\opt\cli\graalvm-ce-java11-21.2.0 | set GRAALVM_HOME=D:\opt\cli\graalvm-ce-java11-21.2.0 | ||
set PATH=%JAVA11_HOME%/bin;%PATH%;%GRAALVM_HOME%/bin | set PATH=%JAVA11_HOME%/bin;%PATH%;%GRAALVM_HOME%/bin | ||
set JAVA_HOME=%JAVA11_HOME% | set JAVA_HOME=%JAVA11_HOME% | ||
gu install native-image | gu install native-image | ||
</ | </syntaxhighlight> | ||
|} | |} | ||
==Quarkus Build== | ==Quarkus Build== | ||
< | <syntaxhighlight lang="bash"> | ||
git clone https://github.com/quarkusio/quarkus-quickstarts.git | git clone https://github.com/quarkusio/quarkus-quickstarts.git | ||
cd ./quarkus-quickstarts/getting-started | cd ./quarkus-quickstarts/getting-started | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="bash" highlight="3,4" line> | ||
# for windows 10 we should avoid symbolic link. instead of symbolic link | # for windows 10 we should avoid symbolic link. instead of symbolic link | ||
# we should use absolute project path either from command or gitbash | # we should use absolute project path either from command or gitbash | ||
Line 43: | Line 43: | ||
mvn verify -Pnative -Dquarkus.native.container-runtime=docker -e | mvn verify -Pnative -Dquarkus.native.container-runtime=docker -e | ||
mvn verify -Pnative -Dquarkus.native.container-build=true | mvn verify -Pnative -Dquarkus.native.container-build=true | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="bash" highlight="1,4" line> | ||
mvn compile quarkus:dev | mvn compile quarkus:dev | ||
mvn package -Pnative | mvn package -Pnative | ||
mvn verify -Pnative | mvn verify -Pnative | ||
mvn package | mvn package | ||
</ | </syntaxhighlight> | ||
==Maven Artifact== | ==Maven Artifact== | ||
< | <syntaxhighlight lang="bash"> | ||
mvn io.quarkus:quarkus-maven-plugin:2.1.3.Final:create \ | mvn io.quarkus:quarkus-maven-plugin:2.1.3.Final:create \ | ||
-DprojectGroupId=org.chorke.academia.rest \ | -DprojectGroupId=org.chorke.academia.rest \ | ||
Line 60: | Line 60: | ||
-Dpath="/hello" | -Dpath="/hello" | ||
cd getting-started | cd getting-started | ||
</ | </syntaxhighlight> | ||
==After Build== | ==After Build== | ||
< | <syntaxhighlight lang="bash"> | ||
: ' | : ' | ||
./quarkus-quickstarts/getting-started/target/ | ./quarkus-quickstarts/getting-started/target/ | ||
Line 90: | Line 90: | ||
java -jar target/quarkus-app/quarkus-run.jar | java -jar target/quarkus-app/quarkus-run.jar | ||
</ | </syntaxhighlight> | ||
==Configuring== | ==Configuring== | ||
< | <syntaxhighlight lang="properties"> | ||
quarkus.banner.path=/META-INF/chorke/academia.txt | quarkus.banner.path=/META-INF/chorke/academia.txt | ||
quarkus.banner.enabled=false | quarkus.banner.enabled=false | ||
</ | </syntaxhighlight> | ||
==Knowledge== | ==Knowledge== | ||
Line 244: | Line 244: | ||
* [[SDKMan]] | * [[SDKMan]] | ||
* [[Drools]] | * [[Drools]] | ||
|- | |||
| colspan="3" | | |||
---- | |||
|- | |||
| valign="top" | | |||
* [[Dropwizard]] | |||
| valign="top" | | |||
| valign="top" | | |||
|} | |} |
Latest revision as of 10:02, 26 October 2024
export GRAALVM_HOME=/d/opt/cli/mandrel-java11-21.2.0.0-Final
export PATH=$JAVA11_HOME/bin:$PATH:$GRAALVM_HOME/bin
export JAVA_HOME=$JAVA11_HOME
OR export GRAALVM_HOME=/d/opt/cli/graalvm-ce-java11-21.2.0
export PATH=$JAVA11_HOME/bin:$PATH:$GRAALVM_HOME/bin
export JAVA_HOME=$JAVA11_HOME
gu install native-image
|
set GRAALVM_HOME=D:\opt\cli\mandrel-java11-21.2.0.0-Final
set PATH=%JAVA11_HOME%/bin;%PATH%;%GRAALVM_HOME%/bin
set JAVA_HOME=%JAVA11_HOME%
OR set GRAALVM_HOME=D:\opt\cli\graalvm-ce-java11-21.2.0
set PATH=%JAVA11_HOME%/bin;%PATH%;%GRAALVM_HOME%/bin
set JAVA_HOME=%JAVA11_HOME%
gu install native-image
|
Quarkus Build
git clone https://github.com/quarkusio/quarkus-quickstarts.git
cd ./quarkus-quickstarts/getting-started
# for windows 10 we should avoid symbolic link. instead of symbolic link
# we should use absolute project path either from command or gitbash
mvn package -Pnative -Dquarkus.native.container-runtime=docker -e
mvn package -Pnative -Dquarkus.native.container-build=true
mvn verify -Pnative -Dquarkus.native.container-runtime=docker -e
mvn verify -Pnative -Dquarkus.native.container-build=true
mvn compile quarkus:dev
mvn package -Pnative
mvn verify -Pnative
mvn package
Maven Artifact
mvn io.quarkus:quarkus-maven-plugin:2.1.3.Final:create \
-DprojectGroupId=org.chorke.academia.rest \
-DprojectArtifactId=getting-started \
-DclassName="org.chorke.academia.rest.getting.started.GreetingResource" \
-Dpath="/hello"
cd getting-started
After Build
: '
./quarkus-quickstarts/getting-started/target/
─────────────────────────────────────────────
├─ quarkus/bootstrap/test-app-model.dat
├─ quarkus-artifact.properties
└─ quarkus-app/
├─ app/getting-started-1.0.0-SNAPSHOT.jar
├─ quarkus-app-dependencies.txt
├─ quarkus-run.jar
├─ quarkus/
│ ├─ generated-bytecode.jar
│ ├─ quarkus-application.dat
│ └─ transformed-bytecode.jar
│
└─ lib/
├─ main/
└─ boot/
├─ io.quarkus.quarkus-development-mode-spi-2.1.3.Final.jar
├─ io.smallrye.common.smallrye-common-io-1.6.0.jar
├─ org.graalvm.sdk.graal-sdk-21.1.0.jar
├─ org.jboss.logging.jboss-logging-3.4.2.Final.jar
├─ org.jboss.logmanager.jboss-logmanager-embedded-1.0.9.jar
└─ org.wildfly.common.wildfly-common-1.5.4.Final-format-001.jar
'
java -jar target/quarkus-app/quarkus-run.jar
Configuring
quarkus.banner.path=/META-INF/chorke/academia.txt
quarkus.banner.enabled=false
Knowledge
mvn package -Pnative -Dquarkus.native.container-build=true\ -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel:21.1-java11 mvn package -Pnative -Dquarkus.native.container-build=true\ -Dquarkus.native.container-runtime=docker mvn package -Pnative -Dquarkus.native.container-build=true\ -Dquarkus.native.container-runtime=podman mvn package -Pnative -Dquarkus.native.container-build=true\ -Dquarkus.container-image.build=true
docker build -f src/main/docker/Dockerfile.native\ -t quarkus-quickstart/getting-started . docker run -i --rm -p 8080:8080\ quarkus-quickstart/getting-started
AAA : Authentication Authorization & Accounting LDAP: Lightweight Directory Access protocol SAML: Security Assertion Markup Language RBAC: Role-Based Access Control AoT : Ahead of Time Compilation CDI : Central Programming Model IdP : Identity Provider SP : Service Provider OIDC: OpenID Connect