Modularize jdom. Java 9+ support
Hello guys.
I made some fork of jdom (https://github.com/consulo/jdom) where you can see those changes:
- migrated to maven
- splitting core and impl of xpath(now jaxen is not required)
- contrib project splitted into few projects without any optional dependencies (some code of this project is left, since i don't have idea what do with that)
- added module-info for base projects (with correct package export)
I don't break api, but made some breaking change - it's xpath implementation (there no default impl inside core module). That mean - need add org.jdom:jdom-xpath-jaxen dependency for create dependency tree like was before.
I extracted xpath java impl, since it's very useful due it's not require old jaxen dependency.
Project build with 1.6 bytecode (module-info build via maven module, which generate module-info classfile)
Also, i added Travis support for my fork (https://github.com/consulo/jdom/blob/maven/.travis.yml) and you can see running at different JDKs.
I have few open questions - if you accept this:
- version? Next version is 3.0?
- if next version is 3.0 - package rename? I do not break API, maybe 2.1 ? And we don't need rename package
- contrib module - more splitting?
We need this PR?
Thanks :)
If i miss something, notify me - i will fix it.
@VISTALL maybe it make sense to split the efforts a bit, e.g. switch to maven seems like something that can be done independently of other changes?
Hello @laeubi. It's possible recreate it again a project, but we need it?
In current state - library can be used as is. My draft is an example t's a way - how library can evolve in new reality (java9+ modules).
Since already passed few years, there no active developers - I'm not sure about future of this library.
Maybe it's time for publish my build in other group.
@VISTALL maybe you are right I don't have an idea of the plans for this project, I just noticed it used in another project and wanted to update it or probably wanted to submit some improvements and the current ant based setup is a bit odd to use, so I found your ticket mentioning maven support :-)
This is a great project. So good, that even with minimum maintenance, works perfectly. We use it a lot in our projects and I'd love to see it updated. We'd have a lot of code to migrate otherwise.
We are working around this modules info, in Gradle, using org.gradlex.extra-java-module-info Gradle plugin.
extraJavaModuleInfo {
...
automaticModule ('jdom2-2.0.6.jar', 'org.jdom2')
...
}
but it would be better to have Modules support by the library itself.
BTW, this issue duplicates #169