Dependency problems with 9.3.0

112 views
Skip to first unread message

Kjetil

unread,
Sep 26, 2023, 8:11:22 AM9/26/23
to Flying Saucer Users
Hi,

I tried to upgrade to 9.3.0, but got some build errors. This release introduced some a new dependency on org.w3c:dom:2.3.0-jaxb-1.0.6, which seems to override some DOM classes which we use in our application code.

Everything builds ok if I exclude this dependency, but I would prefer if I didn't have to. Not sure why this was added, is it possible to revert? In general I think we should be pretty conservative in adding new dependencies like this. I also see that there is a new dependency on com.google.code.findbugs:jsr305:3.0.2, does this have to be a runtime dependency?

BR Kjetil

Peter Brant

unread,
Sep 26, 2023, 9:03:31 AM9/26/23
to flying-sa...@googlegroups.com
Hi Kjetil,

It looks like the repackaged DOM interfaces in the JAXB dependency were added when an old PR was merged. I think it was just an oversight that it made it in. I've added a PR to revert here https://github.com/flyingsaucerproject/flyingsaucer/pull/205. I'll merge later today or tomorrow if Andrei doesn't get to it first.

Andrei, any thoughts regarding FindBugs? I'm pretty out of the loop as far as the current thinking about these sorts of annotations in the world of Java, but Findbugs looks abandoned (see https://stackoverflow.com/questions/2289694/what-is-the-status-of-jsr-305 or https://spotbugs.github.io/). 

Can it (or SpotBugs) be used in a way where the annotation references are not compiled into the resulting class files? That might be a good compromise between giving FS developers the advantage of those annotations without forcing a new dependency on all users. On the other hand, the SpotBugs annotation JAR is only about 12kb which doesn't seem too bad if it has become a de facto standard.





--
You received this message because you are subscribed to the Google Groups "Flying Saucer Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flying-saucer-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flying-saucer-users/40744bbd-3232-4ac9-9962-3a4b145070acn%40googlegroups.com.

Andrei Solntsev

unread,
Sep 26, 2023, 10:01:15 AM9/26/23
to flying-sa...@googlegroups.com
Hi all! 
Wow, first feedback, how cool... :) 

1. Yes, dependency org.w3c:dom was added because the project didn't even compile with later Java versions (was it Java 11 or 17? I don't remember). 

Kjetil, are you running FlyingSaucer on Java 8, I guess? 
Can you still run FlyingSaucer on Java11 or Java17? I guess not. 
So we need to solve this problem somehow, now just remove this dependency.

2. Yes, FindBugs is only needed at compile time. Let's remove it from runtime. 
It adds annotations like "@Nonnull" and "@Nullable" that are useful in IDE, not in production.

Andrei Solntsev


вт, 26 сент. 2023 г. в 16:03, Peter Brant <peter...@gmail.com>:

Kjetil

unread,
Sep 26, 2023, 12:48:41 PM9/26/23
to Flying Saucer Users
We use flyingsaucer on Temurin JDK 20, it works fine for us.

Building flyingsaucer in IntelliJ failed for me with OpenJDK 21, but I found this fix: https://stackoverflow.com/questions/51532053/intellij-with-jdk10-sdk-doesnt-compile-maven-project-with-1-8-target

"mvn compile" with OpenJDK 21 works also, but mvn package fails due to outdated Maven plugins.


BR Kjetil

Andrei Solntsev

unread,
Sep 26, 2023, 6:49:12 PM9/26/23
to flying-sa...@googlegroups.com, Peter Brant
Good night!
I've released FlyingSaucer 9.3.1

1. Removed JAXB dependency (thanks to Peter Brant)
2. Excluded jsr305 dependency
  2.1 @Peter Brant :   Yes, FindBugs is deprecated, but the dependency "com.google.code.findbugs:jsr305:3.0.2" is not. It seems to be the best possible way of providing @Nonnull annotation.
3. Updated all maven plugins
  3.1. @Kjetil  hopefully the project now compiles with JDK 21 (at least it compiles on my machine).

Andrei Solntsev


вт, 26 сент. 2023 г. в 19:48, 'Kjetil' via Flying Saucer Users <flying-sa...@googlegroups.com>:
Reply all
Reply to author
Forward
0 new messages