Gradle is InterMine's build tool. In InterMine 2.0, Gradle replaced ant.
Below are common commands you will use when building InterMine databases and deploying webapps. See docs.gradle.org for the full list.
Previously, all third party JARs were kept in the InterMine code repository and the build compiled all InterMine dependencies. Now, Gradle, via the Maven plugin, manages and downloads all JARs and only your local project is compiled.
To use local data sources
See the maven plugin docs on the install task for details.
Example: https://github.com/intermine/flymine-bio-sources - FlyMine-specific data sources.
When installed locally, the JAR that is produced is available in the
maven repo located in
The JARs downloaded as dependencies are available in the Gradle
Note The build is going to be looking at the resulting JAR created by this command. If you make any changes to your data sources, install again to update the JAR to make those changes visible to the build.
To use common data sources in the InterMine library
- No action required. Use project XML file as normal.
The migration script you used already set up the dependency to the
intermine-bio-sources project. This project includes
uniprot and other data sources, and are on the classpath. During the build, the code will look for the uniprot jar, e.g.
bio-source-uniprot-2.0.jar and find it on the classpath successfully. Maven will download it for you.
Delete and recreate all database tables
Delete and recreate all database tables using a specific property file.
To run a single source
Note You can try --info or --debug too
To run a single postprocess
To run a full build
We are using the same project build script, but we've moved it to the
intermine-scripts repository with our other scripts.
There are several ways to deploy your InterMine webapp. You can use
cargo to deploy your webapp to a running Tomcat instance, or
gretty to use an embedded Tomcat instance. Run
./gradlew tasks to see all the available tasks.
cargo for our production instances and
gretty on our local dev machines.
Uses the config in the mine properties file, e.g.
flymine.properties, to deploy the webapp, see below.
|webapp.hostname||localhost||name of host. If not set, tries to use webapp.deploy.url|
|webapp.path||flymine||location of path of webapp|
|webapp.manager||TOMCAT_USER||tomcat username, needed to deploy webapp|
|webapp.password||TOMCAT_PWD||tomcat password, needed to deploy webapp|
|webapp.protocol||https||OPTIONAL, defaults to http|
|webapp.port||8081||OPTIONAL, defaults to 8080|
Note Cargo uses hot deployment which over time, fills up the PermGen memory of the JVM process running your container. Continuously deploying an artifact will inevitably lead to a java.lang.OutOfMemoryError
- Embedded tomcat, uses port 8080.
- Logs are in $HOME/logs, for more details: http://akhikhl.github.io/gretty-doc/Logging.html
- Gets the
URLand tools location from the $mine.properties file.
- Uses the webservices from the webapp specified in the $mine.properties file. For the time being, you have to have an InterMine webapp running to launch a bluegenes instance.
- The app will be deployed at the specified
URL, port 5000.
- It is suggested to launch the app in the background (append
&to the command).
- Please see Blue genes for details on how to configure your bluegenes instance.
To use a specific properties file, set the file suffix with the
-Dorg.gradle.project.release parameter like so:
That command will build the database set in the
To see a list of command-line options, run:
To see what tasks are available, run:
To get rid of compiled files, run:
To update your local packages, run:
See Local installation for how to install InterMine locally. (You shouldn't do
this normally, instead use the JARs available via Maven).
gradle. This is the wrapper that comes with InterMine and ensures that everyone is using the same version.
The updated Gradle version comes with
daemons enabled by default. These are helper processes that exist in the background. This can speed up builds for example, but sometimes, under heavy development, can cause problems when InterMine does not properly dereference assets. We are working on fixing this! In the meantime, you should append
-Dorg.gradle.daemon=false to your
- See: Daemon docs