FasterXML / jackson-jr

Stand-alone data-binding module designed as a light-weight (and -featured) alternative to `jackson-databind`: will only deal with "Maps, Lists, Strings, wrappers and Java Beans" (jr-objects), or simple read-only trees (jr-stree)
Apache License 2.0
239 stars 31 forks source link

Adding Test Module with Groovy and Java 21 Support #128

Closed Shounaks closed 8 months ago

cowtowncoder commented 8 months ago

Ok name of module does not follow convention: i'll rename it as jr-test-module to be similar.

cowtowncoder commented 8 months ago

Ok. So, one big thing to change is to NOT make the test sub-project a publishable module -- we do not want to publish a jar/bundle since it is only used for testing the project itself. Otherwise publishing will push yet another useless module to Maven central. This allows removal of stuff in src/main/resources, as well as half of pom.xml.

I forget what is the way to avoid building an artifact, but there is a way.

I renamed sub-module to follow naming convention but did not touch pom.xml.

Also not sure about JDK to require: but for whatever reason, I was able to build and test it with JDK 8... so I don't think settings take effect yet (was expecting compile or test phase to fail, but everything passed).

cowtowncoder commented 8 months ago

@Shounaks I don't think Groovy test is actually run: it is compiled (I can make compilation fail by modifying class), but test not run.

This by

./mvnw clean test

from main level or

../mvnw clean test

from module dir. Both "pass", no tests run; only testCompile phase run.

Shounaks commented 8 months ago

image I was finally able to get the testcase compiled and running, after struggling for 3 days 😂 turns out, the fix was easier.

lets have a last look, and clean up the un-necessary items.

cowtowncoder commented 8 months ago

Looks good; I made some additional cuts and can now merge to 2.17, then up to master (need to rename packages) for 3.0.