| = Facility location problem (Java, Quarkus, Maven) |
| |
| == Run the application with live coding |
| |
| . Start the application: |
| + |
| [source, shell] |
| ---- |
| $ mvn quarkus:dev |
| ---- |
| |
| . Visit http://localhost:8080 in your browser. |
| |
| . Click on the *Solve* button. |
| |
| Then try _live coding_: |
| |
| . Make some changes in the source code. |
| . Refresh your browser (F5). |
| |
| Notice that those changes are immediately in effect. |
| |
| == Package and run the application |
| |
| When you're done iterating in `quarkus:dev` mode, run the application as a conventional jar file. |
| |
| . Compile it: |
| + |
| [source, shell] |
| ---- |
| $ mvn package |
| ---- |
| |
| . Run it: |
| + |
| [source, shell] |
| ---- |
| $ java -jar ./target/*-runner.jar |
| ---- |
| + |
| [NOTE] |
| ==== |
| To run it on port 8081 instead, add `-Dquarkus.http.port=8081`. |
| ==== |
| |
| . Visit http://localhost:8080 in your browser. |
| |
| == Run a native executable |
| |
| . https://quarkus.io/guides/building-native-image#configuring-graalvm[Install GraalVM and gu install the native-image tool] |
| |
| . Compile it natively: |
| + |
| [source, shell] |
| ---- |
| $ mvn package -Dnative -DskipTests |
| ---- |
| |
| . Run the native executable: |
| + |
| [source, shell] |
| ---- |
| $ ./target/*-runner |
| ---- |
| |
| . Visit http://localhost:8080 in your browser. |
| |
| == More information |
| |
| Visit https://www.optaplanner.org/[www.optaplanner.org]. |