Skip to content

Commit

Permalink
Bump Optaplanner to 8.16.0.Final and enable CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zbendhiba committed Jan 25, 2022
1 parent 097daeb commit d378bf9
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
*/
package org.apache.camel.quarkus.component.optaplanner.deployment;

import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;

class OptaplannerProcessor {

Expand All @@ -30,11 +28,4 @@ FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
}

@BuildStep
void runtimeInitializedClasses(BuildProducer<RuntimeInitializedClassBuildItem> runtimeInitializedClass) {
runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem("org.drools.core.util.Drools$XSTreamChekcer"));
runtimeInitializedClass
.produce(new RuntimeInitializedClassBuildItem("org.drools.compiler.kproject.models.KieModuleMarshaller"));
runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem("org.drools.core.rule.JavaDialectRuntimeData"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@

/**
* adapted from optaplanner quarkus quickstart :
* https://github.com/kiegroup/optaplanner-quickstarts/blob/stable/quarkus-school-timetabling/src/main/java/org/acme/schooltimetabling/bootstrap/DemoDataGenerator.java
*/
* https://github.com/kiegroup/optaplanner-quickstarts/tree/stable/use-cases/school-timetabling
**/
@ApplicationScoped
public class DataGenerator {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

/**
* adapted from optaplanner quarkus quickstart :
* https://github.com/kiegroup/optaplanner-quickstarts/blob/stable/quarkus-school-timetabling/src/main/java/org/acme/schooltimetabling/domain/Lesson.java
* https://github.com/kiegroup/optaplanner-quickstarts/tree/stable/use-cases/school-timetabling
*/
@PlanningEntity
public class Lesson {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

/**
* adapted from optaplanner quarkus quickstart :
* https://github.com/kiegroup/optaplanner-quickstarts/blob/stable/quarkus-school-timetabling/src/main/java/org/acme/schooltimetabling/domain/Room.java
* https://github.com/kiegroup/optaplanner-quickstarts/tree/stable/use-cases/school-timetabling
*/
public class Room {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

/**
* adapted from optaplanner quarkus quickstart :
* https://github.com/kiegroup/optaplanner-quickstarts/blob/stable/quarkus-school-timetabling/src/main/java/org/acme/schooltimetabling/domain/TimeTable.java
* https://github.com/kiegroup/optaplanner-quickstarts/tree/stable/use-cases/school-timetabling
*/
@PlanningSolution
public class TimeTable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

/**
* adapted from optaplanner quarkus quickstart :
* https://github.com/kiegroup/optaplanner-quickstarts/blob/stable/quarkus-school-timetabling/src/main/java/org/acme/schooltimetabling/domain/Timeslot.java
* https://github.com/kiegroup/optaplanner-quickstarts/tree/stable/use-cases/school-timetabling
*/
public class Timeslot {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

/**
* adapted from optaplanner quarkus quickstart :
* https://github.com/quarkusio/quarkus-quickstarts/blob/master/optaplanner-quickstart/src/main/java/org/acme/optaplanner/solver/TimeTableConstraintProvider.java
* https://github.com/kiegroup/optaplanner-quickstarts/tree/stable/use-cases/school-timetabling
*/
public class TimeTableConstraintProvider implements ConstraintProvider {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

########################
# OptaPlanner properties
# adapted from optaplanner quarkus quickstart : https://github.com/quarkusio/quarkus-quickstarts/blob/master/optaplanner-quickstart/src/main/resources/application.properties
# adapted from optaplanner quarkus quickstart : https://github.com/kiegroup/optaplanner-quickstarts/tree/stable/use-cases/school-timetabling
########################

# The solver runs for 30 seconds. To run for 5 minutes use "5m" and for 2 hours use "2h".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@
package org.apache.camel.quarkus.component.optaplanner.it;

import io.quarkus.test.junit.NativeImageTest;
import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable;

// https://github.com/apache/camel-quarkus/issues/2205
@DisabledIfEnvironmentVariable(named = "CI", matches = "true")
@NativeImageTest
class OptaplannerIT extends OptaplannerTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,10 @@
import io.restassured.RestAssured;
import org.apache.camel.quarkus.component.optaplanner.it.domain.TimeTable;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable;

import static org.awaitility.Awaitility.await;
import static org.hamcrest.Matchers.notNullValue;

// https://github.com/apache/camel-quarkus/issues/2205
@DisabledIfEnvironmentVariable(named = "CI", matches = "true")
@QuarkusTest
class OptaplannerTest {

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<camel.sb.docs.branch>camel-spring-boot-${camel.major.minor}.x</camel.sb.docs.branch><!-- The stable camel-spring-boot branch on which our Antora docs depends -->
<cassandra-quarkus.version>1.1.1</cassandra-quarkus.version><!-- https://repo1.maven.org/maven2/com/datastax/oss/quarkus/cassandra-quarkus-bom/ -->
<debezium.version>1.6.1.Final</debezium.version><!-- May go back to Camel's ${debezium-version} when they are in sync https://repo1.maven.org/maven2/io/debezium/debezium-bom/ -->
<optaplanner.version>8.14.0.Final</optaplanner.version><!-- May go back to Camel's ${optaplanner-version} when they are in sync https://repo1.maven.org/maven2/org/optaplanner/optaplanner-quarkus/ -->
<optaplanner.version>8.16.0.Final</optaplanner.version><!-- May go back to Camel's ${optaplanner-version} when they are in sync https://repo1.maven.org/maven2/org/optaplanner/optaplanner-quarkus/ -->
<quarkiverse-amazonservices.version>1.0.3</quarkiverse-amazonservices.version><!-- https://repo1.maven.org/maven2/io/quarkiverse/amazonservices/quarkus-amazon-services-parent/ -->
<quarkiverse-artemis.version>1.0.3</quarkiverse-artemis.version><!-- https://repo1.maven.org/maven2/io/quarkiverse/artemis/quarkus-artemis-parent/ -->
<quarkiverse-freemarker.version>0.3.0</quarkiverse-freemarker.version><!-- https://repo1.maven.org/maven2/io/quarkiverse/freemarker/quarkus-freemarker-parent/ -->
Expand Down

0 comments on commit d378bf9

Please sign in to comment.