Closed kamer closed 4 years ago
First of all, thanks for your interest to contribute to ArchUnit! 😃
I can confirm the issues with Java 9 and 10, but note the following message:
Please file a bug against the
javadoc
tool via the Java bug reporting page
So this is indeed a JDK issue – which has been fixed in newer versions, but I guess that this fix won't be backported to JDK 9 or 10.
Regarding the issues with JDK 13: With openjdk-13.0.2
, I'm also getting (tons of errors like)
> Task :archunit:spotbugsMain
The following errors occurred during analysis:
Error scanning java/lang/Object for referenced classes
java.lang.IllegalArgumentException: Unsupported class file major version 57
At org.objectweb.asm.ClassReader.<init>(ClassReader.java:176)
At org.objectweb.asm.ClassReader.<init>(ClassReader.java:158)
At org.objectweb.asm.ClassReader.<init>(ClassReader.java:146)
At edu.umd.cs.findbugs.asm.FBClassReader.<init>(FBClassReader.java:35)
At edu.umd.cs.findbugs.classfile.engine.asm.ClassReaderAnalysisEngine.analyze(ClassReaderAnalysisEngine.java:48)
At edu.umd.cs.findbugs.classfile.engine.asm.ClassReaderAnalysisEngine.analyze(ClassReaderAnalysisEngine.java:34)
At edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getClassAnalysis(AnalysisCache.java:262)
At edu.umd.cs.findbugs.classfile.engine.ClassInfoAnalysisEngine.analyze(ClassInfoAnalysisEngine.java:75)
At edu.umd.cs.findbugs.classfile.engine.ClassInfoAnalysisEngine.analyze(ClassInfoAnalysisEngine.java:38)
At edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getClassAnalysis(AnalysisCache.java:262)
At edu.umd.cs.findbugs.FindBugs2.buildReferencedClassSet(FindBugs2.java:774)
At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:220)
At com.github.spotbugs.internal.spotbugs.SpotBugsExecuter.runSpotbugs(SpotBugsExecuter.java:23)
I believe that we need to update spotbugs
in order to support building ArchUnit with JDK ≥13 (the same was needed to support JDK 11 with #119), and that this, in turn, requires the gradle update of #192.
So for the time being, you could either
use (Open)JDK 13 and locally skip spotbugs
, e.g. by (temporarily) removing the following line in build-steps/build-steps.gradle
:
def utilsPath = { "build-steps/${it}" }
apply from: utilsPath('archiving/archiving.gradle')
-apply from: utilsPath('codequality/spotbugs.gradle')
apply from: utilsPath('release/publish.gradle')
apply from: utilsPath('license/license.gradle')
apply from: utilsPath('maven-integration-test/maven-integration-test.gradle')
@hankem Thank you for detailed answer. It works fine with JDK11.
It turns out that #306 (Gradle 5.6.4) is not enough to use JDK 13, but that Gradle 6 is required (cf. gradle/gradle#10785).
Yes, I've noticed that, too. Our path should be to merge #284, then see how we get to Gradle 6 as quickly as possible. Unfortunately we have accumulated some technical dept with respect to the build :frowning_face:
Hello! I have cloned the project to contribute and tried to build following the Contributing Guide. But it fails as below. It's the first time I'm using Gradle so I couldn't do anything aside from Googling it and changing Java versions.
Running it with --stacktrace gives some additional info: