Build errors - H2 database now has JDK9 class files?

瀏覽次數:14 次
跳到第一則未讀訊息

Mike Yawn

未讀,
2018年3月27日 上午8:12:582018/3/27
收件者:Dependency Check
Somewhere in the last 24-48 hours, our builds have started failing with a 'class file format' error.

It appears that in the transition from H2 database version 1.4.196 to 1.4.197, the class files downloaded by maven are now generated by a JDK 9 compiler, and are incompatible with the JDK 8 software that we are using in our build environment.

Was this a deliberate change -- in which case we will need to update our build environment to JDK 9?   Or was it unintentional, in which case I'm hoping the class files can be rebuild and the repo refreshed with class files that are more widely compatible.

(Alternately, is there any harm in rolling the version of the database in our local environment back to 1.4.196, or are there other changes that are dependent on this update?)

Thanks,
Mike Yawn

Jeremy Long

未讀,
2018年3月28日 清晨7:06:282018/3/28
收件者:Mike Yawn、Dependency Check
I'm somewhat confused by this post as the dependency-check build uses the maven-enforcer-plugin with the class-file-format-rule that will break the build if any dependencies are compiled with JDK 8 or higher - as we are maintaining support for Java 7 for a few more months.  Also, more importantly the published version (3.1.1) uses H2 1.4.196 (see the pom.xml).

Are you building dependency-check from source as opposed to using the published version in Central or bintray? If you are building from source my guess is you are running into a problem with the way we have the maven-versions-plugin configured...  If you run 'clean' the versions plugin will upgrade dependencies. As such, if you are building a tagged version you should not run `mvn clean` before the build (if you do need to run a clean before the build consider using the git version - `git clean -fx`).

--Jeremy

--
You received this message because you are subscribed to the Google Groups "Dependency Check" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dependency-check+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mike Yawn

未讀,
2018年3月28日 上午8:16:252018/3/28
收件者:Jeremy Long、Dependency Check
Hi Jeremy,

It’s all the things you suggested … I’m building from sources locally (our plan is to write at least one analyzer).  I was building at HEAD or 3.1.2-SNAPSHOT; after my post yesterday I realized that there’s really no reason for this and moved back to the stable v3.1.1, which built without error.   And it is my habit to do ‘mvn clean install’, so I’ll stop habitually doing the clean step, and use the git command if there is some reason I’m wanting to rebuild everything.

Thanks
Mike

Jeremy Long

未讀,
2018年3月29日 清晨5:46:012018/3/29
收件者:Dependency Check
I will moe the maven-versions-plugin to a profile so it does not affect future tagged builds.

--Jeremy
回覆所有人
回覆作者
轉寄
0 則新訊息