Migrate to maven; Initial unit tests

Declined
#20 · Created  · Last updated

Declined pull request

Closed by: ·2021-12-20

Description

Preview of potential migration to Maven for building & unit testing the Java source code. This isn't a final PR, but I wanted to share this to solicit feedback & advice before spending more time on it.

  • Native code is built exactly as it is today. This PR doesn't touch how that works.

  • Java code has been moved and split up. Library and test code is now in well-known, standard dirs of src/main/java and src/test/java.

  • pom.xml added with tweaks required (e.g. adding java.library.path System property) to run and test Java code using either an IDE or command-line.

  • JOGL dependencies are automatically fetched using Maven dependency management (we can get rid of those in the 3rd party lib)

  • You can now run mvn install to deploy the JCEF jar artifact locally, remotely, etc.

  • Initial small batch of unit tests.

What's cool is you basically build your native libs (e.g. with CMake) and don't need to install them locally. You can then run 'mvn test' and run all the unit tests. Or jump into your favorite Java IDE and run the detailed or simple Mains without having to ever use anything in the tools dir.

Questions/Concerns/What's Left:

  • The unit tests work cannot run on Mac due to my inability to get java.library.path to correctly load up the native libraries there. I spent awhile trying to figure out how to get it to work, but hit my time limit. Any ideas?

  • Deleting/updating tools/*, updating READMEs on new build process

  • More unit tests

0 attachments

0 comments

Loading commits...