Step 10 of 10 Installing and testing your plugin

Goal

Build a plugin jar from your project and install it into your XNAT application.

To build your plugin, you'll use the Gradle script that you created back in the beginning of your plugin. Building is fairly simple:

$ ./gradlew clean jar 

The first time you run this command, a lot of stuff will happen:

  • If you haven't already downloaded the Gradle run-time library, that will be downloaded to your local Gradle cache.
  • Any dependencies required to build your plugin will be downloaded if they haven't already be retrieved.
  • Any dependencies that have been updated will be downloaded.
  • The code will be compiled.
  • All of the compiled classes and static content will be built into a single output file in the build/libs folder.

Once the build has completed successfully, you're ready to install the plugin:

  • Shut down the Tomcat server for your XNAT application.
  • Copy or move the plugin jar file into the plugins folder under the folder configured as xnat.home.
  • Start Tomcat.
  • Log into XNAT.

The functionality for your plugin should now be available in your XNAT.

Completed!

You've created a new XNAT 1.7 plugin, added a number of different functions and features to it, and deployed it and watched it run in an XNAT server.

$label.name