-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gradle Migration Script Failure and Rewrite Issues in Spring Boot Application Upgrading from OptaPlanner to Timefold Solver #757
Comments
Thanks for reporting, @NaruRidan. Can you please provide the version of Gradle you used? |
Sure, Gradle 8.6. curl https://timefold.ai/product/upgrade/upgrade-timefold.gradle > upgrade-timefold.gradle ; gradle -Dorg.gradle.jvmargs=-Xmx2G --init-script upgrade-timefold.gradle rewriteRun -DtimefoldSolverVersion=1.8.0 --stacktrace; rm upgrade-timefold.gradle FAILURE: Build failed with an exception.
1 error
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: 1 error
` |
I wasn't able to reproduce on Linux. Your problem is possibly platform-specific, seeing as you run on Windows. The problem with "unexpected character" tells me character encodings are in the mix. Did you make sure Gradle is reading the files in the correct encoding? This doesn't seem like something that we can fix on our end. But if you can provide a project that I can run on my machine to try to reproduce it, that'd help. |
Could you tell me how to adjust the encoding settings so that Gradle correctly reads the files? |
I don't use either Gradle or Windows, but it seems that StackOverflow knows. |
Describe the bug
When attempting to migrate a Spring Boot application from OptaPlanner to Timefold Solver using the provided Gradle script, I encountered a failure during the execution process. The goal was to automate the upgrade via the Gradle script specified by Timefold's documentation, aiming for a seamless transition to leverage Timefold Solver's capabilities within my Spring Boot project.
Expected behavior
I anticipated a smooth migration process facilitated by the Gradle script, which would automatically update project dependencies, adjust import statements, and apply necessary configurations for integrating Timefold Solver with my Spring Boot application.
Actual behavior
The migration attempt was unsuccessful, resulting in a method signature error concerning the classpath in the dependencies block of the upgrade-timefold.gradle script. Additionally, the process encountered issues with the rewrite functionality, which was supposed to apply automatic code modifications for the migration but failed to execute as expected.
To Reproduce
Follow Timefold Solver's migration guide for obtaining the upgrade-timefold.gradle script.
In the Spring Boot project directory, execute: gradle -Dorg.gradle.jvmargs=-Xmx2G --init-script upgrade-timefold.gradle rewriteRun -DtimefoldSolverVersion=1.8.0
Encounter the error related to classpath usage and issues with rewrite functionality.
Environment
Timefold Solver Version or Git ref: 1.8.0
Output of java --version:
openjdk 17.0.2 2022-01-18
OpenJDK Runtime Environment (build 17.0.2+8-86)
OpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode, sharing)
Windows 11
The text was updated successfully, but these errors were encountered: