Quarkus: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(117 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
< | {| | ||
| valign="top" | | |||
<syntaxhighlight lang="bash"> | |||
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 | |||
</syntaxhighlight> | |||
'''OR''' | |||
<syntaxhighlight lang="bash"> | |||
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 | |||
</syntaxhighlight> | |||
| valign="top" | | |||
<syntaxhighlight lang="bat"> | |||
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% | |||
</syntaxhighlight> | |||
'''OR''' | |||
<syntaxhighlight lang="bat"> | |||
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 | |||
</syntaxhighlight> | |||
|} | |||
==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 | |||
# 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 | |||
</syntaxhighlight> | |||
mvn compile quarkus:dev | <syntaxhighlight lang="bash" highlight="1,4" line> | ||
mvn compile quarkus:dev | |||
mvn package -Pnative | |||
mvn verify -Pnative | |||
mvn package | mvn package | ||
</ | </syntaxhighlight> | ||
==Maven Artifact== | |||
<syntaxhighlight lang="bash"> | |||
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 | |||
</syntaxhighlight> | |||
==After Build== | ==After Build== | ||
< | <syntaxhighlight lang="bash"> | ||
: ' | : ' | ||
./quarkus-quickstarts/getting-started/target/ | ./quarkus-quickstarts/getting-started/target/ | ||
Line 38: | 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.enabled=false | quarkus.banner.enabled=false | ||
quarkus. | </syntaxhighlight> | ||
==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 | |||
==References== | ==References== | ||
{| | |||
| valign="top" | | |||
* [https://camel.apache.org/camel-quarkus/ Apache Camel extensions for Quarkus] | |||
* [https://micronaut.io/2020/04/07/micronaut-vs-quarkus-vs-spring-boot-performance-on-jdk-14/ Micronaut vs Quarkus vs Spring-boot] | * [https://micronaut.io/2020/04/07/micronaut-vs-quarkus-vs-spring-boot-performance-on-jdk-14/ Micronaut vs Quarkus vs Spring-boot] | ||
* [https://quarkus.io/guides/security-customization Quarkus Security Customization] | |||
* [https://quarkus.io/blog/quarkus-for-spring-developers/ Quarkus for Spring Developers] | |||
* [https://quarkus.io/guides/deploying-to-kubernetes Quarkus Kubernetes Extension] | * [https://quarkus.io/guides/deploying-to-kubernetes Quarkus Kubernetes Extension] | ||
* [https://quarkus.io/guides/security Quarkus Security Architecture] | |||
* [https://quarkus.io/guides/getting-started Quarkus Getting Started] | * [https://quarkus.io/guides/getting-started Quarkus Getting Started] | ||
* [https://quarkus.io/guides/security-jwt Quarkus JWT Security] | |||
* [https://github.com/quarkusio/quarkus-quickstarts Quarkus Quick Starts] | * [https://github.com/quarkusio/quarkus-quickstarts Quarkus Quick Starts] | ||
* [https://quarkus.io/guides/cdi Quarkus CDI] | |||
| valign="top" | | |||
* [https://camel.apache.org/camel-quarkus/latest/user-guide/examples.html Apache Camel Quarkus Examples] | |||
* [https://developers.redhat.com/blog/2019/03/29/quarkus-why-compile-to-native Quarkus: Why compile to native?] | |||
* [https://code.quarkus.io/ Configure Quarkus Application] | |||
* [https://docs.docker.com/develop/develop-images/multistage-build/ Docker multi-stage builds] | |||
* [https://www.graalvm.org/reference-manual/native-image/ GraalVM Native Image] | |||
* [https://quarkus.io/vision/standards Quarkus Standards] | |||
* [https://www.redhat.com/en/topics/cloud-native-apps/what-is-quarkus What is Quarkus?] | |||
* [[GraalVM]] | |||
* [[Podman]] | |||
* [[Docker]] | |||
| valign="top" | | |||
* [https://www.infoq.com/articles/microservicilities-quarkus/ Microservicilities with Quarkus and MicroProfile] | |||
* [https://quarkus.io/guides/container-image Quarkus Container Image extensions] | |||
* [https://visualstudio.microsoft.com/downloads/ Visual Studio Visual C++ Build Tools] | |||
* [https://quarkus.io/guides/building-native-image Quarkus Build Native Executable] | |||
* [https://docs.docker.com/desktop/windows/wsl/ Docker Desktop WSL 2 backend] | |||
* [https://github.com/graalvm/graalvm-ce-builds/releases GraalVM Community Edition] | |||
* [https://www.jetbrains.com/help/idea/quarkus.html Quarkus in IntelliJ IDEA] | |||
* [https://quarkus.io/books/ Quarkus Books] | |||
* [[IntelliJ IDEA]] | |||
* [[MicroProfile]] | |||
|- | |||
| colspan="3" | | |||
---- | |||
|- | |||
| valign="top" | | |||
* [https://www.baeldung.com/quarkus-extension-java Implementing Liquibase Quarkus Extension] | |||
* [https://stackoverflow.com/questions/59075116/ Maven multi module project with Quarkus] | |||
* [https://medium.com/analytics-vidhya/maybe-native-executable-in-quarkus-is-not-for-you-but-it-is-awesome-967588e80a4 Quarkus native executable is not for you!] | |||
* [https://roboticsbackend.com/install-ubuntu-on-raspberry-pi-without-monitor/ Install Ubuntu 20.04 on Raspberry Pi 4] | |||
* [https://github.com/oracle/graal/issues/2696 Native Image fails for Jasper Report] | |||
* [https://quarkus.io/quarkus-workshops/super-heroes/ Quarkus Workshops Super Heroes] | |||
* [https://quarkus.io/blog/quarkus-native-on-a-raspberry-pi/ Quarkus native on a Raspberry Pi] | |||
* [https://stackoverflow.com/questions/68392716/ Quarkus deploy in Raspberry Pi] | |||
* [https://quarkus.io/guides/config Quarkus Configuration Guide] | |||
* [https://getfedora.org/iot/ Fedora IoT] | |||
| valign="top" | | |||
* [https://quarkus.io/guides/security-openid-connect-multitenancy Quarkus Security OpenID Connect Multi-Tenancy] | |||
* [https://quarkus.io/guides/security-keycloak-authorization Quarkus Security Keycloak Authorization] | |||
* [https://itnext.io/building-graphql-apis-with-quarkus-dbbf23f897df Quarkus Building GraphQL Endpoint] | |||
* [https://itnext.io/consuming-graphql-apis-with-quarkus-a2f482b6169d Quarkus Building GraphQL Client] | |||
* [https://quarkus.io/guides/security-customization Quarkus Security Customization] | |||
* [https://quarkus.io/guides/security-authorization Quarkus Security Authorization] | |||
* [https://quarkus.io/guides/security-oauth2 Quarkus Security OAuth2] | |||
* [[Keycloak]] | |||
* [[JQ Tool]] | |||
* [https://vertx.io/docs/ Vert.x] | |||
| valign="top" | | |||
* [https://stackoverflow.com/questions/7397996/ Suppress Warnings for <code>deprecation</code>, <code>unchecked</code> & <code>unused</code>] | |||
* [https://www.graalvm.org/reference-manual/native-image/Reflection/ GraalVM Reflection Use in Native Images] | |||
* [https://stackoverflow.com/questions/62363398/ Quarkus Security GraphQL Endpoint] | |||
* [https://quarkus.io/guides/spring-boot-properties Quarkus Spring Boot Properties] | |||
* [https://piotrminkowski.com/2021/04/14/advanced-graphql-with-quarkus/ Quarkus GraphQL Advanced] | |||
* [https://quarkus.io/guides/writing-extensions Quarkus Writing Extensions] | |||
* [https://quarkus.io/guides/building-my-first-extension Quarkus First Extensions] | |||
* [https://quarkus.io/guides/spring-security Quarkus Spring Security] | |||
* [https://lordofthejars.github.io/quarkus-cheat-sheet/ Quarkus Cheat Sheet] | |||
* [https://quarkus.io/guides/spring-di Quarkus Spring DI] | |||
|- | |||
| colspan="3" | | |||
---- | |||
|- | |||
| valign="top" | | |||
* [https://stackoverflow.com/questions/63620377/ Quarkus with MapStruct & Lombok] | |||
* [https://quarkus.io/guides/writing-native-applications-tips Tips for Writing Native Applications] | |||
* [https://evrentan.medium.com/using-mapstruct-within-quarkus-8636af17a2ea Using MapStruct within Quarkus] | |||
* [https://quarkus.io/guides/spring-scheduled Quarkus Spring Scheduled] | |||
* [https://quarkus.io/guides/spring-data-jpa Quarkus Spring Data JPA] | |||
* [https://quarkus.io/guides/redis Quarkus Redis Client] | |||
* [https://mapstruct.org/news/2019-12-06-mapstruct-and-quarkus/ Quarkus MapStruct] | |||
* [https://quarkus.io/guides/liquibase Quarkus Liquibase] | |||
* [[MapStruct]] | |||
* [[Lombok]] | |||
| valign="top" | | |||
* [https://blog.softwaremill.com/small-fast-docker-images-using-graalvms-native-image-99c0bc92e70b Small & fast Docker images using GraalVM] | |||
* [https://www.batey.info/graalvm-docker-small-images.html Tiny docker images for Java with GraalVM] | |||
* [https://quarkus.io/guides/kogito-dmn Quarkus Kogito Domain Model Notation] | |||
* [https://www.graalvm.org/release-notes/version-roadmap/ GraalVM Community Version Roadmap] | |||
* [https://quarkus.io/guides/building-my-first-extension Building My First Quarkus Extension] | |||
* [https://stackoverflow.com/questions/tagged/quarkus Quarkus Stack Overflow] | |||
* [https://quarkus.io/guides/cdi-reference Quarkus CDI Reference] | |||
* [https://quarkus.io/guides/maven-tooling Quarkus Maven Tooling] | |||
* [https://quarkus.io/guides/kogito-drl Quarkus Kogito Drools] | |||
* [https://quarkus.io/guides/kogito Quarkus Kogito] | |||
| valign="top" | | |||
* [https://github.com/quarkusio/quarkus/issues/29857 Quarkus » Building a Native Image From Scratch] | |||
* [https://www.graalvm.org/22.1/reference-manual/native-image/StaticImages/ Quarkus » Static and Mostly Static Images] | |||
* [https://developers.redhat.com/articles/2021/12/14/explore-java-17-language-features-quarkus Java 17 language features with Quarkus] | |||
* [https://quarkus.io/guides/building-native-image Quarkus » Building a Native Executable] | |||
* [https://zeringue.io/post/graalvm-gradle-docker/ Build Slim Java Native Container] | |||
* [https://quarkus.io/guides/ide-tooling Quarkus » IDE Tooling] | |||
* [https://quarkus.io/guides/cli-tooling Quarkus » CLI Tooling] | |||
* [https://github.com/graalvm/mandrel/releases Mandrel: Download] | |||
* [[SDKMan]] | |||
* [[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