-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add use case quarkus vehicle routing * add vehicle routing to README * update quarkus e optaplanner version * add distance to Vehicle List * Image alignment on index.html Co-authored-by: Marco Taiuti <[email protected]>
- Loading branch information
Showing
49 changed files
with
3,310 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+1020 KB
.../resources/META-INF/resources/screenshot/quarkus-vehicle-routing-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* | ||
!target/*-runner | ||
!target/quarkus-app/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/target | ||
/build | ||
/local | ||
|
||
# Eclipse, Netbeans and IntelliJ files | ||
/.* | ||
!.gitignore | ||
!.dockerignore | ||
!.mvn | ||
/nbproject | ||
/*.ipr | ||
/*.iws | ||
/*.iml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
= Vehicle Routing 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/quarkus-app/quarkus-run.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]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>org.acme</groupId> | ||
<artifactId>optaplanner-quarkus-vehicle-routing-quickstart</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
|
||
<properties> | ||
<maven.compiler.release>11</maven.compiler.release> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
|
||
<version.io.quarkus>2.2.0.Final</version.io.quarkus> | ||
<version.org.optaplanner>8.12.0-SNAPSHOT</version.org.optaplanner> | ||
|
||
<version.compiler.plugin>3.8.1</version.compiler.plugin> | ||
<version.surefire.plugin>3.0.0-M5</version.surefire.plugin> | ||
</properties> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<!-- Alternatively, use <artifactId>quarkus-universe-bom</artifactId> | ||
which includes both quarkus-bom and optaplanner-bom. --> | ||
<artifactId>quarkus-bom</artifactId> | ||
<version>${version.io.quarkus}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.optaplanner</groupId> | ||
<artifactId>optaplanner-bom</artifactId> | ||
<version>${version.org.optaplanner}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-resteasy</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-resteasy-jackson</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.optaplanner</groupId> | ||
<artifactId>optaplanner-quarkus</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.optaplanner</groupId> | ||
<artifactId>optaplanner-quarkus-jackson</artifactId> | ||
</dependency> | ||
|
||
<!-- Testing --> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-junit5</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.optaplanner</groupId> | ||
<artifactId>optaplanner-test</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<!-- UI --> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-webjars-locator</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.webjars</groupId> | ||
<artifactId>bootstrap</artifactId> | ||
<version>4.5.3</version> | ||
<scope>runtime</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.webjars</groupId> | ||
<artifactId>jquery</artifactId> | ||
<version>3.5.1</version> | ||
<scope>runtime</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.webjars</groupId> | ||
<artifactId>font-awesome</artifactId> | ||
<version>5.15.1</version> | ||
<scope>runtime</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.webjars</groupId> | ||
<artifactId>leaflet</artifactId> | ||
<version>1.6.0</version> | ||
<scope>runtime</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-maven-plugin</artifactId> | ||
<version>${version.io.quarkus}</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>build</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>${version.compiler.plugin}</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>${version.surefire.plugin}</version> | ||
<configuration> | ||
<systemPropertyVariables> | ||
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager> | ||
<maven.home>${maven.home}</maven.home> | ||
</systemPropertyVariables> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<profiles> | ||
<profile> | ||
<id>native</id> | ||
<activation> | ||
<property> | ||
<name>native</name> | ||
</property> | ||
</activation> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-failsafe-plugin</artifactId> | ||
<version>${version.surefire.plugin}</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>integration-test</goal> | ||
<goal>verify</goal> | ||
</goals> | ||
<configuration> | ||
<systemPropertyVariables> | ||
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path> | ||
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager> | ||
<maven.home>${maven.home}</maven.home> | ||
</systemPropertyVariables> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<properties> | ||
<quarkus.package.type>native</quarkus.package.type> | ||
</properties> | ||
</profile> | ||
</profiles> | ||
|
||
<repositories> | ||
<repository> | ||
<id>jboss-public-repository-group</id> | ||
<url>https://repository.jboss.org/nexus/content/groups/public/</url> | ||
<releases> | ||
<!-- Get releases only from Maven Central which is faster. --> | ||
<enabled>false</enabled> | ||
</releases> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
</snapshots> | ||
</repository> | ||
</repositories> | ||
</project> |
Oops, something went wrong.