[FOLIO-1609] Java maven-surefire-plugin broken in Debian/Ubuntu Created: 02/Nov/18  Updated: 20/Nov/18  Resolved: 12/Nov/18

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Task Priority: P2
Reporter: Adam Dickmeiss Assignee: John Malconian
Resolution: Done Votes: 0
Labels: core, sprint50, sprint51
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Blocks
is blocked by CQLPG-74 Broken maven-surefire-plugin Closed
Relates
relates to OKAPI-676 Broken maven-surefire-plugin Closed
relates to CIRCSTORE-78 Broken maven-surefire-plugin Closed
relates to MODCAL-23 Broken maven-failsafe-plugin Closed
relates to RMB-294 Broken maven-surefire-plugin Closed
Sprint:

 Description   

This affects all Folio modules using Maven's maven-surefire-plugin . Around Nov 1st Debian/Ubuntu rolled out openjdk packages which makes maven-surefire-plugin fail. At this time, it does not seems that Debian will rewind their regression. For now, you can fix this - with current maven-surefire-plugin by adding:

<configuration>
  <useSystemClassLoader>false</useSystemClassLoader>
</configuration>

Eventually a new maven-surefire-plugin should be released (pull request: https://github.com/apache/maven-surefire/pull/197 ). You can then update your pom to use that and may remove the useSystemClassLoader configuration.

https://issues.apache.org/jira/browse/SUREFIRE-1588

The cause:
Openjdk added a ClassPathURLCheck on May 29: https://hg.openjdk.java.net/jdk/jdk/rev/27135de165ac
They disabled it by default on October 5: https://hg.openjdk.java.net/jdk/jdk/rev/f54dcfc5a5f8
Debian/Ubuntu released their Openjdk package without the upstream October 5 disable patch.
Maven surefire uses an absolute path that fails the ClassPathURLCheck.



 Comments   
Comment by John Malconian [ 08/Nov/18 ]

I'm going to go ahead and make this change to the pom across all maven projects as I can find no other viable workaround and it won't be possible to hold java version back in the CI much longer.

However, I have noticed that setting <useSystemClassLoader>false</useSystemClassLoader> in mod-calendar does not work.

Comment by Adam Dickmeiss [ 08/Nov/18 ]

For RMB I also had to tweakj maven-failsafe-plugin
https://github.com/folio-org/raml-module-builder/commit/c650f20b1b44a852b7e4e6d606983e9b1682971e

Comment by Adam Dickmeiss [ 09/Nov/18 ]

Made a PR https://github.com/folio-org/mod-calendar/pull/61 for mod-calender. Indeed this was the maven-failsafe-plugin.

Comment by John Malconian [ 09/Nov/18 ]

Thanks, Adam. That fixed mod-calendar.

Comment by John Malconian [ 09/Nov/18 ]

Modules updated thus far:

mod-authtoken
mod-calendar
mod-circulation
mod-circulation-storage
mod-codex-ekb
mod-codex-inventory
mod-codex-mux
mod-configuration

Also using this opportunity to update vertx-core and vertx-web to 3.5.4 to resolve pre 3.5.4 security vulnerabilities.
More information here: https://vertx.io/blog/eclipse-vert-x-3-5-4/

Comment by Adam Dickmeiss [ 09/Nov/18 ]

Note that there is a bug in Vert.x 3.5.4 https://github.com/eclipse-vertx/vert.x/issues/2653 . So if your code has setChunked(false), that will have to be removed.

Comment by John Malconian [ 09/Nov/18 ]

Thanks for that. I'll check for that as well.

Comment by John Malconian [ 09/Nov/18 ]

latest updates:

mod-data-loader
mod-feesfines (no changes needed)
mod-inventory
mod-inventory-storage

Comment by John Malconian [ 09/Nov/18 ]

updated:

mod-login
mod-login-saml
mod-notes
mod-notify

Comment by John Malconian [ 09/Nov/18 ]

updated:

mod-finance-storage
mod-orders
mod-orders-storage
mod-password-validator

Comment by John Malconian [ 09/Nov/18 ]

updated:

mod-audit
mod-audit-filter
mod-permissions
mod-rtac

Comment by John Malconian [ 09/Nov/18 ]

updated:

mod-tags
mod-template-engine
mod-users-bl (already done)
mod-users
mod-vendors

Comment by John Malconian [ 09/Nov/18 ]

Other Maven modules that need to be checked:

mod-gobi
mod-patron
mod-receiving
mod-datasets
mod-workflow
mod-marccat
mod-sender
mod-aes
mod-email
mod-camunda
mod-source-record-storage
mod-kb-ebsco-java
mod-event-config
mod-oa-pmh
mod-source-record-manager
sping-module-core
edge-patron
edge-resolver
edge-orders
edge-common
edge-rtac
edge-oai-pmh

Comment by John Malconian [ 10/Nov/18 ]

Updated:
mod-gobi
mod-patron
mod-receiving (empty repo)
mod-datasets (no Java)

Comment by David Crossley [ 12/Nov/18 ]

Updated:

mod-rmb-template
edge-patron
edge-resolver
edge-orders
edge-common
edge-rtac
edge-oai-pmh

Comment by John Malconian [ 12/Nov/18 ]

No changes needed:

mod-workflow
mod-camunda
spring-module-core
mod-email
mod-sender

Updated:

mod-aes
mod-marccat

Comment by John Malconian [ 12/Nov/18 ]

Updated:

mod-source-record-manager
mod-source-record-storage
mod-event-config
mod-oai-pmh
mod-kb-ebsco-java

I think that about does it.

Comment by John Malconian [ 12/Nov/18 ]

Implemented workaround as described in this issue for all FOLIO Maven projects.

Generated at Thu Feb 08 23:14:35 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.