Skip to content

Commit 2ff81fb

Browse files
committed
Restore old state of 3.9.2, split updated version into new subdirectory
1 parent 2ebad22 commit 2ff81fb

File tree

28 files changed

+1533
-381
lines changed

28 files changed

+1533
-381
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*
2+
!target/*-runner
3+
!target/*-runner.jar
4+
!target/lib/*
5+
!target/quarkus-app/
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Eclipse
2+
.project
3+
.classpath
4+
.settings/
5+
bin/
6+
7+
# IntelliJ
8+
.idea
9+
*.ipr
10+
*.iml
11+
*.iws
12+
13+
# NetBeans
14+
nb-configuration.xml
15+
16+
# Visual Studio Code
17+
.vscode
18+
19+
# OSX
20+
.DS_Store
21+
22+
# Vim
23+
*.swp
24+
*.swo
25+
26+
# patch
27+
*.orig
28+
*.rej
29+
30+
# Maven
31+
target/
32+
pom.xml.tag
33+
pom.xml.releaseBackup
34+
pom.xml.versionsBackup
35+
release.properties
Binary file not shown.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
wrapperVersion=3.3.2
18+
distributionType=bin
19+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
20+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
QUARKUS_PACKAGE_TYPE=uber-jar
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Getting started with Quarkus
2+
3+
This is a minimal CRUD service exposing a couple of endpoints over REST.
4+
5+
Under the hood, this demo uses:
6+
7+
- RESTEasy to expose the REST endpoints
8+
- REST-assured and JUnit 5 for endpoint testing
9+
10+
## Requirements
11+
12+
To compile and run this demo you will need:
13+
14+
- JDK 17+
15+
- GraalVM
16+
17+
### Configuring GraalVM and JDK 17+
18+
19+
Make sure that both the `GRAALVM_HOME` and `JAVA_HOME` environment variables have
20+
been set, and that a JDK 17+ `java` command is on the path.
21+
22+
See the [Building a Native Executable guide](https://quarkus.io/guides/building-native-image-guide)
23+
for help setting up your environment.
24+
25+
## Building the application
26+
27+
Launch the Maven build on the checked out sources of this demo:
28+
29+
> ./mvnw package
30+
31+
### Live coding with Quarkus
32+
33+
The Maven Quarkus plugin provides a development mode that supports
34+
live coding. To try this out:
35+
36+
> ./mvnw quarkus:dev
37+
38+
This command will leave Quarkus running in the foreground listening on port 8080.
39+
40+
1. Visit the default endpoint: [http://127.0.0.1:8080](http://127.0.0.1:8080).
41+
- Make a simple change to [src/main/resources/META-INF/resources/index.html](src/main/resources/META-INF/resources/index.html) file.
42+
- Refresh the browser to see the updated page.
43+
2. Visit the `/hello` endpoint: [http://127.0.0.1:8080/hello](http://127.0.0.1:8080/hello)
44+
- Update the response in [src/main/java/org/acme/quickstart/GreetingResource.java](src/main/java/org/acme/quickstart/GreetingResource.java). Replace `hello` with `hello there` in the `hello()` method.
45+
- Refresh the browser. You should now see `hello there`.
46+
- Undo the change, so the method returns `hello` again.
47+
- Refresh the browser. You should now see `hello`.
48+
49+
### Run Quarkus in JVM mode
50+
51+
When you're done iterating in developer mode, you can run the application as a
52+
conventional jar file.
53+
54+
First compile it:
55+
56+
> ./mvnw package
57+
58+
Then run it:
59+
60+
> java -jar ./target/quarkus-app/quarkus-run.jar
61+
62+
Have a look at how fast it boots, or measure the total native memory consumption.
63+
64+
### Run Quarkus as a native executable
65+
66+
You can also create a native executable from this application without making any
67+
source code changes. A native executable removes the dependency on the JVM:
68+
everything needed to run the application on the target platform is included in
69+
the executable, allowing the application to run with minimal resource overhead.
70+
71+
Compiling a native executable takes a bit longer, as GraalVM performs additional
72+
steps to remove unnecessary codepaths. Use the `native` profile to compile a
73+
native executable:
74+
75+
> ./mvnw package -Dnative
76+
77+
After getting a cup of coffee, you'll be able to run this executable directly:
78+
79+
> ./target/getting-started-1.0.0-SNAPSHOT-runner

0 commit comments

Comments
 (0)