Skip to content

Commit 9a0b32a

Browse files
authored
Merge pull request #19 from jseseCCS/HACDOCS-470
HACDOCS-470: Editing Quarkus code sample readme.
2 parents fa9a525 + 94ffd73 commit 9a0b32a

File tree

1 file changed

+13
-53
lines changed

1 file changed

+13
-53
lines changed

README.md

Lines changed: 13 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,18 @@
1-
# code-with-quarkus project
1+
# Creating an application with a Quarkus code sample
22

3-
This project uses Quarkus, the Supersonic Subatomic Java Framework.
3+
**Note:** The Quarkus code sample uses the **8081** HTTP port.
44

5-
If you want to learn more about Quarkus, please visit its website: https://quarkus.io/ .
5+
Before you begin creating an application with this `devfile` code sample, it's helpful to understand the relationship between the `devfile` and `Dockerfile` and how they contribute to your build. You can find these files at the following URLs:
66

7-
## Running the application in dev mode
7+
* [Quarkus `devfile.yaml`](https://github.com/devfile-samples/devfile-sample-code-with-quarkus/blob/main/devfile.yaml)
8+
* [Quarkus `Dockerfile`](https://github.com/devfile-samples/devfile-sample-code-with-quarkus/blob/main/src/main/docker/Dockerfile.jvm.staged)
89

9-
You can run your application in dev mode that enables live coding using:
10-
```shell script
11-
./mvnw compile quarkus:dev
12-
```
10+
1. The `devfile.yaml` file has an [`image-build` component](https://github.com/devfile-samples/devfile-sample-code-with-quarkus/blob/main/devfile.yaml#L22-L28) that points to your `Dockerfile`.
11+
2. The [`src/main/docker/Dockerfile.jvm.staged`](https://github.com/devfile-samples/devfile-sample-code-with-quarkus/blob/main/src/main/docker/Dockerfile.jvm.staged) file contains the instructions you need to build the code sample as a container image.
12+
3. The `devfile.yaml` [`kubernetes-deploy` component](https://github.com/devfile-samples/devfile-sample-code-with-quarkus/blob/main/devfile.yaml#L29-L40) points to a `deploy.yaml` file that contains instructions for deploying the built container image.
13+
4. The `devfile.yaml` [`deploy` command](https://github.com/devfile-samples/devfile-sample-code-with-quarkus/blob/main/devfile.yaml#L42-L55) completes the [outerloop](https://devfile.io/docs/2.2.0/innerloop-vs-outerloop) deployment phase by pointing to the `image-build` and `kubernetes-deploy` components to create your application.
1314

14-
> **_NOTE:_** Quarkus now ships with a Dev UI, which is available in dev mode only at http://localhost:8080/q/dev/.
15-
16-
## Packaging and running the application
17-
18-
The application can be packaged using:
19-
```shell script
20-
./mvnw package
21-
```
22-
It produces the `quarkus-run.jar` file in the `target/quarkus-app/` directory.
23-
Be aware that it’s not an _über-jar_ as the dependencies are copied into the `target/quarkus-app/lib/` directory.
24-
25-
If you want to build an _über-jar_, execute the following command:
26-
```shell script
27-
./mvnw package -Dquarkus.package.type=uber-jar
28-
```
29-
30-
The application is now runnable using `java -jar target/quarkus-app/quarkus-run.jar`.
31-
32-
## Creating a native executable
33-
34-
You can create a native executable using:
35-
```shell script
36-
./mvnw package -Pnative
37-
```
38-
39-
Or, if you don't have GraalVM installed, you can run the native executable build in a container using:
40-
```shell script
41-
./mvnw package -Pnative -Dquarkus.native.container-build=true
42-
```
43-
44-
You can then execute your native executable with: `./target/code-with-quarkus-1.0.0-SNAPSHOT-runner`
45-
46-
If you want to learn more about building native executables, please consult https://quarkus.io/guides/maven-tooling.html.
47-
48-
## Related guides
49-
50-
- RESTEasy JAX-RS ([guide](https://quarkus.io/guides/rest-json)): REST endpoint framework implementing JAX-RS and more
51-
52-
## Provided examples
53-
54-
### RESTEasy JAX-RS example
55-
56-
REST is easy peasy with this Hello World RESTEasy resource.
57-
58-
[Related guide section...](https://quarkus.io/guides/getting-started#the-jax-rs-resources)
15+
### Additional resources
16+
* For more information about Quarkus, see [quarkus.io](https://quarkus.io/).
17+
* For more information about devfiles, see [Devfile.io](https://devfile.io/).
18+
* For more information about Dockerfiles, see [Dockerfile reference](https://docs.docker.com/engine/reference/builder/).

0 commit comments

Comments
 (0)