php-coder / mystamps

The site about post stamps where you can create a virtual collection
https://my-stamps.ru
GNU General Public License v2.0
20 stars 33 forks source link

Migrate to JDK 11 #1158

Open php-coder opened 4 years ago

php-coder commented 4 years ago

Related resources:

php-coder commented 4 years ago

From https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Versions:

Please upgrade to Spring Framework 5.1+ (and the corresponding Spring Boot 2.1+) for JDK 11+ support

So, we first should update Spring Boot to 2.1.x: #1161

php-coder commented 3 years ago

It seems like Groovy-related stuff requires some additional work in order to work with JDK11 (https://travis-ci.com/github/php-coder/mystamps/jobs/464914094):

  1. Unit tests fail to compile:

    [ERROR] Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.5:testCompile (default) on project mystamps: Error occurred while calling a method on a Groovy class from classpath. InvocationTargetException: BUG! exception in phase 'class generation' in source unit 'src/test/groovy/ru/mystamps/web/common/LocaleUtilsTest.groovy' unsupported Target MODULE -> [Help 1]

  2. CodeNarc doesn't fail a build but it throws an exception:

    [java] java.lang.reflect.InaccessibleObjectException: Unable to make jdk.internal.loader.ClassLoaders$AppClassLoader(jdk.internal.loader.ClassLoaders$PlatformClassLoader,jdk.internal.loader.URLClassPath) accessible: module java.base does not "opens jdk.internal.loader" to unnamed module @271053e1

  3. Integration test fail but it seem like that it was caused by unit tests:

    [ERROR] Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.5:testCompile (default) on project mystamps: Error occurred while calling a method on a Groovy class from classpath. InvocationTargetException: BUG! exception in phase 'class generation' in source unit '/home/travis/build/php-coder/mystamps/src/test/groovy/ru/mystamps/web/common/LocaleUtilsTest.groovy' unsupported Target MODULE -> [Help 1]

Instead of finding a fix for Groovy code (perhaps, updating it), I suggest to migrate unit tests to JUnit (#1246) first.

php-coder commented 3 years ago

Notes to myself: