You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by po...@apache.org on 2024/05/02 15:29:35 UTC
(incubator-kie-optaplanner) branch main updated: Quarkus LTS Upgrade to 3.8.4 (#3076)
This is an automated email from the ASF dual-hosted git repository.
porcelli pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-optaplanner.git
The following commit(s) were added to refs/heads/main by this push:
new 610b1cc4eb Quarkus LTS Upgrade to 3.8.4 (#3076)
610b1cc4eb is described below
commit 610b1cc4eb1d11a8e9928e18fc40bf0d77503dd8
Author: Alex Porcelli <al...@porcelli.me>
AuthorDate: Thu May 2 17:29:30 2024 +0200
Quarkus LTS Upgrade to 3.8.4 (#3076)
* Removed org.drools.util.RemoveCommentsMain as with the new quarkus version is not useful anymore
* Backport of Timefold migration to new DevUI 2.0
https://github.com/TimefoldAI/timefold-solver/commit/8d5864df897c56b0ccfaaffbbf14908f04db61f4#diff-8b943be542be64385a97ac89619e4bcb7be615cf84f1623acd89357e131226af
* Fix Optaplanner Operator, disabled SSA as with the current version of the code it's broken
* Fixed unstable test
* Quarkus 3.8.3
* Upgrade to and align with Quarkus 3.8.2 LTS release.
* Upgrade to and align with Quarkus 3.8.4 LTS release.
---------
Co-authored-by: Luca Molteni <vo...@gmail.com>
---
build/optaplanner-build-parent/pom.xml | 4 +-
optaplanner-operator/pom.xml | 13 ---
.../impl/solver/OptaPlannerSolverReconciler.java | 19 ++--
.../solver/model/ConfigMapDependentResource.java | 6 +-
.../solver/model/DeploymentDependentResource.java | 4 +-
.../model/keda/ScaledObjectDependentResource.java | 4 +-
.../TriggerAuthenticationDependentResource.java | 4 +-
.../messaging/ArtemisQueueDependentResource.java | 4 +-
.../src/main/resources/application.properties | 8 ++
.../optaplanner-persistence-xstream/pom.xml | 5 +
.../deployment/pom.xml | 24 -----
.../optaplanner-quarkus-benchmark/runtime/pom.xml | 25 -----
.../optaplanner-quarkus-jackson/deployment/pom.xml | 31 ------
.../optaplanner-quarkus-jackson/runtime/pom.xml | 31 ------
.../optaplanner-quarkus-jsonb/deployment/pom.xml | 31 ------
.../optaplanner-quarkus-jsonb/runtime/pom.xml | 31 ------
.../optaplanner-quarkus/deployment/pom.xml | 25 -----
.../quarkus/deployment/OptaPlannerProcessor.java | 52 ++++++++--
.../main/resources/dev-templates/constraints.html | 38 -------
.../src/main/resources/dev-templates/embedded.html | 31 ------
.../src/main/resources/dev-templates/model.html | 66 ------------
.../main/resources/dev-templates/solverConfig.html | 28 ------
.../src/main/resources/dev-ui/config-component.js | 61 +++++++++++
.../main/resources/dev-ui/constraints-component.js | 76 ++++++++++++++
.../src/main/resources/dev-ui/model-component.js | 104 +++++++++++++++++++
.../devui-integration-test/pom.xml | 11 +-
.../quarkus/it/devui/OptaPlannerDevUITest.java | 111 ++++++++-------------
.../optaplanner-quarkus/runtime/pom.xml | 34 ++-----
...a => OptaPlannerDevUIPropertiesRPCService.java} | 73 +++++++++-----
.../quarkus/devui/OptaPlannerDevUIRecorder.java | 16 +++
.../quarkus/devui/SolverConfigText.java | 17 ++++
31 files changed, 445 insertions(+), 542 deletions(-)
diff --git a/build/optaplanner-build-parent/pom.xml b/build/optaplanner-build-parent/pom.xml
index 84658b6abd..9e29c70545 100644
--- a/build/optaplanner-build-parent/pom.xml
+++ b/build/optaplanner-build-parent/pom.xml
@@ -45,8 +45,8 @@
<version.ch.qos.logback>1.4.6</version.ch.qos.logback>
<version.org.apache.logging.log4j>2.20.0</version.org.apache.logging.log4j>
<version.com.thoughtworks.xstream>1.4.20</version.com.thoughtworks.xstream>
- <version.io.quarkiverse.operatorsdk>6.0.3</version.io.quarkiverse.operatorsdk>
- <version.io.quarkus>3.2.10.Final</version.io.quarkus>
+ <version.io.quarkiverse.operatorsdk>6.6.4</version.io.quarkiverse.operatorsdk>
+ <version.io.quarkus>3.8.4</version.io.quarkus>
<version.org.apache.commons.math3>3.6.1</version.org.apache.commons.math3>
<version.org.apache.commons.text>1.10.0</version.org.apache.commons.text>
<version.org.apache.openjpa>4.0.0</version.org.apache.openjpa>
diff --git a/optaplanner-operator/pom.xml b/optaplanner-operator/pom.xml
index b61caf3642..d49f08a2b8 100644
--- a/optaplanner-operator/pom.xml
+++ b/optaplanner-operator/pom.xml
@@ -44,19 +44,6 @@
<java.module.name>org.optaplanner.operator</java.module.name>
</properties>
- <!-- TODO: Remove when OptaPlanner no longer supports Quarkus 2.13 -->
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-bom</artifactId>
- <version>${version.io.quarkus}</version>
- <scope>import</scope>
- <type>pom</type>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
<dependencies>
<dependency>
<groupId>io.quarkiverse.operatorsdk</groupId>
diff --git a/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/OptaPlannerSolverReconciler.java b/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/OptaPlannerSolverReconciler.java
index 11b61cc73c..d3946a4b25 100644
--- a/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/OptaPlannerSolverReconciler.java
+++ b/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/OptaPlannerSolverReconciler.java
@@ -46,6 +46,7 @@ import io.javaoperatorsdk.operator.api.reconciler.ResourceIDMatcherDiscriminator
import io.javaoperatorsdk.operator.api.reconciler.UpdateControl;
import io.javaoperatorsdk.operator.processing.event.ResourceID;
import io.javaoperatorsdk.operator.processing.event.source.EventSource;
+import io.quarkiverse.operatorsdk.runtime.QuarkusConfigurationService;
@ControllerConfiguration(name = "optaplanner-solver")
public final class OptaPlannerSolverReconciler implements Reconciler<OptaPlannerSolver>, ErrorStatusHandler<OptaPlannerSolver>,
@@ -61,13 +62,17 @@ public final class OptaPlannerSolverReconciler implements Reconciler<OptaPlanner
private final ScaledObjectDependentResource scaledObjectDependentResource;
@Inject
- public OptaPlannerSolverReconciler(KubernetesClient kubernetesClient) {
- deploymentDependentResource = new DeploymentDependentResource(kubernetesClient);
- inputQueueDependentResource = new ArtemisQueueDependentResource(MessageAddress.INPUT, kubernetesClient);
- outputQueueDependentResource = new ArtemisQueueDependentResource(MessageAddress.OUTPUT, kubernetesClient);
- configMapDependentResource = new ConfigMapDependentResource(kubernetesClient);
- triggerAuthenticationDependentResource = new TriggerAuthenticationDependentResource(kubernetesClient);
- scaledObjectDependentResource = new ScaledObjectDependentResource(kubernetesClient);
+ QuarkusConfigurationService configurationService;
+
+ @Inject
+ public OptaPlannerSolverReconciler() {
+
+ deploymentDependentResource = new DeploymentDependentResource();
+ inputQueueDependentResource = new ArtemisQueueDependentResource(MessageAddress.INPUT);
+ outputQueueDependentResource = new ArtemisQueueDependentResource(MessageAddress.OUTPUT);
+ configMapDependentResource = new ConfigMapDependentResource();
+ triggerAuthenticationDependentResource = new TriggerAuthenticationDependentResource();
+ scaledObjectDependentResource = new ScaledObjectDependentResource();
inputQueueDependentResource.setResourceDiscriminator(new ResourceIDMatcherDiscriminator<>(
optaPlannerSolver -> new ResourceID(optaPlannerSolver.getInputMessageAddressName(),
diff --git a/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/model/ConfigMapDependentResource.java b/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/model/ConfigMapDependentResource.java
index 61b6d4c4a7..cb8ed09541 100644
--- a/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/model/ConfigMapDependentResource.java
+++ b/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/model/ConfigMapDependentResource.java
@@ -24,7 +24,6 @@ import java.util.Map;
import io.fabric8.kubernetes.api.model.ConfigMap;
import io.fabric8.kubernetes.api.model.ConfigMapBuilder;
-import io.fabric8.kubernetes.client.KubernetesClient;
import io.javaoperatorsdk.operator.api.reconciler.Context;
import io.javaoperatorsdk.operator.processing.dependent.kubernetes.CRUDKubernetesDependentResource;
import io.javaoperatorsdk.operator.processing.dependent.kubernetes.KubernetesDependent;
@@ -37,9 +36,8 @@ public final class ConfigMapDependentResource extends CRUDKubernetesDependentRes
public static final String SOLVER_MESSAGE_AMQ_HOST_KEY = "solver.amq.host";
public static final String SOLVER_MESSAGE_AMQ_PORT_KEY = "solver.amq.port";
- public ConfigMapDependentResource(KubernetesClient kubernetesClient) {
+ public ConfigMapDependentResource() {
super(ConfigMap.class);
- setKubernetesClient(kubernetesClient);
}
@Override
@@ -63,7 +61,7 @@ public final class ConfigMapDependentResource extends CRUDKubernetesDependentRes
public ConfigMap update(ConfigMap actual, ConfigMap target, OptaPlannerSolver solver, Context<OptaPlannerSolver> context) {
ConfigMap resultingConfigMap = super.update(actual, target, solver, context);
String namespace = actual.getMetadata().getNamespace();
- getKubernetesClient()
+ context.getClient()
.pods()
.inNamespace(namespace)
.withLabel("app", solver.getMetadata().getName())
diff --git a/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/model/DeploymentDependentResource.java b/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/model/DeploymentDependentResource.java
index 297f68fa2b..b78f4bffc0 100644
--- a/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/model/DeploymentDependentResource.java
+++ b/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/model/DeploymentDependentResource.java
@@ -32,7 +32,6 @@ import io.fabric8.kubernetes.api.model.SecretKeySelector;
import io.fabric8.kubernetes.api.model.apps.Deployment;
import io.fabric8.kubernetes.api.model.apps.DeploymentBuilder;
import io.fabric8.kubernetes.api.model.apps.DeploymentSpecBuilder;
-import io.fabric8.kubernetes.client.KubernetesClient;
import io.javaoperatorsdk.operator.api.reconciler.Context;
import io.javaoperatorsdk.operator.processing.dependent.kubernetes.CRUDKubernetesDependentResource;
import io.javaoperatorsdk.operator.processing.dependent.kubernetes.KubernetesDependent;
@@ -47,9 +46,8 @@ public final class DeploymentDependentResource extends CRUDKubernetesDependentRe
private static final String ENV_AMQ_USERNAME = "SOLVER_MESSAGE_AMQ_USERNAME";
private static final String ENV_AMQ_PASSWORD = "SOLVER_MESSAGE_AMQ_PASSWORD";
- public DeploymentDependentResource(KubernetesClient k8s) {
+ public DeploymentDependentResource() {
super(Deployment.class);
- setKubernetesClient(k8s);
}
@Override
diff --git a/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/model/keda/ScaledObjectDependentResource.java b/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/model/keda/ScaledObjectDependentResource.java
index 98a6842776..d5b0f8f396 100644
--- a/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/model/keda/ScaledObjectDependentResource.java
+++ b/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/model/keda/ScaledObjectDependentResource.java
@@ -25,7 +25,6 @@ import org.optaplanner.operator.impl.solver.model.common.ResourceNameReference;
import io.fabric8.kubernetes.api.model.ObjectMeta;
import io.fabric8.kubernetes.api.model.ObjectMetaBuilder;
-import io.fabric8.kubernetes.client.KubernetesClient;
import io.javaoperatorsdk.operator.api.reconciler.Context;
import io.javaoperatorsdk.operator.processing.dependent.kubernetes.CRUDKubernetesDependentResource;
import io.javaoperatorsdk.operator.processing.dependent.kubernetes.KubernetesDependent;
@@ -75,9 +74,8 @@ public final class ScaledObjectDependentResource extends CRUDKubernetesDependent
*/
private static final int TARGET_QUEUE_LENGTH = 1;
- public ScaledObjectDependentResource(KubernetesClient kubernetesClient) {
+ public ScaledObjectDependentResource() {
super(ScaledObject.class);
- setKubernetesClient(kubernetesClient);
}
@Override
diff --git a/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/model/keda/TriggerAuthenticationDependentResource.java b/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/model/keda/TriggerAuthenticationDependentResource.java
index 51398a1e39..a788fe81ea 100644
--- a/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/model/keda/TriggerAuthenticationDependentResource.java
+++ b/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/model/keda/TriggerAuthenticationDependentResource.java
@@ -24,7 +24,6 @@ import org.optaplanner.operator.impl.solver.model.OptaPlannerSolver;
import io.fabric8.kubernetes.api.model.ObjectMeta;
import io.fabric8.kubernetes.api.model.ObjectMetaBuilder;
import io.fabric8.kubernetes.api.model.SecretKeySelector;
-import io.fabric8.kubernetes.client.KubernetesClient;
import io.javaoperatorsdk.operator.api.reconciler.Context;
import io.javaoperatorsdk.operator.processing.dependent.kubernetes.CRUDKubernetesDependentResource;
import io.javaoperatorsdk.operator.processing.dependent.kubernetes.KubernetesDependent;
@@ -54,9 +53,8 @@ public final class TriggerAuthenticationDependentResource
public static final String PARAM_USERNAME = "username";
public static final String PARAM_PASSWORD = "password";
- public TriggerAuthenticationDependentResource(KubernetesClient kubernetesClient) {
+ public TriggerAuthenticationDependentResource() {
super(TriggerAuthentication.class);
- setKubernetesClient(kubernetesClient);
}
@Override
diff --git a/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/model/messaging/ArtemisQueueDependentResource.java b/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/model/messaging/ArtemisQueueDependentResource.java
index 082a3a3943..0c5bf82002 100644
--- a/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/model/messaging/ArtemisQueueDependentResource.java
+++ b/optaplanner-operator/src/main/java/org/optaplanner/operator/impl/solver/model/messaging/ArtemisQueueDependentResource.java
@@ -23,7 +23,6 @@ import org.optaplanner.operator.impl.solver.model.OptaPlannerSolver;
import io.fabric8.kubernetes.api.model.ObjectMeta;
import io.fabric8.kubernetes.api.model.ObjectMetaBuilder;
-import io.fabric8.kubernetes.client.KubernetesClient;
import io.javaoperatorsdk.operator.api.reconciler.Context;
import io.javaoperatorsdk.operator.processing.dependent.kubernetes.CRUDKubernetesDependentResource;
import io.javaoperatorsdk.operator.processing.dependent.kubernetes.KubernetesDependent;
@@ -31,10 +30,9 @@ import io.javaoperatorsdk.operator.processing.dependent.kubernetes.KubernetesDep
@KubernetesDependent
public final class ArtemisQueueDependentResource extends CRUDKubernetesDependentResource<ArtemisQueue, OptaPlannerSolver> {
- public ArtemisQueueDependentResource(MessageAddress messageAddress, KubernetesClient kubernetesClient) {
+ public ArtemisQueueDependentResource(MessageAddress messageAddress) {
super(ArtemisQueue.class);
this.messageAddress = messageAddress;
- setKubernetesClient(kubernetesClient);
}
private final MessageAddress messageAddress;
diff --git a/optaplanner-operator/src/main/resources/application.properties b/optaplanner-operator/src/main/resources/application.properties
index be41ebafb5..8672871dc9 100644
--- a/optaplanner-operator/src/main/resources/application.properties
+++ b/optaplanner-operator/src/main/resources/application.properties
@@ -17,7 +17,15 @@
# under the License.
#
+
quarkus.operator-sdk.crd.apply=true
+
+# New version of the operator use SSA, a different algorithm for creating resources
+# that needs some changes. In the meanwhile this feature flag reverts to the old behaviour
+# See https://javaoperatorsdk.io/docs/dependent-resources#comparing-desired-and-actual-state-matching
+# And https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationService.java#L332-L358
+quarkus.operator-sdk.enable-ssa=false
+
quarkus.log.category."io.quarkiverse.operatorsdk".level=ERROR
########################
diff --git a/optaplanner-persistence/optaplanner-persistence-xstream/pom.xml b/optaplanner-persistence/optaplanner-persistence-xstream/pom.xml
index 8f65d97677..113de384d1 100644
--- a/optaplanner-persistence/optaplanner-persistence-xstream/pom.xml
+++ b/optaplanner-persistence/optaplanner-persistence-xstream/pom.xml
@@ -77,6 +77,11 @@
<artifactId>graal-sdk</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.graalvm.sdk</groupId>
+ <artifactId>nativeimage</artifactId>
+ <scope>provided</scope>
+ </dependency>
<!-- Testing -->
<dependency>
<groupId>org.junit.jupiter</groupId>
diff --git a/optaplanner-quarkus-integration/optaplanner-quarkus-benchmark/deployment/pom.xml b/optaplanner-quarkus-integration/optaplanner-quarkus-benchmark/deployment/pom.xml
index 2f0c2960a3..9ec3c94eda 100644
--- a/optaplanner-quarkus-integration/optaplanner-quarkus-benchmark/deployment/pom.xml
+++ b/optaplanner-quarkus-integration/optaplanner-quarkus-benchmark/deployment/pom.xml
@@ -123,30 +123,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <!-- Remove comments from META-INF/quarkus-extension.properties -->
- <!-- This is needed because the file generated by quarkus contains a timestamp in a comment that makes the build not reproducible -->
- <!-- This workaround can be removed when drools will be migrated to quarkus release containing this fix https://github.com/quarkusio/quarkus/pull/38365 -->
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>${version.maven-exec-plugin}</version>
- <executions>
- <execution>
- <id>Remove comments from quarkus-extension.properties</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>java</goal>
- </goals>
- <configuration>
- <mainClass>org.drools.util.RemoveCommentsMain</mainClass>
- <arguments>
- <argument>${project.basedir}/target/classes/META-INF/quarkus-javadoc.properties</argument>
- <argument>${project.basedir}/target/generated-sources/annotations/org/optaplanner/benchmark/quarkus/deployment/OptaPlannerBenchmarkBuildTimeConfig.jdp</argument>
- </arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
diff --git a/optaplanner-quarkus-integration/optaplanner-quarkus-benchmark/runtime/pom.xml b/optaplanner-quarkus-integration/optaplanner-quarkus-benchmark/runtime/pom.xml
index bc6f9a49de..2dcbb2d5a5 100644
--- a/optaplanner-quarkus-integration/optaplanner-quarkus-benchmark/runtime/pom.xml
+++ b/optaplanner-quarkus-integration/optaplanner-quarkus-benchmark/runtime/pom.xml
@@ -111,31 +111,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <!-- Remove comments from META-INF/quarkus-extension.properties -->
- <!-- This is needed because the file generated by quarkus contains a timestamp in a comment that makes the build not reproducible -->
- <!-- This workaround can be removed when drools will be migrated to quarkus release containing this fix https://github.com/quarkusio/quarkus/pull/38365 -->
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>${version.maven-exec-plugin}</version>
- <executions>
- <execution>
- <id>Remove comments from quarkus-extension.properties</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>java</goal>
- </goals>
- <configuration>
- <mainClass>org.drools.util.RemoveCommentsMain</mainClass>
- <arguments>
- <argument>${project.basedir}/target/classes/META-INF/quarkus-extension.properties</argument>
- <argument>${project.basedir}/target/classes/META-INF/quarkus-javadoc.properties</argument>
- <argument>${project.basedir}/target/generated-sources/annotations/org/optaplanner/benchmark/quarkus/config/OptaPlannerBenchmarkRuntimeConfig.jdp</argument>
- </arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
</project>
diff --git a/optaplanner-quarkus-integration/optaplanner-quarkus-jackson/deployment/pom.xml b/optaplanner-quarkus-integration/optaplanner-quarkus-jackson/deployment/pom.xml
index 816c230f29..950f767c91 100644
--- a/optaplanner-quarkus-integration/optaplanner-quarkus-jackson/deployment/pom.xml
+++ b/optaplanner-quarkus-integration/optaplanner-quarkus-jackson/deployment/pom.xml
@@ -75,37 +75,6 @@
</annotationProcessorPaths>
</configuration>
</plugin>
- <plugin>
- <!-- Remove comments from META-INF/quarkus-extension.properties -->
- <!-- This is needed because the file generated by quarkus contains a timestamp in a comment that makes the build not reproducible -->
- <!-- This workaround can be removed when drools will be migrated to quarkus release containing this fix https://github.com/quarkusio/quarkus/pull/38365 -->
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>${version.maven-exec-plugin}</version>
- <dependencies>
- <dependency>
- <groupId>org.drools</groupId>
- <artifactId>drools-util</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>Remove comments from quarkus-extension.properties</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>java</goal>
- </goals>
- <configuration>
- <includePluginDependencies>true</includePluginDependencies>
- <mainClass>org.drools.util.RemoveCommentsMain</mainClass>
- <arguments>
- <argument>${project.basedir}/target/classes/META-INF/quarkus-javadoc.properties</argument>
- </arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
diff --git a/optaplanner-quarkus-integration/optaplanner-quarkus-jackson/runtime/pom.xml b/optaplanner-quarkus-integration/optaplanner-quarkus-jackson/runtime/pom.xml
index 929f307ab8..f42a2da5be 100644
--- a/optaplanner-quarkus-integration/optaplanner-quarkus-jackson/runtime/pom.xml
+++ b/optaplanner-quarkus-integration/optaplanner-quarkus-jackson/runtime/pom.xml
@@ -102,37 +102,6 @@
</ignoredUnusedDeclaredDependencies>
</configuration>
</plugin>
- <plugin>
- <!-- Remove comments from META-INF/quarkus-extension.properties -->
- <!-- This is needed because the file generated by quarkus contains a timestamp in a comment that makes the build not reproducible -->
- <!-- This workaround can be removed when drools will be migrated to quarkus release containing this fix https://github.com/quarkusio/quarkus/pull/38365 -->
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>${version.maven-exec-plugin}</version>
- <dependencies>
- <dependency>
- <groupId>org.drools</groupId>
- <artifactId>drools-util</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>Remove comments from quarkus-extension.properties</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>java</goal>
- </goals>
- <configuration>
- <includePluginDependencies>true</includePluginDependencies>
- <mainClass>org.drools.util.RemoveCommentsMain</mainClass>
- <arguments>
- <argument>${project.basedir}/target/classes/META-INF/quarkus-extension.properties</argument>
- </arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
</project>
diff --git a/optaplanner-quarkus-integration/optaplanner-quarkus-jsonb/deployment/pom.xml b/optaplanner-quarkus-integration/optaplanner-quarkus-jsonb/deployment/pom.xml
index c79575889b..353abd04b7 100644
--- a/optaplanner-quarkus-integration/optaplanner-quarkus-jsonb/deployment/pom.xml
+++ b/optaplanner-quarkus-integration/optaplanner-quarkus-jsonb/deployment/pom.xml
@@ -75,37 +75,6 @@
</annotationProcessorPaths>
</configuration>
</plugin>
- <plugin>
- <!-- Remove comments from META-INF/quarkus-extension.properties -->
- <!-- This is needed because the file generated by quarkus contains a timestamp in a comment that makes the build not reproducible -->
- <!-- This workaround can be removed when drools will be migrated to quarkus release containing this fix https://github.com/quarkusio/quarkus/pull/38365 -->
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>${version.maven-exec-plugin}</version>
- <dependencies>
- <dependency>
- <groupId>org.drools</groupId>
- <artifactId>drools-util</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>Remove comments from quarkus-extension.properties</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>java</goal>
- </goals>
- <configuration>
- <includePluginDependencies>true</includePluginDependencies>
- <mainClass>org.drools.util.RemoveCommentsMain</mainClass>
- <arguments>
- <argument>${project.basedir}/target/classes/META-INF/quarkus-javadoc.properties</argument>
- </arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
</project>
diff --git a/optaplanner-quarkus-integration/optaplanner-quarkus-jsonb/runtime/pom.xml b/optaplanner-quarkus-integration/optaplanner-quarkus-jsonb/runtime/pom.xml
index 89e4270466..e1d07f0335 100644
--- a/optaplanner-quarkus-integration/optaplanner-quarkus-jsonb/runtime/pom.xml
+++ b/optaplanner-quarkus-integration/optaplanner-quarkus-jsonb/runtime/pom.xml
@@ -94,37 +94,6 @@
</annotationProcessorPaths>
</configuration>
</plugin>
- <plugin>
- <!-- Remove comments from META-INF/quarkus-extension.properties -->
- <!-- This is needed because the file generated by quarkus contains a timestamp in a comment that makes the build not reproducible -->
- <!-- This workaround can be removed when drools will be migrated to quarkus release containing this fix https://github.com/quarkusio/quarkus/pull/38365 -->
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>${version.maven-exec-plugin}</version>
- <dependencies>
- <dependency>
- <groupId>org.drools</groupId>
- <artifactId>drools-util</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>Remove comments from quarkus-extension.properties</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>java</goal>
- </goals>
- <configuration>
- <includePluginDependencies>true</includePluginDependencies>
- <mainClass>org.drools.util.RemoveCommentsMain</mainClass>
- <arguments>
- <argument>${project.basedir}/target/classes/META-INF/quarkus-extension.properties</argument>
- </arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
</project>
diff --git a/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/pom.xml b/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/pom.xml
index 631c13f0be..139cd6f880 100644
--- a/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/pom.xml
+++ b/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/pom.xml
@@ -130,31 +130,6 @@
</systemPropertyVariables>
</configuration>
</plugin>
- <plugin>
- <!-- Remove comments from META-INF/quarkus-javadoc.properties -->
- <!-- This is needed because the file generated by quarkus contains a timestamp in a comment that makes the build not reproducible -->
- <!-- This workaround can be removed when drools will be migrated to quarkus release containing this fix https://github.com/quarkusio/quarkus/pull/38365 -->
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>${version.maven-exec-plugin}</version>
- <executions>
- <execution>
- <id>Run Script</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>java</goal>
- </goals>
- <configuration>
- <mainClass>org.drools.util.RemoveCommentsMain</mainClass>
- <arguments>
- <argument>${project.basedir}/target/classes/META-INF/quarkus-javadoc.properties</argument>
- <argument>${project.basedir}/target/generated-sources/annotations/org/optaplanner/quarkus/deployment/config/OptaPlannerBuildTimeConfig.jdp</argument>
- <argument>${project.basedir}/target/generated-sources/annotations/org/optaplanner/quarkus/deployment/config/SolverBuildTimeConfig.jdp</argument>
- </arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
diff --git a/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/java/org/optaplanner/quarkus/deployment/OptaPlannerProcessor.java b/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/java/org/optaplanner/quarkus/deployment/OptaPlannerProcessor.java
index 1a98bbbad8..c31adfd5e1 100644
--- a/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/java/org/optaplanner/quarkus/deployment/OptaPlannerProcessor.java
+++ b/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/java/org/optaplanner/quarkus/deployment/OptaPlannerProcessor.java
@@ -35,6 +35,7 @@ import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
+import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Singleton;
import org.jboss.jandex.AnnotationInstance;
@@ -68,7 +69,9 @@ import org.optaplanner.quarkus.bean.DefaultOptaPlannerBeanProvider;
import org.optaplanner.quarkus.bean.UnavailableOptaPlannerBeanProvider;
import org.optaplanner.quarkus.config.OptaPlannerRuntimeConfig;
import org.optaplanner.quarkus.deployment.config.OptaPlannerBuildTimeConfig;
-import org.optaplanner.quarkus.devui.OptaPlannerDevUIPropertiesSupplier;
+import org.optaplanner.quarkus.devui.OptaPlannerDevUIPropertiesRPCService;
+import org.optaplanner.quarkus.devui.OptaPlannerDevUIRecorder;
+import org.optaplanner.quarkus.devui.SolverConfigText;
import org.optaplanner.quarkus.gizmo.OptaPlannerGizmoBeanFactory;
import io.quarkus.arc.deployment.AdditionalBeanBuildItem;
@@ -89,11 +92,12 @@ import io.quarkus.deployment.builditem.HotDeploymentWatchedFileBuildItem;
import io.quarkus.deployment.builditem.IndexDependencyBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem;
-import io.quarkus.deployment.pkg.builditem.CurateOutcomeBuildItem;
import io.quarkus.deployment.pkg.steps.NativeBuild;
import io.quarkus.deployment.recording.RecorderContext;
import io.quarkus.deployment.util.ServiceUtil;
-import io.quarkus.devconsole.spi.DevConsoleRuntimeTemplateInfoBuildItem;
+import io.quarkus.devui.spi.JsonRPCProvidersBuildItem;
+import io.quarkus.devui.spi.page.CardPageBuildItem;
+import io.quarkus.devui.spi.page.Page;
import io.quarkus.gizmo.ClassOutput;
import io.quarkus.gizmo.MethodDescriptor;
import io.quarkus.gizmo.ResultHandle;
@@ -167,20 +171,48 @@ class OptaPlannerProcessor {
}
@BuildStep(onlyIf = IsDevelopment.class)
- public DevConsoleRuntimeTemplateInfoBuildItem getSolverConfig(SolverConfigBuildItem solverConfigBuildItem,
- CurateOutcomeBuildItem curateOutcomeBuildItem) {
+ @Record(STATIC_INIT)
+ public CardPageBuildItem registerDevUICard(
+ OptaPlannerDevUIRecorder devUIRecorder,
+ SolverConfigBuildItem solverConfigBuildItem,
+ BuildProducer<SyntheticBeanBuildItem> syntheticBeans) {
+ CardPageBuildItem cardPageBuildItem = new CardPageBuildItem();
SolverConfig solverConfig = solverConfigBuildItem.getSolverConfig();
if (solverConfig != null) {
StringWriter effectiveSolverConfigWriter = new StringWriter();
SolverConfigIO solverConfigIO = new SolverConfigIO();
solverConfigIO.write(solverConfig, effectiveSolverConfigWriter);
- return new DevConsoleRuntimeTemplateInfoBuildItem("solverConfigProperties",
- new OptaPlannerDevUIPropertiesSupplier(effectiveSolverConfigWriter.toString()), this.getClass(),
- curateOutcomeBuildItem);
+ syntheticBeans.produce(SyntheticBeanBuildItem.configure(SolverConfigText.class)
+ .scope(ApplicationScoped.class)
+ .supplier(devUIRecorder.solverConfigTextSupplier(effectiveSolverConfigWriter.toString()))
+ .done());
} else {
- return new DevConsoleRuntimeTemplateInfoBuildItem("solverConfigProperties",
- new OptaPlannerDevUIPropertiesSupplier(), this.getClass(), curateOutcomeBuildItem);
+ syntheticBeans.produce(SyntheticBeanBuildItem.configure(SolverConfigText.class)
+ .scope(ApplicationScoped.class)
+ .supplier(devUIRecorder.solverConfigTextSupplier(""))
+ .done());
}
+ cardPageBuildItem.addPage(Page.webComponentPageBuilder()
+ .title("Configuration")
+ .icon("font-awesome-solid:wrench")
+ .componentLink("config-component.js"));
+
+ cardPageBuildItem.addPage(Page.webComponentPageBuilder()
+ .title("Model")
+ .icon("font-awesome-solid:wrench")
+ .componentLink("model-component.js"));
+
+ cardPageBuildItem.addPage(Page.webComponentPageBuilder()
+ .title("Constraints")
+ .icon("font-awesome-solid:wrench")
+ .componentLink("constraints-component.js"));
+
+ return cardPageBuildItem;
+ }
+
+ @BuildStep(onlyIf = IsDevelopment.class)
+ public JsonRPCProvidersBuildItem registerRPCService() {
+ return new JsonRPCProvidersBuildItem("OptaPlanner Solver", OptaPlannerDevUIPropertiesRPCService.class);
}
/**
diff --git a/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/resources/dev-templates/constraints.html b/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/resources/dev-templates/constraints.html
deleted file mode 100644
index a5aa440f47..0000000000
--- a/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/resources/dev-templates/constraints.html
+++ /dev/null
@@ -1,38 +0,0 @@
-{#include main}
-
-{#title}Constraints{/title}
-
-{#body}
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<table class="table table-striped" id="optaplanner-constraints">
- <thead class="thead-dark">
- <tr>
- <th scope="col">Constraints</th>
- </tr>
- </thead>
- <tbody>
- {#for constraint in info:solverConfigProperties.constraintList}
- <tr><td>{constraint}</td></tr>
- {/for}
- </tbody>
-</table>
-{/body}
-{/include}
\ No newline at end of file
diff --git a/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/resources/dev-templates/embedded.html b/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/resources/dev-templates/embedded.html
deleted file mode 100644
index 65f9ab012b..0000000000
--- a/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/resources/dev-templates/embedded.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<a href="{urlbase}/solverConfig" class="badge badge-light">
- <i class="fas fa-wrench"></i>
- View Effective Solver Configuration
-</a>
-<a href="{urlbase}/model" class="badge badge-light">
- <i class="fas fa-wrench"></i>
- View Model
-</a>
-<a href="{urlbase}/constraints" class="badge badge-light">
- <i class="fas fa-wrench"></i>
- View Constraints
-</a>
\ No newline at end of file
diff --git a/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/resources/dev-templates/model.html b/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/resources/dev-templates/model.html
deleted file mode 100644
index f3ff0a5616..0000000000
--- a/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/resources/dev-templates/model.html
+++ /dev/null
@@ -1,66 +0,0 @@
-{#include main}
-
-{#title}Model{/title}
-
-{#body}
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<div class="card h-100 shadow" id="optaplanner-model">
- <div class="card-header bg-primary text-light">Solution: {info:solverConfigProperties.optaPlannerModelProperties.solutionClass}</div>
- <div class="card-body">
- {#for entityClass in info:solverConfigProperties.optaPlannerModelProperties.entityClassList}
- <div class="card h-100 shadow">
- <div class="card-header">Entity: {entityClass}</div>
- <div class="card-body">
- {#if !info:solverConfigProperties.optaPlannerModelProperties.entityClassToGenuineVariableListMap.get(entityClass).isEmpty()}
- <table class="table table-striped">
- <thead class="thead-dark">
- <tr>
- <th scope="col">Genuine Variables</th>
- </tr>
- </thead>
- <tbody>
- {#for genuineVariable in info:solverConfigProperties.optaPlannerModelProperties.entityClassToGenuineVariableListMap.get(entityClass)}
- <tr><td>{genuineVariable}</td></tr>
- {/for}
- </tbody>
- </table>
- {/if}
- {#if !info:solverConfigProperties.optaPlannerModelProperties.entityClassToShadowVariableListMap.get(entityClass).isEmpty()}
- <table class="table table-striped">
- <thead class="thead-dark">
- <tr>
- <th scope="col">Shadow Variables</th>
- </tr>
- </thead>
- <tbody>
- {#for shadowVariable in info:solverConfigProperties.optaPlannerModelProperties.entityClassToShadowVariableListMap.get(entityClass)}
- <tr><td>{shadowVariable}</td></tr>
- {/for}
- </tbody>
- </table>
- {/if}
- </div>
- </div>
- {/for}
- </div>
-</div>
-{/body}
-{/include}
\ No newline at end of file
diff --git a/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/resources/dev-templates/solverConfig.html b/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/resources/dev-templates/solverConfig.html
deleted file mode 100644
index b9addea38d..0000000000
--- a/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/resources/dev-templates/solverConfig.html
+++ /dev/null
@@ -1,28 +0,0 @@
-{#include main}
-
-{#title}Solver Configuration{/title}
-{#body}
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<pre id="optaplanner-solver-config">
-{info:solverConfigProperties.effectiveSolverConfig}
-</pre>
-{/body}
-{/include}
\ No newline at end of file
diff --git a/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/resources/dev-ui/config-component.js b/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/resources/dev-ui/config-component.js
new file mode 100644
index 0000000000..2394eb9ca5
--- /dev/null
+++ b/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/resources/dev-ui/config-component.js
@@ -0,0 +1,61 @@
+import {css, html, LitElement} from 'lit';
+import {JsonRpc} from 'jsonrpc';
+import '@vaadin/icon';
+import '@vaadin/button';
+import {until} from 'lit/directives/until.js';
+import '@vaadin/grid';
+import '@vaadin/grid/vaadin-grid-sort-column.js';
+
+export class ConfigComponent extends LitElement {
+
+ jsonRpc = new JsonRpc("OptaPlanner Solver");
+
+ // Component style
+ static styles = css`
+ .button {
+ background-color: transparent;
+ cursor: pointer;
+ }
+
+ .clearIcon {
+ color: orange;
+ }
+ `;
+
+ // Component properties
+ static properties = {
+ "_config": {state: true}
+ }
+
+ // Components callbacks
+
+ /**
+ * Called when displayed
+ */
+ connectedCallback() {
+ super.connectedCallback();
+ this.jsonRpc.getConfig().then(jsonRpcResponse => {
+ this._config = jsonRpcResponse.result.config;
+ });
+ }
+
+ /**
+ * Called when it needs to render the components
+ * @returns {*}
+ */
+ render() {
+ return html`${until(this._renderConfig(), html`<span>Loading config...</span>`)}`;
+ }
+
+ // View / Templates
+
+ _renderConfig() {
+ if (this._config) {
+ let config = this._config;
+ return html`
+ <pre>${config}</pre>`;
+ }
+ }
+}
+
+customElements.define('config-component', ConfigComponent);
\ No newline at end of file
diff --git a/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/resources/dev-ui/constraints-component.js b/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/resources/dev-ui/constraints-component.js
new file mode 100644
index 0000000000..c8d1e7a43e
--- /dev/null
+++ b/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/resources/dev-ui/constraints-component.js
@@ -0,0 +1,76 @@
+import {css, html, LitElement} from 'lit';
+import {JsonRpc} from 'jsonrpc';
+import '@vaadin/icon';
+import '@vaadin/button';
+import {until} from 'lit/directives/until.js';
+import '@vaadin/grid';
+import {columnBodyRenderer} from '@vaadin/grid/lit.js';
+import '@vaadin/grid/vaadin-grid-sort-column.js';
+
+export class ConstraintsComponent extends LitElement {
+
+ jsonRpc = new JsonRpc("OptaPlanner Solver");
+
+ // Component style
+ static styles = css`
+ .button {
+ background-color: transparent;
+ cursor: pointer;
+ }
+
+ .clearIcon {
+ color: orange;
+ }
+ `;
+
+ // Component properties
+ static properties = {
+ "_constraints": {state: true}
+ }
+
+ // Components callbacks
+
+ /**
+ * Called when displayed
+ */
+ connectedCallback() {
+ super.connectedCallback();
+ this.jsonRpc.getConstraints().then(jsonRpcResponse => {
+ this._constraints = [];
+ jsonRpcResponse.result.forEach(c => {
+ this._constraints.push(c);
+ });
+ });
+ }
+
+ /**
+ * Called when it needs to render the components
+ * @returns {*}
+ */
+ render() {
+ return html`${until(this._renderConstraintTable(), html`<span>Loading constraints...</span>`)}`;
+ }
+
+ // View / Templates
+
+ _renderConstraintTable() {
+ if (this._constraints) {
+ let constraints = this._constraints;
+ return html`
+ <vaadin-grid .items="${constraints}" class="datatable" theme="no-border">
+ <vaadin-grid-column auto-width
+ header="Name"
+ ${columnBodyRenderer(this._nameRenderer, [])}>
+ </vaadin-grid-column>
+ </vaadin-grid>`;
+ }
+ }
+
+ _nameRenderer(constraint) {
+ return html`
+ ${constraint}`;
+ }
+
+}
+
+customElements.define('constraints-component', ConstraintsComponent);
\ No newline at end of file
diff --git a/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/resources/dev-ui/model-component.js b/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/resources/dev-ui/model-component.js
new file mode 100644
index 0000000000..30fb0b34d6
--- /dev/null
+++ b/optaplanner-quarkus-integration/optaplanner-quarkus/deployment/src/main/resources/dev-ui/model-component.js
@@ -0,0 +1,104 @@
+import {css, html, LitElement} from 'lit';
+import {JsonRpc} from 'jsonrpc';
+import '@vaadin/icon';
+import '@vaadin/button';
+import {until} from 'lit/directives/until.js';
+import '@vaadin/grid';
+import {columnBodyRenderer} from '@vaadin/grid/lit.js';
+import '@vaadin/grid/vaadin-grid-sort-column.js';
+
+export class ModelComponent extends LitElement {
+
+ jsonRpc = new JsonRpc("OptaPlanner Solver");
+
+ // Component style
+ static styles = css`
+ .button {
+ background-color: transparent;
+ cursor: pointer;
+ }
+
+ .clearIcon {
+ color: orange;
+ }
+ `;
+
+ // Component properties
+ static properties = {
+ "_model": {state: true}
+ }
+
+ // Components callbacks
+
+ /**
+ * Called when displayed
+ */
+ connectedCallback() {
+ super.connectedCallback();
+ this.jsonRpc.getModelInfo().then(jsonRpcResponse => {
+ this._model = {};
+ this._model.solutionClass = jsonRpcResponse.result.solutionClass;
+ this._model.entityInfoList = [];
+ jsonRpcResponse.result.entityClassList.forEach(entityClass => {
+ const entityInfo = {};
+ entityInfo.name = entityClass;
+ entityInfo.genuineVariableList = jsonRpcResponse.result.entityClassToGenuineVariableListMap[entityClass];
+ entityInfo.shadowVariableList = jsonRpcResponse.result.entityClassToShadowVariableListMap[entityClass];
+ this._model.entityInfoList.push(entityInfo);
+ });
+ });
+ }
+
+ /**
+ * Called when it needs to render the components
+ * @returns {*}
+ */
+ render() {
+ return html`${until(this._renderModel(), html`<span>Loading model...</span>`)}`;
+ }
+
+ // View / Templates
+
+ _renderModel() {
+ if (this._model) {
+ let model = this._model;
+ return html`
+ <div>
+ <span>Solution Class:</span>
+ <span>${model.solutionClass}</span>
+ </div>
+ <vaadin-grid .items="${model.entityInfoList}" class="datatable" theme="no-border">
+ <vaadin-grid-column auto-width
+ header="Entity Class"
+ ${columnBodyRenderer(this._entityClassNameRenderer, [])}>
+ </vaadin-grid-column>
+ <vaadin-grid-column auto-width
+ header="Genuine Variables"
+ ${columnBodyRenderer(this._genuineVariablesRenderer, [])}>
+ </vaadin-grid-column>
+ <vaadin-grid-column auto-width
+ header="Shadow Variables"
+ ${columnBodyRenderer(this._shadowVariablesRenderer, [])}>
+ </vaadin-grid-column>
+ </vaadin-grid>`;
+ }
+ }
+
+ _entityClassNameRenderer(entityInfo) {
+ return html`
+ ${entityInfo.name}`;
+ }
+
+ _genuineVariablesRenderer(entityInfo) {
+ return html`
+ ${entityInfo.genuineVariableList.join(', ')}`;
+ }
+
+ _shadowVariablesRenderer(entityInfo) {
+ return html`
+ ${entityInfo.shadowVariableList.join(', ')}`;
+ }
+
+}
+
+customElements.define('model-component', ModelComponent);
\ No newline at end of file
diff --git a/optaplanner-quarkus-integration/optaplanner-quarkus/devui-integration-test/pom.xml b/optaplanner-quarkus-integration/optaplanner-quarkus/devui-integration-test/pom.xml
index 8c8a5b23d8..59b836c4f6 100644
--- a/optaplanner-quarkus-integration/optaplanner-quarkus/devui-integration-test/pom.xml
+++ b/optaplanner-quarkus-integration/optaplanner-quarkus/devui-integration-test/pom.xml
@@ -36,8 +36,6 @@
<java.module.name>org.optaplanner.quarkus</java.module.name>
<!-- Code of integration tests should not be a part of test coverage reports. -->
<sonar.coverage.exclusions>**/*</sonar.coverage.exclusions>
- <!-- Quarkus 2 and 3 use different context roots. -->
- <dev.ui.root>/q/dev-v1</dev.ui.root>
</properties>
<dependencies>
@@ -65,8 +63,8 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>io.rest-assured</groupId>
- <artifactId>rest-assured</artifactId>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-vertx-http-dev-ui-tests</artifactId>
<scope>test</scope>
</dependency>
<dependency>
@@ -92,11 +90,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <systemProperties>
- <dev.iu.root>${dev.ui.root}</dev.iu.root>
- </systemProperties>
- </configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
diff --git a/optaplanner-quarkus-integration/optaplanner-quarkus/devui-integration-test/src/test/java/org/optaplanner/quarkus/it/devui/OptaPlannerDevUITest.java b/optaplanner-quarkus-integration/optaplanner-quarkus/devui-integration-test/src/test/java/org/optaplanner/quarkus/it/devui/OptaPlannerDevUITest.java
index 9c9f47bc2f..3fe650cab7 100644
--- a/optaplanner-quarkus-integration/optaplanner-quarkus/devui-integration-test/src/test/java/org/optaplanner/quarkus/it/devui/OptaPlannerDevUITest.java
+++ b/optaplanner-quarkus-integration/optaplanner-quarkus/devui-integration-test/src/test/java/org/optaplanner/quarkus/it/devui/OptaPlannerDevUITest.java
@@ -21,105 +21,74 @@ package org.optaplanner.quarkus.it.devui;
import static org.assertj.core.api.Assertions.assertThat;
-import java.io.IOException;
-import java.util.Objects;
-
-import javax.xml.parsers.ParserConfigurationException;
-
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
-import org.xml.sax.SAXException;
+import org.optaplanner.quarkus.it.devui.domain.TestdataStringLengthShadowEntity;
+import org.optaplanner.quarkus.it.devui.domain.TestdataStringLengthShadowSolution;
+import org.optaplanner.quarkus.it.devui.solver.TestdataStringLengthConstraintProvider;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.TextNode;
-import groovy.util.Node;
-import groovy.xml.XmlParser;
+import io.quarkus.devui.tests.DevUIJsonRPCTest;
import io.quarkus.test.QuarkusDevModeTest;
-import io.restassured.RestAssured;
-public class OptaPlannerDevUITest {
+public class OptaPlannerDevUITest extends DevUIJsonRPCTest {
@RegisterExtension
static final QuarkusDevModeTest config = new QuarkusDevModeTest()
.setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class)
- .addPackages(true, "org.optaplanner.quarkus.it.devui"));
+ .addPackages(true, OptaPlannerTestResource.class.getPackage().getName()));
- // Use the Quarkus 3 context root by default as the Quarkus platform does not pass the system property.
- static final String OPTAPLANNER_DEV_UI_BASE_URL =
- System.getProperty("dev.iu.root", "/q/dev-v1") + "/org.optaplanner.optaplanner-quarkus/";
-
- public static String getPage(String pageName) {
- return OPTAPLANNER_DEV_UI_BASE_URL + pageName;
+ public OptaPlannerDevUITest() {
+ super("OptaPlanner Solver");
}
@Test
- void testSolverConfigPage() throws ParserConfigurationException, SAXException, IOException {
- String body = RestAssured.get(getPage("solverConfig"))
- .then()
- .extract()
- .body()
- .asPrettyString();
- XmlParser xmlParser = new XmlParser();
- Node node = xmlParser.parseText(body);
- String solverConfig = Objects.requireNonNull(findById("optaplanner-solver-config", node)).text();
+ void testSolverConfigPage() throws Exception {
+ JsonNode configResponse = super.executeJsonRPCMethod("getConfig");
+ String solverConfig = configResponse.get("config").asText();
assertThat(solverConfig).isEqualToIgnoringWhitespace(
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ "<!--Properties that can be set at runtime are not included-->\n"
+ "<solver>\n"
- + " <solutionClass>org.optaplanner.quarkus.it.devui.domain.TestdataStringLengthShadowSolution</solutionClass>\n"
- + " <entityClass>org.optaplanner.quarkus.it.devui.domain.TestdataStringLengthShadowEntity</entityClass>\n"
+ + " <solutionClass>" + TestdataStringLengthShadowSolution.class.getCanonicalName()
+ + "</solutionClass>\n"
+ + " <entityClass>" + TestdataStringLengthShadowEntity.class.getCanonicalName() + "</entityClass>\n"
+ " <domainAccessType>GIZMO</domainAccessType>\n"
+ " <scoreDirectorFactory>\n"
- + " <constraintProviderClass>org.optaplanner.quarkus.it.devui.solver.TestdataStringLengthConstraintProvider</constraintProviderClass>\n"
+ + " <constraintProviderClass>" + TestdataStringLengthConstraintProvider.class.getCanonicalName()
+ + "</constraintProviderClass>\n"
+ " </scoreDirectorFactory>\n"
+ "</solver>");
}
@Test
- void testModelPage() throws ParserConfigurationException, SAXException, IOException {
- String body = RestAssured.get(getPage("model"))
- .then()
- .extract()
- .body()
- .asPrettyString();
- XmlParser xmlParser = new XmlParser();
- Node node = xmlParser.parseText(body);
- String model = Objects.requireNonNull(findById("optaplanner-model", node)).toString();
- assertThat(model)
- .contains("value=[Solution: org.optaplanner.quarkus.it.devui.domain.TestdataStringLengthShadowSolution]");
- assertThat(model).contains("value=[Entity: org.optaplanner.quarkus.it.devui.domain.TestdataStringLengthShadowEntity]");
- assertThat(model).contains(
- "value=[Genuine Variables]]]]]], tbody[attributes={}; value=[tr[attributes={}; value=[td[attributes={colspan=1, rowspan=1}; value=[value]]");
- assertThat(model).contains(
- "value=[Shadow Variables]]]]]], tbody[attributes={}; value=[tr[attributes={}; value=[td[attributes={colspan=1, rowspan=1}; value=[length]]");
+ void testModelPage() throws Exception {
+ JsonNode modelResponse = super.executeJsonRPCMethod("getModelInfo");
+ assertThat(modelResponse.get("solutionClass").asText())
+ .contains(TestdataStringLengthShadowSolution.class.getCanonicalName());
+ assertThat(modelResponse.get("entityClassList"))
+ .containsExactly(
+ new TextNode(TestdataStringLengthShadowEntity.class.getCanonicalName()));
+ assertThat(modelResponse.get("entityClassToGenuineVariableListMap")).hasSize(1);
+ assertThat(modelResponse.get("entityClassToGenuineVariableListMap")
+ .get(TestdataStringLengthShadowEntity.class.getCanonicalName()))
+ .containsExactly(new TextNode("value"));
+ assertThat(modelResponse.get("entityClassToShadowVariableListMap")).hasSize(1);
+ assertThat(modelResponse.get("entityClassToShadowVariableListMap")
+ .get(TestdataStringLengthShadowEntity.class.getCanonicalName()))
+ .containsExactly(new TextNode("length"));
}
@Test
- void testConstraintsPage() throws ParserConfigurationException, SAXException, IOException {
- String body = RestAssured.get(getPage("constraints"))
- .then()
- .extract()
- .body()
- .asPrettyString();
- XmlParser xmlParser = new XmlParser();
- Node node = xmlParser.parseText(body);
- String constraints = Objects.requireNonNull(findById("optaplanner-constraints", node)).text();
- assertThat(constraints).contains("org.optaplanner.quarkus.it.devui.domain/Don't assign 2 entities the same value");
- assertThat(constraints).contains("org.optaplanner.quarkus.it.devui.domain/Maximize value length");
- }
-
- private Node findById(String id, Node node) {
- if (id.equals(node.attribute("id"))) {
- return node;
- }
- for (Object child : node.children()) {
- if (child instanceof Node) {
- Node maybeFoundNodeText = findById(id, (Node) child);
- if (maybeFoundNodeText != null) {
- return maybeFoundNodeText;
- }
- }
- }
- return null;
+ void testConstraintsPage() throws Exception {
+ JsonNode constraintsResponse = super.executeJsonRPCMethod("getConstraints");
+ assertThat(constraintsResponse).containsExactlyInAnyOrder(
+ new TextNode(TestdataStringLengthShadowSolution.class.getPackage()
+ .getName() + "/Don't assign 2 entities the same value."),
+ new TextNode(TestdataStringLengthShadowSolution.class.getPackage().getName() + "/Maximize value length"));
}
}
diff --git a/optaplanner-quarkus-integration/optaplanner-quarkus/runtime/pom.xml b/optaplanner-quarkus-integration/optaplanner-quarkus/runtime/pom.xml
index 31f1fa8dee..e3420bf10b 100644
--- a/optaplanner-quarkus-integration/optaplanner-quarkus/runtime/pom.xml
+++ b/optaplanner-quarkus-integration/optaplanner-quarkus/runtime/pom.xml
@@ -41,6 +41,12 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-core</artifactId>
</dependency>
+ <!-- DEV console dependencies -->
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-vertx-http</artifactId>
+ <optional>true</optional>
+ </dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-arc</artifactId>
@@ -113,34 +119,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <!-- Remove comments from META-INF/quarkus-extension.properties -->
- <!-- This is needed because the file generated by quarkus contains a timestamp in a comment that makes the build not reproducible -->
- <!-- This workaround can be removed when drools will be migrated to quarkus release containing this fix https://github.com/quarkusio/quarkus/pull/38365 -->
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>${version.maven-exec-plugin}</version>
- <executions>
- <execution>
- <id>Remove comments from quarkus-extension.properties</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>java</goal>
- </goals>
- <configuration>
- <mainClass>org.drools.util.RemoveCommentsMain</mainClass>
- <arguments>
- <argument>${project.basedir}/target/classes/META-INF/quarkus-extension.properties</argument>
- <argument>${project.basedir}/target/classes/META-INF/quarkus-javadoc.properties</argument>
- <argument>${project.basedir}/target/generated-sources/annotations/org/optaplanner/quarkus/config/OptaPlannerRuntimeConfig.jdp</argument>
- <argument>${project.basedir}/target/generated-sources/annotations/org/optaplanner/quarkus/config/SolverManagerRuntimeConfig.jdp</argument>
- <argument>${project.basedir}/target/generated-sources/annotations/org/optaplanner/quarkus/config/SolverRuntimeConfig.jdp</argument>
- <argument>${project.basedir}/target/generated-sources/annotations/org/optaplanner/quarkus/config/TerminationRuntimeConfig.jdp</argument>
- </arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
</project>
diff --git a/optaplanner-quarkus-integration/optaplanner-quarkus/runtime/src/main/java/org/optaplanner/quarkus/devui/OptaPlannerDevUIPropertiesSupplier.java b/optaplanner-quarkus-integration/optaplanner-quarkus/runtime/src/main/java/org/optaplanner/quarkus/devui/OptaPlannerDevUIPropertiesRPCService.java
similarity index 71%
rename from optaplanner-quarkus-integration/optaplanner-quarkus/runtime/src/main/java/org/optaplanner/quarkus/devui/OptaPlannerDevUIPropertiesSupplier.java
rename to optaplanner-quarkus-integration/optaplanner-quarkus/runtime/src/main/java/org/optaplanner/quarkus/devui/OptaPlannerDevUIPropertiesRPCService.java
index d7df012b30..025578b77d 100644
--- a/optaplanner-quarkus-integration/optaplanner-quarkus/runtime/src/main/java/org/optaplanner/quarkus/devui/OptaPlannerDevUIPropertiesSupplier.java
+++ b/optaplanner-quarkus-integration/optaplanner-quarkus/runtime/src/main/java/org/optaplanner/quarkus/devui/OptaPlannerDevUIPropertiesRPCService.java
@@ -25,9 +25,12 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.function.Supplier;
import java.util.stream.Collectors;
+import jakarta.annotation.PostConstruct;
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.inject.Inject;
+
import org.optaplanner.constraint.streams.common.AbstractConstraintStreamScoreDirectorFactory;
import org.optaplanner.core.api.domain.entity.PlanningEntity;
import org.optaplanner.core.api.domain.solution.PlanningSolution;
@@ -40,46 +43,66 @@ import org.optaplanner.core.impl.domain.variable.descriptor.VariableDescriptor;
import org.optaplanner.core.impl.solver.DefaultSolverFactory;
import io.quarkus.arc.Arc;
+import io.vertx.core.json.JsonArray;
+import io.vertx.core.json.JsonObject;
-public class OptaPlannerDevUIPropertiesSupplier implements Supplier<OptaPlannerDevUIProperties> {
- private String effectiveSolverConfigXml;
-
- public OptaPlannerDevUIPropertiesSupplier() {
- this.effectiveSolverConfigXml = null;
- }
+@ApplicationScoped
+public class OptaPlannerDevUIPropertiesRPCService {
- public OptaPlannerDevUIPropertiesSupplier(String effectiveSolverConfigXml) {
- this.effectiveSolverConfigXml = effectiveSolverConfigXml;
- }
+ private final String effectiveSolverConfigXml;
- // Needed for Quarkus Dev UI serialization
- public String getEffectiveSolverConfigXml() {
- return effectiveSolverConfigXml;
- }
+ private OptaPlannerDevUIProperties devUIProperties;
- public void setEffectiveSolverConfigXml(String effectiveSolverConfigXml) {
- this.effectiveSolverConfigXml = effectiveSolverConfigXml;
+ @Inject
+ public OptaPlannerDevUIPropertiesRPCService(SolverConfigText solverConfigText) {
+ this.effectiveSolverConfigXml = solverConfigText.getSolverConfigText();
}
- @Override
- public OptaPlannerDevUIProperties get() {
+ @PostConstruct
+ public void init() {
if (effectiveSolverConfigXml != null) {
// SolverConfigIO does not work at runtime,
// but the build time SolverConfig does not have properties
// that can be set at runtime (ex: termination), so the
// effective solver config will be missing some properties
- return new OptaPlannerDevUIProperties(getModelInfo(),
- getXmlContentWithComment("Properties that can be set at runtime are not included"),
- getConstraintList());
+ devUIProperties = new OptaPlannerDevUIProperties(buildModelInfo(),
+ buildXmlContentWithComment("Properties that can be set at runtime are not included"),
+ buildConstraintList());
} else {
- return new OptaPlannerDevUIProperties(getModelInfo(),
+ devUIProperties = new OptaPlannerDevUIProperties(buildModelInfo(),
"<!-- Plugin execution was skipped " + "because there are no @" + PlanningSolution.class.getSimpleName()
+ " or @" + PlanningEntity.class.getSimpleName() + " annotated classes. -->\n<solver />",
Collections.emptyList());
}
}
- private OptaPlannerModelProperties getModelInfo() {
+ public JsonObject getConfig() {
+ JsonObject out = new JsonObject();
+ out.put("config", devUIProperties.getEffectiveSolverConfig());
+ return out;
+ }
+
+ public JsonArray getConstraints() {
+ return JsonArray.of(devUIProperties.getConstraintList().toArray());
+ }
+
+ public JsonObject getModelInfo() {
+ OptaPlannerModelProperties modelProperties = devUIProperties.getOptaPlannerModelProperties();
+ JsonObject out = new JsonObject();
+ out.put("solutionClass", modelProperties.solutionClass);
+ out.put("entityClassList", JsonArray.of(modelProperties.entityClassList.toArray()));
+ out.put("entityClassToGenuineVariableListMap",
+ new JsonObject(modelProperties.entityClassToGenuineVariableListMap.entrySet()
+ .stream()
+ .collect(Collectors.toMap(Map.Entry::getKey, entry -> JsonArray.of(entry.getValue().toArray())))));
+ out.put("entityClassToShadowVariableListMap",
+ new JsonObject(modelProperties.entityClassToShadowVariableListMap.entrySet()
+ .stream()
+ .collect(Collectors.toMap(Map.Entry::getKey, entry -> JsonArray.of(entry.getValue().toArray())))));
+ return out;
+ }
+
+ private OptaPlannerModelProperties buildModelInfo() {
if (effectiveSolverConfigXml != null) {
DefaultSolverFactory<?> solverFactory =
(DefaultSolverFactory<?>) Arc.container().instance(SolverFactory.class).get();
@@ -114,7 +137,7 @@ public class OptaPlannerDevUIPropertiesSupplier implements Supplier<OptaPlannerD
}
}
- private List<String> getConstraintList() {
+ private List<String> buildConstraintList() {
if (effectiveSolverConfigXml != null) {
DefaultSolverFactory<?> solverFactory =
(DefaultSolverFactory<?>) Arc.container().instance(SolverFactory.class).get();
@@ -128,7 +151,7 @@ public class OptaPlannerDevUIPropertiesSupplier implements Supplier<OptaPlannerD
return Collections.emptyList();
}
- private String getXmlContentWithComment(String comment) {
+ private String buildXmlContentWithComment(String comment) {
int indexOfPreambleEnd = effectiveSolverConfigXml.indexOf("?>");
if (indexOfPreambleEnd != -1) {
return effectiveSolverConfigXml.substring(0, indexOfPreambleEnd + 2) +
diff --git a/optaplanner-quarkus-integration/optaplanner-quarkus/runtime/src/main/java/org/optaplanner/quarkus/devui/OptaPlannerDevUIRecorder.java b/optaplanner-quarkus-integration/optaplanner-quarkus/runtime/src/main/java/org/optaplanner/quarkus/devui/OptaPlannerDevUIRecorder.java
new file mode 100644
index 0000000000..6ba141f8b2
--- /dev/null
+++ b/optaplanner-quarkus-integration/optaplanner-quarkus/runtime/src/main/java/org/optaplanner/quarkus/devui/OptaPlannerDevUIRecorder.java
@@ -0,0 +1,16 @@
+package org.optaplanner.quarkus.devui;
+
+import java.util.function.Supplier;
+
+import io.quarkus.runtime.annotations.Recorder;
+
+@Recorder
+public class OptaPlannerDevUIRecorder {
+
+ public Supplier<SolverConfigText> solverConfigTextSupplier(final String solverConfigText) {
+ return () -> {
+ return new SolverConfigText(solverConfigText);
+ };
+ }
+
+}
diff --git a/optaplanner-quarkus-integration/optaplanner-quarkus/runtime/src/main/java/org/optaplanner/quarkus/devui/SolverConfigText.java b/optaplanner-quarkus-integration/optaplanner-quarkus/runtime/src/main/java/org/optaplanner/quarkus/devui/SolverConfigText.java
new file mode 100644
index 0000000000..e0ae76f32b
--- /dev/null
+++ b/optaplanner-quarkus-integration/optaplanner-quarkus/runtime/src/main/java/org/optaplanner/quarkus/devui/SolverConfigText.java
@@ -0,0 +1,17 @@
+package org.optaplanner.quarkus.devui;
+
+public class SolverConfigText {
+ private String solverConfigText;
+
+ public SolverConfigText(String solverConfigText) {
+ this.solverConfigText = solverConfigText;
+ }
+
+ public String getSolverConfigText() {
+ return solverConfigText;
+ }
+
+ public void setSolverConfigText(String solverConfigText) {
+ this.solverConfigText = solverConfigText;
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org