Skip to content
Jason Wall edited this page May 23, 2019 · 6 revisions

Thanks for helping out! This page should get you started in setting up your development environment.

Of course there is:

git clone https://github.com/thejayvm/hex

So while we're waiting for that to download let's go over some prerequisites.

  • Apache Ant - As a Java developer you probably already have this installed so this shouldn't be a big deal. If not make sure you install it and have the ant executable available in your $PATH
  • A database (recommended Postgres) - Only one module (hex_repo) actually requires it but to run all tests you need it configured.

Now that the repo is finished downloading:

  1. cd hex
  2. ant ensure-ivy - Downloads an [Apache Ivy](Hex from the ground, up; an Ivy case study) jar to ~/.ant/lib - I'm telling you this incase you want to delete it later. (I personally hate it when libraries download a whole bunch of jars and don't tell you where they went!)
  3. ant -f hex_repo/build.xml ensure-config-files - Copies the appropriate config example files to local versions so you can config your database file specific to your environment. After you run this find hex_repo/test/hex_repo.properties and configure the driver, url and user credentials for you environment. It should be pretty straightforward if you've configured JDBC connections before.
  4. psql -c "CREATE DATABASE hex_repo_test;" - Assumes PostgreSQL and that you're using the database name hex_repo_test. Change this however it suites you for your environment.
  5. ant prepare - Populates your database with the data that the hex_repo tests rely on.
  6. ant test - Finally run the tests to see if your environment is setup correctly.

What on earth just happened?

Ivy downloaded all of the dependencies required for developing/compiling/running tests for all of the hex modules. If you want to know where they went they are in ~/.ivy2/cache.

Running the example application

Assuming you've already done everything above and that is working:

  1. cd example_application
  2. ant ensure-config-files - Does the same as above. You'll have to configure another hex_repo.properties file here in the adapters directory. (Sorry! Has to be that way.)
  3. ant run - Start the example application. Open your browser and navigate to http://localhost:8080/
  4. Type exit to stop the hex server (or Ctrl+C if you must)

Contributing

That normal contributing blurb

  1. Fork it (http://github.com/thejayvm/hex/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

If you're looking for things to do check the issues list, the help wanted list or @jasonewall for some inspiration.

N.B.: The help wanted list contains PRs that I or a core team member have started to get ideas out there regarding the direction of a specific feature. If it's been tagged as such it's basically ready for someone to pick up and implement!