You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/scripting.adoc
+42-40Lines changed: 42 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,6 @@ import jakarta.ws.rs.GET;
42
42
import jakarta.ws.rs.Path;
43
43
import jakarta.ws.rs.Produces;
44
44
import jakarta.ws.rs.core.MediaType;
45
-
import org.jboss.logging.Logger;
46
45
47
46
@Path("/hello")
48
47
@ApplicationScoped
@@ -136,9 +135,9 @@ $ jbang quarkusapp.java
136
135
[jbang] Dependencies resolved
137
136
[jbang] Building jar...
138
137
[jbang] Post build with io.quarkus.launcher.JBangIntegration
139
-
Aug 30, 2020 5:40:55 AM org.jboss.threads.Version <clinit>
140
-
INFO: JBoss Threads version 3.1.1.Final
141
-
Aug 30, 2020 5:40:56 AM io.quarkus.deployment.QuarkusAugmentor run
138
+
Mar 22, 2023 9:47:51 A.M. org.jboss.threads.Version <clinit>
139
+
INFO: JBoss Threads version 3.5.0.Final
140
+
Mar 22, 2023 9:47:51 A.M. io.quarkus.deployment.QuarkusAugmentor run
142
141
INFO: Quarkus augmentation completed in 722ms
143
142
Hello World
144
143
----
@@ -148,13 +147,9 @@ For now the application does nothing new.
148
147
[TIP]
149
148
.How do I edit this file and get content assist?
150
149
====
151
-
As there is nothing but a `.java` file, most IDE's don't handle content assist well.
152
-
To work around that you can run `jbang edit quarkusapp.java`, this will print out a directory that will have a temporary project setup you can use in your IDE.
150
+
To edit the JBang script in an IDE/editor with content assist you can run `jbang edit quarkusapp.java` or `jbang edit quarkusapp.java`.
153
151
154
-
On Linux/macOS you can run `<idecommand> `jbang edit quarkusapp.java``.
155
-
156
-
If you add dependencies while editing, you can get JBang to automatically refresh
157
-
the IDE project using `jbang edit --live=<idecommand> quarkusapp.java`.
152
+
For more information please refer to the https://www.jbang.dev/documentation/guide/latest/editing.html[the JBang documentation].
158
153
====
159
154
160
155
@@ -204,17 +199,17 @@ $ jbang quarkusapp.java
204
199
205
200
[jbang] Building jar...
206
201
[jbang] Post build with io.quarkus.launcher.JBangIntegration
207
-
Aug 30, 2020 5:49:01 AM org.jboss.threads.Version <clinit>
208
-
INFO: JBoss Threads version 3.1.1.Final
209
-
Aug 30, 2020 5:49:02 AM io.quarkus.deployment.QuarkusAugmentor run
210
-
INFO: Quarkus augmentation completed in 681ms
202
+
Mar 22, 2023 9:48:39 A.M. org.jboss.threads.Version <clinit>
203
+
INFO: JBoss Threads version 3.5.0.Final
204
+
Mar 22, 2023 9:48:39 A.M. io.quarkus.deployment.QuarkusAugmentor run
205
+
INFO: Quarkus augmentation completed in 521ms
211
206
__ ____ __ _____ ___ __ ____ ______
212
207
--/ __ \/ / / / _ | / _ \/ //_/ / / / __/
213
208
-/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
214
209
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
215
-
2020-08-30 05:49:03,255 INFO [io.quarkus] (main) Quarkus {quarkus-version} on JVM started in 0.638s. Listening on: http://0.0.0.0:8080
216
-
2020-08-30 05:49:03,272 INFO [io.quarkus] (main) Profile prod activated.
217
-
2020-08-30 05:49:03,272 INFO [io.quarkus] (main) Installed features: [cdi, resteasy-reactive]
210
+
2023-03-22 09:48:39,891 INFO [io.quarkus] (main) quarkus 999-SNAPSHOT on JVM (powered by Quarkus {quarkus-version}) started in 0.283s. Listening on: http://0.0.0.0:8080
211
+
2023-03-22 09:48:39,904 INFO [io.quarkus] (main) Profile prod activated.
@@ -393,34 +389,40 @@ Now during build the `quarkus.swagger-ui.always-include` will be generated into
393
389
394
390
== Running as a native application
395
391
396
-
If you have the `native-image` binary installed and `GRAALVM_HOME` set, you can get the native executable built and run using `jbang --native quarkusapp.java`:
392
+
If you have the `native-image` binary installed and `GRAALVM_HOME` set, or a container runtime (e.g., podman or docker) installed on Linux, you can get the native executable built and run using `jbang --native quarkusapp.java`:
397
393
398
394
[source,shell,subs=attributes+]
399
395
----
400
396
$ jbang --native quarkusapp.java
401
-
402
397
[jbang] Building jar...
403
398
[jbang] Post build with io.quarkus.launcher.JBangIntegration
404
-
Aug 30, 2020 6:21:15 AM org.jboss.threads.Version <clinit>
405
-
INFO: JBoss Threads version 3.1.1.Final
406
-
Aug 30, 2020 6:21:16 AM io.quarkus.deployment.pkg.steps.JarResultBuildStep buildNativeImageThinJar
407
-
INFO: Building native image source jar: /var/folders/yb/sytszfld4sg8vwr1h0w20jlw0000gn/T/quarkus-jbang3291688251685023074/quarkus-application-native-image-source-jar/quarkus-application-runner.jar
408
-
Aug 30, 2020 6:21:16 AM io.quarkus.deployment.pkg.steps.NativeImageBuildStep build
409
-
INFO: Building native image from /var/folders/yb/sytszfld4sg8vwr1h0w20jlw0000gn/T/quarkus-jbang3291688251685023074/quarkus-application-native-image-source-jar/quarkus-application-runner.jar
410
-
Aug 30, 2020 6:21:16 AM io.quarkus.deployment.pkg.steps.NativeImageBuildStep checkGraalVMVersion
411
-
INFO: Running Quarkus native-image plugin on GraalVM Version 20.1.0 (Java Version 11.0.7)
412
-
Aug 30, 2020 6:21:16 AM io.quarkus.deployment.pkg.steps.NativeImageBuildStep build
Aug 30, 2020 6:22:31 AM io.quarkus.deployment.QuarkusAugmentor run
416
-
INFO: Quarkus augmentation completed in 76010ms
399
+
Mar 22, 2023 9:58:47 A.M. org.jboss.threads.Version <clinit>
400
+
INFO: JBoss Threads version 3.5.0.Final
401
+
Mar 22, 2023 9:58:47 A.M. io.quarkus.deployment.pkg.steps.JarResultBuildStep buildNativeImageThinJar
402
+
INFO: Building native image source jar: /tmp/quarkus-jbang8082065952748314720/quarkus-application-native-image-source-jar/quarkus-application-runner.jar
403
+
Mar 22, 2023 9:58:47 A.M. io.quarkus.deployment.pkg.steps.NativeImageBuildStep build
404
+
INFO: Building native image from /tmp/quarkus-jbang8082065952748314720/quarkus-application-native-image-source-jar/quarkus-application-runner.jar
405
+
Mar 22, 2023 9:58:47 A.M. io.quarkus.deployment.pkg.steps.NativeImageBuildStep getNativeImageBuildRunner
406
+
WARN: Cannot find the `native-image` in the GRAALVM_HOME, JAVA_HOME and System PATH. Install it using `gu install native-image` Attempting to fall back to container build.
407
+
Mar 22, 2023 9:58:47 A.M. io.quarkus.deployment.pkg.steps.NativeImageBuildContainerRunner <init>
408
+
INFO: Using docker to run the native image builder
409
+
Mar 22, 2023 9:58:47 A.M. io.quarkus.deployment.pkg.steps.NativeImageBuildContainerRunner setup
410
+
INFO: Checking image status quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3-java17
411
+
Mar 22, 2023 9:58:51 A.M. io.quarkus.deployment.pkg.steps.NativeImageBuildStep checkGraalVMVersion
412
+
INFO: Running Quarkus native-image plugin on native-image 22.3.1.0-Final Mandrel Distribution (Java Version 17.0.6+10)
413
+
Mar 22, 2023 9:58:51 A.M. io.quarkus.deployment.pkg.steps.NativeImageBuildRunner build
Mar 22, 2023 9:37:57 A.M. io.quarkus.deployment.QuarkusAugmentor run
418
+
INFO: Quarkus augmentation completed in 31729ms
417
419
__ ____ __ _____ ___ __ ____ ______
418
420
--/ __ \/ / / / _ | / _ \/ //_/ / / / __/
419
421
-/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
420
422
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
421
-
2020-08-30 06:22:32,012 INFO [io.quarkus] (main) Quarkus {quarkus-version} native started in 0.017s. Listening on: http://0.0.0.0:8080
422
-
2020-08-30 06:22:32,013 INFO [io.quarkus] (main) Profile prod activated.
423
-
2020-08-30 06:22:32,013 INFO [io.quarkus] (main) Installed features: [cdi, resteasy-reactive]
423
+
2023-03-22 09:37:57,471 INFO [io.quarkus] (main) quarkus 999-SNAPSHOT native (powered by {quarkus-version}) started in 0.009s. Listening on: http://0.0.0.0:8080
424
+
2023-03-22 09:37:57,472 INFO [io.quarkus] (main) Profile prod activated.
This native build will take some time on first run but any subsequent runs (without changing `quarkusapp.java`) will be close to instant thanks to JBang cache:
2020-08-30 06:23:36,846 INFO [io.quarkus] (main) Quarkus {quarkus-version} native started in 0.015s. Listening on: http://0.0.0.0:8080
436
-
2020-08-30 06:23:36,846 INFO [io.quarkus] (main) Profile prod activated.
437
-
2020-08-30 06:23:36,846 INFO [io.quarkus] (main) Installed features: [cdi, resteasy-reactive]
437
+
2023-03-22 09:38:45,450 INFO [io.quarkus] (main) quarkus 999-SNAPSHOT native (powered by {quarkus-version}) started in 0.009s. Listening on: http://0.0.0.0:8080
438
+
2023-03-22 09:38:45,450 INFO [io.quarkus] (main) Profile prod activated.
0 commit comments