Skip to content

Instantly share code, notes, and snippets.

View ge0ffrey's full-sized avatar

Geoffrey De Smet ge0ffrey

View GitHub Profile
///usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS org.optaplanner:optaplanner-core:8.14.0.Final
import java.time.DayOfWeek;
import java.time.Duration;
import java.time.LocalTime;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
///usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS org.optaplanner:optaplanner-core:8.14.0.Final
import java.time.DayOfWeek;
import java.time.Duration;
import java.time.LocalTime;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
#!/bin/bash
# To prepare enviromnent
########################
# mkdir downloads
# mkdir jdk
# mkdir maven
# To add a new JDK
##################
/*
* Copyright 2019 Red Hat, Inc. and/or its affiliates.
*
* Licensed 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
[INFO] --- quarkus-maven-plugin:0.22.0:dev (default-cli) @ optaplanner-quarkus-example ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.991 s
[INFO] Finished at: 2019-09-20T11:06:40+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:0.22.0:dev (default-cli) on project optaplanner-quarkus-example: Failed to run: Failed to resolve Quarkus application model: Failed to inject extension deployment dependencies for org.optaplanner:optaplanner-quarkus-example:jar:7.28.0-SNAPSHOT: zip END header not found -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.quarkus:quarkus-maven-plugin:0.22.0:dev (default-cli) on project optaplanner-quarkus-example: Failed to run
at org.apache.maven.lifecycle.internal.MojoExecutor.execute
[INFO] ------------< org.optaplanner:optaplanner-quarkus-example >-------------
[INFO] Building OptaPlanner Quarkus example 7.28.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:3.1.1:tree (default-cli) @ optaplanner-quarkus-example ---
[INFO] org.optaplanner:optaplanner-quarkus-example:jar:7.28.0-SNAPSHOT
[INFO] +- org.optaplanner:optaplanner-core:jar:7.28.0-SNAPSHOT:compile
[INFO] | +- org.kie:kie-api:jar:7.28.0-SNAPSHOT:compile
[INFO] | | \- org.kie.soup:kie-soup-maven-support:jar:7.28.0-SNAPSHOT:compile
[INFO] | +- org.kie:kie-internal:jar:7.28.0-SNAPSHOT:compile
-------------------------------------------------------------------------------
Test set: org.optaplanner.webexamples.vehiclerouting.rest.service.VehicleRoutingRestServiceTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2,700.696 sec <<< FAILURE! - in org.optaplanner.webexamples.vehiclerouting.rest.service.VehicleRoutingRestServiceTest
org.optaplanner.webexamples.vehiclerouting.rest.service.VehicleRoutingRestServiceTest Time elapsed: 2,700.696 sec <<< ERROR!
java.lang.RuntimeException: Could not invoke deployment method: public static org.jboss.shrinkwrap.api.spec.WebArchive org.optaplanner.webexamples.common.rest.service.AbstractClientArquillianTest.createDeployment()
at org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator.invoke(AnnotationDeploymentScenarioGenerator.java:181)
at org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScena
Option A
========
@PlanningSolution
class MeetingSchedule {
@ConstraintWeight("Room conflict")
HardSoftScore roomConflictWeight = HardSoftScore.ofHard(-100);
@ConstraintWeight("Speaker conflict")
HardSoftScore speakerConflictWeight = HardSoftScore.ofHard(-1);
java.lang.NoClassDefFoundError: org/drools/core/io/impl/ResourceFactoryServiceImpl
at org.drools.compiler.kie.builder.impl.KieServicesImpl.getResources(KieServicesImpl.java:233)
at org.optaplanner.core.config.score.director.ScoreDirectorFactoryConfig.buildDroolsScoreDirectorFactory(ScoreDirectorFactoryConfig.java:500)
at org.optaplanner.core.config.score.director.ScoreDirectorFactoryConfig.buildScoreDirectorFactory(ScoreDirectorFactoryConfig.java:350)
at org.optaplanner.core.config.solver.SolverConfig.buildSolver(SolverConfig.java:255)
at org.optaplanner.benchmark.impl.SubSingleBenchmarkRunner.call(SubSingleBenchmarkRunner.java:99)
at org.optaplanner.benchmark.impl.SubSingleBenchmarkRunner.call(SubSingleBenchmarkRunner.java:34)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
Child took one from moveQueue: 32
Parent took one from responseQueue, left: 0 + 3
Child took one from moveQueue: 31
Child took one from moveQueue: 31
Child took one from moveQueue: 30
Child took one from moveQueue: 29
Child took one from moveQueue: 28
Child took one from moveQueue: 27
Child took one from moveQueue: 26
Child took one from moveQueue: 25