Open jvierling opened 1 year ago
This almost certainly breaks the ant build, since now it's not clear where these sources are coming from, who is supplying the new json module?
Yes, the PR breaks the ant build (with the org.json sources provided by mmj2), since I am now using a more recent version of org.json
than the one provided by mmj2 and there is for example no JSONObject#toMap()
in mmj2's org.json
. The json module is now managed by Maven, i.e. Maven fetches the .jar
file from a repository, caches it locally, and uses the .jar
for the compilation. In particular, the sources of the json module are not needed by the maven build process anymore.
I could try to replicate all the ant targets with maven so that the ant build can be removed altogether, if that's an option.
I don't mind using a more recent version of org.json
and not needing to vendor / maintain a fork, but I would like to be able to compile this project without maven. The actual origin of the sources that are being compiled is not at all clear with maven. If we are using a jar instead of compiling the dependency, then the build should do that - it should download a jar file from a specified repo and use it.
Ok, I see two ways to make the ant build work with the mmj2 code in this PR: 1) Updating the git module so that it points to org.json 20230227, 2) Use ivy to download the dependency for ant. I will try to get the second solution to work, because the first one still uses the git submodule.
both solutions are acceptable to me
I tried to manage the dependency with ant+ivy, however that turned out a bit more complicated than I expected. Therefore I made the submodule point to https://github.com/stleary/JSON-java/releases/tag/20230227 and adjusted the path in build.xml
accordingly. I also updated the maven build instructions.
@digama0 Do I need to make any corrections so that this can be merged?
This PR replaces the git submodule by a maven dependency and adds some unit tests for the serializer. The purpose of this PR is to simplify the build process by getting rid of the git submodule feature and to permit to update to a more recent version of the
org.json
dependency.