I have been converting a simple Grails 6 app to Gr...
# questions
j
I have been converting a simple Grails 6 app to Grails 7, and I'm getting there, but I keep getting a 'unable to resolve class org.apache.commons.lang.time.DateUtils' error, and others also from the commons.lang package. In Grails 6 and earlier one didn't need to declare a dependency for this, it was built in. It tried declaring a dependency with: implementation 'org.apache.commonscommons lang33.13.0' but that didn't help. Also are groovy-dateutil and groovy-datetime part of core now?
t
Try using
implementation 'org.apache.commons:commons-lang3:3.18.0'
and
org.apache.commons.lang3.time.DateUtils
https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/time/DateUtils.html
j
Thanks, that got me past that, changing the class references to 'lang3'. Now compiling! I will be testing it out soon.
j
fyi we intentionally removed lang due to its size
p
j
It's up to you - the reason we've been removing it is because of it's size
I think security still pulls in several commons libs that we could trim, but haven't made an effort
p
but I'm wondering if lang and groovy-dateutil are linked of if the groovy dep alone might provide the same functionality without the need of the big lang dep