Skip to content

Commit

Permalink
Polish examples and use -P native for all of them for native build. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
davsclaus committed Oct 25, 2019
1 parent 01dd1a5 commit 2aae482
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
12 changes: 8 additions & 4 deletions examples/observability/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@ $ mvn clean compile quarkus:dev -DnoDeps

This compiles the project and starts the Quarkus tooling in https://quarkus.io/guides/maven-tooling#development-mode[development mode].

To build a https://quarkus.io/guides/maven-tooling#building-a-native-executable[native executable] run the following (Docker required):
== Native build

[source]
To build as native:

[source,text]
----
$ mvn clean package -Dnative
$ mvn package -Pnative
----

You can find the native executable in the `target` directory.
This requires having GraalVM and other tools installed.
See the https://quarkus.io/guides/building-native-image-guide[Quarkus Native Guide] for details.


==== Metrics endpoint

Expand Down
3 changes: 2 additions & 1 deletion examples/observability/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@

<profiles>
<profile>
<id>native-image</id>
<id>native</id>
<activation>
<property>
<name>native</name>
Expand Down Expand Up @@ -127,6 +127,7 @@
<enableServer>false</enableServer>
<cleanupServer>true</cleanupServer>
<enableHttpUrlHandler>true</enableHttpUrlHandler>
<disableReports>true</disableReports>
</configuration>
</execution>
</executions>
Expand Down
14 changes: 13 additions & 1 deletion examples/rest-json/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,16 @@ Then point your browser to one of the endpoints:
----
http://localhost:8080/fruits
http://localhost:8080/legumes
----
----

== Native build

To build as native:

[source,text]
----
$ mvn package -Pnative
----

This requires having GraalVM and other tools installed.
See the https://quarkus.io/guides/building-native-image-guide[Quarkus Native Guide] for details.
3 changes: 2 additions & 1 deletion examples/rest-json/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

<profiles>
<profile>
<id>native-image</id>
<id>native</id>
<activation>
<property>
<name>native</name>
Expand Down Expand Up @@ -111,6 +111,7 @@
<enableServer>false</enableServer>
<cleanupServer>true</cleanupServer>
<enableHttpUrlHandler>true</enableHttpUrlHandler>
<disableReports>true</disableReports>
</configuration>
</execution>
</executions>
Expand Down

0 comments on commit 2aae482

Please sign in to comment.