WARNING: At this moment (July 2018) the development branch contains an unstable version of OpenMarkov, we are working to provide a stable version as soon as possible.
Downloading OpenMarkov's repositories
At this point, you are supposed to have a working IDE and Git in your computer; if not, go back and install them.
You have to download every repository you want to browse plus these two: org.openmarkov, which is like the front door of OpenMarkov; and org.openmarkov.full, which acts as the corridors to the other Maven repositories.
You can download all repositories with this script.
The script will clone from the development branch. Once over, import your local copy into your IDE. We explain how to do it for Eclipse and IntelliJ.
1a. Importing OpenMarkov into Eclipse
Open Eclipse and import the project (File > Import > Maven > Existing Maven Projects). Then select the
/OpenMarkovMainFolder folder and click "Finish". You will see something like this:
As a final test, right click the OpenMarkov.java file and run it (Run > As Java Application).
1b. Importing OpenMarkov into IntelliJ
Open IntelliJ and select "Import project"¹. If you are already in the project view, you can import it by selecting "File > New > Project from existing sources". Select the folder that contains both git clones (
/OpenMarkovMainFolder, in our case)². Choose "Maven" below the "Import project from external model" option.
Now, mark the following options:
- Check the box "Search for projects recursively" because the repositories are not in the root folder, but in subfolders.
- [Optional, but strongly recommended] Take into account that by default IntelliJ will save its auxiliary files in the same folder as the real project and you don't want that. To avoid it, check the box "Keep project files in..." and choose an auxiliary folder; for example,
- Check the box "Import Maven projects automatically" to download all the OpenMarkov subprojects. Click "Next".
Now you should see every repository you downloaded in the next window (here we only downloaded the essential two):
If that's not the case, check that git has downloaded both repositories and begin this section again.
Click "Next". If IntelliJ asks for an SDK (JDK), set its path as explained below. Alternatively, you can skip this step now and install it later.
And then the last window, change back the "Project file location" to
/OpenMarkovMainFolder before clicking "finish".
Setting the path for the JDK
If IntelliJ is unable to locate your Java Development Kit (JDK, also known as SDK), it will ask you for its location. It will likely be in one of these folders:
Set it with the "+" button.
Setting the location of the repositories
Newest versions of IntelliJ do this automatically, so if you don't get this message skip this section. Older ones might show a message (on the right lower corner) complaining about invalid VCS mapping³. That is because OpenMarkov's code is not in the folder
/OpenMarkovMainFolder itself, but in its subfolders.
Expand the message, click "Configure", mark the two OpenMarkov repositories shown, add them with the "+" button, and remove the
/OpenMarkovMainFolder folder with the "-" button. The screen will look like this:
Close that window. Press Ctrl+E and choose "Maven Projects" in order to show the Maven hierarchy. You must see something like:
As a final test, right click on the OpenMarkov.java file and click "Run".
If it is the first time you open IntelliJ, it will ask you about installing plugins. You don't need to mark anyone as the default configuration is enough to run OpenMarkov.
If Windows blocks you for any reason (for example, because it is unable to access the folder
/OpenMarkovMainFolder) run IntelliJ as administrator.
If you closed this message don't worry, it will reappear eventually.