digama0 / mmj2

mmj2 GUI Proof Assistant for the Metamath project
GNU General Public License v2.0
72 stars 24 forks source link

Replace git submodule by maven dependency #67

Open jvierling opened 1 year ago

jvierling commented 1 year ago

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.

digama0 commented 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?

jvierling commented 12 months ago

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.

digama0 commented 12 months ago

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.

jvierling commented 12 months ago

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.

digama0 commented 12 months ago

both solutions are acceptable to me

jvierling commented 12 months ago

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.

jvierling commented 7 months ago

@digama0 Do I need to make any corrections so that this can be merged?