jberet / jsr352

Implementation of Jakarta Batch Specification and API
Eclipse Public License 2.0
124 stars 76 forks source link

Consider dropping guava #544

Closed Xiphoseer closed 3 weeks ago

Xiphoseer commented 1 month ago

As far as I can tell, there's a single function where Googles guava is used outside of tests: https://github.com/jberet/jsr352/blob/8ef714318637f484f59f059164b5ba1dc006e018/jberet-core/src/main/java/org/jberet/repository/TableColumns.java#L111-L127

Here, the Throwables class is used to turn the exception into a string, or if that is too long, to turn just the root cause into a string.

With all dependencies of jberet-core being set to provided and only a note in the README, this makes it harder to run JBeret on Java SE. If guava is not added to the classpath, this ends up as a raw java.lang.NoClassDefFoundError: com/google/common/base/Throwables in org.jberet.repository.TableColumns

liweinan commented 1 month ago

@Xiphoseer Would you like to provide a PR to this task?

Xiphoseer commented 1 month ago

Maybe. I've had some trouble in the past getting the project to build from source locally, would need to check with my employer and can't give and ETA right now, but in general I'm open to work with you on this.

liweinan commented 3 weeks ago

This request is reasonable. Currently just some methods from guava are used, and maybe it can be replaced by handwritten methods to replace them so to get rid of the guava dep. I'll try to make a solution to this.

Xiphoseer commented 3 weeks ago

To me it looked like there are some legitimate test cases using guava so <scope>test</scope> might be a good incremental step.