christophknabe / spring-ddd-bank

A sample project following Domain Driven Design with Spring Data JPA
GNU Lesser General Public License v2.1
509 stars 125 forks source link

Make current JDK 8 build robust when host has newer JDK as default #14

Closed christophknabe closed 2 years ago

christophknabe commented 2 years ago

What worked in 2018 does no longer work in 2021. When running mvn clean test on a machine with JDK 11 as the default JDK much is downloaded correctly, but the build fails with

[ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.10:compile (default) on project spring-ddd-bank: Execution default of goal org.codehaus.mojo:aspectj-maven-plugin:1.10:compile failed: Plugin org.codehaus.mojo:aspectj-maven-plugin:1.10 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:11.0.11 at specified path /home/knabe/.sdkman/candidates/java/11.0.11.hs-adpt/../lib/tools.jar -> [Help 1]

Before trying to really port the build to JDK 11 we have to make it functional with JDK 8 on a modern machine. The now outdated JDK 8 has to be installed by https://sdkman.io/ This requirement has to be described in the README.md

christophknabe commented 2 years ago

Done by commit 7a5e0382a6ebd9e60005ceb1d2d04556d7d570b9.