Skip to content

Commit 08cad0f

Browse files
authored
chore: migrate tournament scheduling (#1216)
1 parent 41558a6 commit 08cad0f

55 files changed

Lines changed: 2972 additions & 1726 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ It shows different use cases and basic implementations to get you started on you
2727
| ✅ <a href="#-task-assigning">Task Assigning</a> | Service Model, Chained Through Time, Allows Unassigned |
2828
| 📆 <a href="#-project-job-scheduling">Project Job Scheduling</a> | Shadow Variables, Variable Listener, Strength Comparator |
2929
| 🏆 <a href="#-sports-league-scheduling">Sports League Scheduling</a> | Service Model, Consecutive Sequences, Justifications |
30-
| 🏅 <a href="#-tournament-scheduling">Tournament Scheduling</a> | Pinning, Load Balancing |
30+
| 🏅 <a href="#-tournament-scheduling">Tournament Scheduling</a> | Service Model, Pinning, Load Balancing |
3131

3232
> [!NOTE]
3333
> The implementations in this repository serve as a starting point and/or inspiration when creating your own application.

‎use-cases/tournament-scheduling/README.md‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ Tournament Scheduling service assigning teams to tournament matches.
2323
1. Install Java and Maven, for example with [Sdkman](https://sdkman.io):
2424

2525
```sh
26-
$ sdk install java
27-
$ sdk install maven
26+
sdk install java
27+
sdk install maven
2828
```
2929

3030
## Run the application
3131

3232
1. Git clone the timefold-quickstarts repo and navigate to this directory:
3333

3434
```sh
35-
$ git clone https://github.com/TimefoldAI/timefold-quickstarts.git
35+
git clone https://github.com/TimefoldAI/timefold-quickstarts.git
3636
...
37-
$ cd timefold-quickstarts/use-cases/tournament-scheduling
37+
cd timefold-quickstarts/use-cases/tournament-scheduling
3838
```
3939

4040
2. (Optional) If you want to run a licensed edition (Plus / Enterprise), set up your license key first. See the [Timefold license tool](https://licenses.timefold.ai/) for instructions.
@@ -44,13 +44,13 @@ Tournament Scheduling service assigning teams to tournament matches.
4444
1. Community Edition
4545

4646
```sh
47-
$ mvn quarkus:dev
47+
mvn quarkus:dev
4848
```
4949

5050
2. Plus / Enterprise Edition: The profile sets up the correct Maven artifacts to run the licensed version. See the `pom.xml` for the implementation details.
5151

5252
```sh
53-
$ mvn quarkus:dev -Denterprise
53+
mvn quarkus:dev -Denterprise
5454
```
5555

5656
4. Visit [http://localhost:8080](http://localhost:8080) in your browser.
@@ -71,13 +71,13 @@ When you're done iterating in `quarkus:dev` mode, package the application to run
7171
1. Build it with Maven:
7272
7373
```sh
74-
$ mvn package
74+
mvn package
7575
```
7676
7777
2. Run the Maven output:
7878
7979
```sh
80-
$ java -jar ./target/quarkus-app/quarkus-run.jar
80+
java -jar ./target/quarkus-app/quarkus-run.jar
8181
```
8282
8383
> **Note**
@@ -92,13 +92,13 @@ When you're done iterating in `quarkus:dev` mode, package the application to run
9292
1. Build a container image:
9393
9494
```sh
95-
$ mvn package -Dcontainer
95+
mvn package -Dcontainer
9696
```
9797
9898
2. Run a container:
9999
100100
```sh
101-
$ docker run -p 8080:8080 --rm $USER/tournament-scheduling:1.0-SNAPSHOT
101+
docker run -p 8080:8080 --rm $USER/tournament-scheduling:0.0.1
102102
```
103103
104104
## Run it native
@@ -110,13 +110,13 @@ To increase startup performance for serverless deployments, build the applicatio
110110
2. Compile it natively. This takes a few minutes:
111111
112112
```sh
113-
$ mvn package -Dnative
113+
mvn package -Dnative
114114
```
115115
116116
3. Run the native executable:
117117
118118
```sh
119-
$ ./target/*-runner
119+
./target/*-runner
120120
```
121121
122122
4. Visit [http://localhost:8080](http://localhost:8080) in your browser.
Lines changed: 11 additions & 231 deletions
Original file line numberDiff line numberDiff line change
@@ -1,241 +1,21 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
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">
44
<modelVersion>4.0.0</modelVersion>
55

6-
<groupId>org.acme</groupId>
6+
<parent>
7+
<groupId>ai.timefold.solver</groupId>
8+
<artifactId>timefold-solver-service-parent</artifactId>
9+
<version>999-SNAPSHOT</version>
10+
</parent>
11+
12+
<groupId>ai.timefold.model</groupId>
713
<artifactId>tournament-scheduling</artifactId>
8-
<version>1.0-SNAPSHOT</version>
14+
<version>${revision}</version>
915

1016
<properties>
17+
<revision>0.0.1</revision>
1118
<maven.compiler.release>21</maven.compiler.release>
12-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
13-
14-
<version.io.quarkus>3.39.4</version.io.quarkus>
15-
<version.ai.timefold.solver>999-SNAPSHOT</version.ai.timefold.solver>
16-
17-
<version.compiler.plugin>3.16.0</version.compiler.plugin>
18-
<version.resources.plugin>3.5.0</version.resources.plugin>
19-
<version.surefire.plugin>3.5.6</version.surefire.plugin>
2019
</properties>
2120

22-
<dependencyManagement>
23-
<dependencies>
24-
<dependency>
25-
<groupId>io.quarkus</groupId>
26-
<artifactId>quarkus-bom</artifactId>
27-
<version>${version.io.quarkus}</version>
28-
<type>pom</type>
29-
<scope>import</scope>
30-
</dependency>
31-
<dependency>
32-
<groupId>ai.timefold.solver</groupId>
33-
<artifactId>timefold-solver-bom</artifactId>
34-
<version>${version.ai.timefold.solver}</version>
35-
<type>pom</type>
36-
<scope>import</scope>
37-
</dependency>
38-
</dependencies>
39-
</dependencyManagement>
40-
41-
<dependencies>
42-
<dependency>
43-
<groupId>io.quarkus</groupId>
44-
<artifactId>quarkus-rest</artifactId>
45-
</dependency>
46-
<dependency>
47-
<groupId>io.quarkus</groupId>
48-
<artifactId>quarkus-rest-jackson</artifactId>
49-
</dependency>
50-
<dependency>
51-
<groupId>io.quarkus</groupId>
52-
<artifactId>quarkus-smallrye-openapi</artifactId>
53-
</dependency>
54-
<dependency>
55-
<groupId>ai.timefold.solver</groupId>
56-
<artifactId>timefold-solver-quarkus</artifactId>
57-
</dependency>
58-
<dependency>
59-
<groupId>ai.timefold.solver</groupId>
60-
<artifactId>timefold-solver-quarkus-jackson</artifactId>
61-
</dependency>
62-
63-
<!-- Testing -->
64-
<dependency>
65-
<groupId>io.quarkus</groupId>
66-
<artifactId>quarkus-junit</artifactId>
67-
<scope>test</scope>
68-
</dependency>
69-
<dependency>
70-
<groupId>io.rest-assured</groupId>
71-
<artifactId>rest-assured</artifactId>
72-
<scope>test</scope>
73-
</dependency>
74-
<dependency>
75-
<groupId>org.awaitility</groupId>
76-
<artifactId>awaitility</artifactId>
77-
<scope>test</scope>
78-
</dependency>
79-
<dependency>
80-
<groupId>org.assertj</groupId>
81-
<artifactId>assertj-core</artifactId>
82-
<version>3.27.7</version>
83-
<scope>test</scope>
84-
</dependency>
85-
86-
<!-- UI -->
87-
<dependency>
88-
<groupId>io.quarkus</groupId>
89-
<artifactId>quarkus-web-dependency-locator</artifactId>
90-
</dependency>
91-
<dependency>
92-
<groupId>org.webjars</groupId>
93-
<artifactId>bootstrap</artifactId>
94-
<version>5.3.8</version>
95-
<scope>runtime</scope>
96-
</dependency>
97-
<dependency>
98-
<groupId>org.webjars</groupId>
99-
<artifactId>jquery</artifactId>
100-
<version>3.7.1</version>
101-
<scope>runtime</scope>
102-
</dependency>
103-
<dependency>
104-
<groupId>org.webjars</groupId>
105-
<artifactId>font-awesome</artifactId>
106-
<version>7.1.0</version>
107-
<scope>runtime</scope>
108-
</dependency>
109-
<dependency>
110-
<groupId>org.webjars.npm</groupId>
111-
<artifactId>js-joda</artifactId>
112-
<version>1.11.0</version>
113-
<scope>runtime</scope>
114-
</dependency>
115-
<dependency>
116-
<groupId>org.webjars.npm</groupId>
117-
<artifactId>js-joda__locale_en-us</artifactId>
118-
<version>3.1.0</version>
119-
<scope>runtime</scope>
120-
</dependency>
121-
</dependencies>
122-
123-
<build>
124-
<plugins>
125-
<plugin>
126-
<artifactId>maven-resources-plugin</artifactId>
127-
<version>${version.resources.plugin}</version>
128-
</plugin>
129-
<plugin>
130-
<artifactId>maven-compiler-plugin</artifactId>
131-
<version>${version.compiler.plugin}</version>
132-
</plugin>
133-
<plugin>
134-
<groupId>io.quarkus</groupId>
135-
<artifactId>quarkus-maven-plugin</artifactId>
136-
<version>${version.io.quarkus}</version>
137-
<extensions>true</extensions>
138-
<executions>
139-
<execution>
140-
<goals>
141-
<goal>build</goal>
142-
</goals>
143-
</execution>
144-
</executions>
145-
</plugin>
146-
<plugin>
147-
<artifactId>maven-surefire-plugin</artifactId>
148-
<version>${version.surefire.plugin}</version>
149-
</plugin>
150-
</plugins>
151-
</build>
152-
153-
<profiles>
154-
<profile>
155-
<id>native</id>
156-
<activation>
157-
<property>
158-
<name>native</name>
159-
</property>
160-
</activation>
161-
<build>
162-
<plugins>
163-
<plugin>
164-
<artifactId>maven-failsafe-plugin</artifactId>
165-
<version>${version.surefire.plugin}</version>
166-
<executions>
167-
<execution>
168-
<goals>
169-
<goal>integration-test</goal>
170-
<goal>verify</goal>
171-
</goals>
172-
<configuration>
173-
<systemPropertyVariables>
174-
<native.image.path>
175-
${project.build.directory}/${project.build.finalName}-runner
176-
</native.image.path>
177-
</systemPropertyVariables>
178-
</configuration>
179-
</execution>
180-
</executions>
181-
</plugin>
182-
</plugins>
183-
</build>
184-
<properties>
185-
<quarkus.native.enabled>true</quarkus.native.enabled>
186-
<!-- To allow application.properties to avoid using the in-memory database for native builds. -->
187-
<quarkus.profile>native</quarkus.profile>
188-
</properties>
189-
</profile>
190-
<profile>
191-
<id>container</id>
192-
<activation>
193-
<property>
194-
<name>container</name>
195-
</property>
196-
</activation>
197-
<dependencies>
198-
<dependency>
199-
<groupId>io.quarkus</groupId>
200-
<artifactId>quarkus-container-image-jib</artifactId>
201-
</dependency>
202-
</dependencies>
203-
<properties>
204-
<quarkus.container-image.build>true</quarkus.container-image.build>
205-
</properties>
206-
</profile>
207-
<profile>
208-
<id>enterprise</id>
209-
<activation>
210-
<property>
211-
<name>enterprise</name>
212-
</property>
213-
</activation>
214-
<dependencyManagement>
215-
<dependencies>
216-
<dependency>
217-
<groupId>ai.timefold.solver.enterprise</groupId>
218-
<artifactId>timefold-solver-enterprise-bom</artifactId>
219-
<version>${version.ai.timefold.solver}</version>
220-
<type>pom</type>
221-
<scope>import</scope>
222-
</dependency>
223-
</dependencies>
224-
</dependencyManagement>
225-
<dependencies>
226-
<dependency>
227-
<groupId>ai.timefold.solver.enterprise</groupId>
228-
<artifactId>timefold-solver-enterprise-quarkus</artifactId>
229-
</dependency>
230-
<dependency>
231-
<groupId>ai.timefold.solver.enterprise</groupId>
232-
<artifactId>timefold-solver-enterprise-quarkus-jackson</artifactId>
233-
</dependency>
234-
</dependencies>
235-
<properties>
236-
<quarkus.profile>enterprise</quarkus.profile>
237-
</properties>
238-
</profile>
239-
</profiles>
240-
24121
</project>

0 commit comments

Comments
 (0)