It's recommended that if you are working with InterMine's Java code, you use an IDE. Our favourite IDE at InterMine towers is Intellij.
Intellij has a Gradle plugin, so, it automatically handles Gradle projects correctly. Here are detailed instructions on how to use Intellij:
Depending on your Intellij version, you should:
- Select New >
- Select Project from existing source >
- Then select the
build.gradlefile from your
Don't select the
build.gradlefiles from your sources. Instead, select the
build.gradle file from the
bio/sources directory. The dependencies are listed in the main project's
build.gradle file. If you load each subproject by itself, Intellij won't load the dependencies correctly.
You should import two projects for your mine:
- flymine (webapp and dbmodel)
If you are working with the core InterMine code for whatever reason, we have several projects to import:
You'll get errors at first as the dependencies are not in place. Build each project, and the dependencies will be downloaded and put on your classpath. We recommend you check the option "Build project automatically", located under Compiler Settings.
To run a unit test, right click on the "test" task and execute. "Test" is under "Verification".
Here is a detailed explanation: