This documentation is for XNAT versions 1.6.0 - 1.6.5. You can find the latest documentation for XNAT 1.7 at https://xnat.org/documentation

Skip to end of metadata
Go to start of metadata

Development Environments

There are a number of great environments for Java development available today. These include:

  • Eclipse is an advanced, cross-platform Java IDE.
  • SpringSource Tool Suite (also known as STS) is based on Eclipse, but includes a number of plugins for working with Maven (m2eclipse), the Spring Framework (which is used for a number of our current and future development efforts), XML, and more.
  • NetBeans is a freely available IDE supported by Oracle. XNAT developers have contributed instructions for working with XNAT in Netbeans.
  • IntelliJ IDEA is a commercial Java development environment. It has the ability to import Eclipse projects, including XNAT's provided sample project file and the projects for other supporting NRG software packages.

Supported Tools

The NRG team uses Eclipse or STS for development of all of our projects, thus our projects are designed to work well in an Eclipse environment and will be officially supported in Eclipse. Both Eclipse and STS are free to use in personal, academic, or commercial development applications. Any information on working with XNAT in other development environments is greatly appreciated and gratefully accepted, but only Eclipse-based tools are officially supported by NRG.

Useful Plugins

There are a number of very useful plugins for XNAT development in Eclipse:

NameDescriptionUpdate Site
M2EclipseIntegrates Maven dependency management and build and deployment lifecycles into Eclipse.http://download.eclipse.org/technology/m2e/releases
MercurialEclipseIntegrates Mercurial support into Eclipse, allowing you to easily work with code repositories directly from the IDE.http://mercurialeclipse.eclipselabs.org.codespot.com/hg.wiki/update_site/stable
VeloeclipseProvides standard editing functions for working with Velocity templates.http://veloeclipse.googlecode.com/svn/trunk/update/
Apache Directory StudioAmong other useful features, allows you to connect to and browse an LDAP directory tree.http://directory.apache.org/studio/update/1.x
Aptana StudioOffers JavaScript and CSS editors as alternatives to what vanilla Eclipse provides.

http://download.aptana.com/studio3/plugin/install

EclEmmaA free Java code coverage tool for Eclipse. Internally it is based on the EMMA Java code coverage tool.http://update.eclemma.org/
YourkitProvides comprehensive performance analysis of Java code. This is a commercial tool with free licenses available to open-source projects and heavily discounted licenses available to academic organizations.http://www.yourkit.com/download/yourkit95_for_eclipse/
CheckstyleHelp programmers write Java code that adheres to a coding standard. Automates the process of checking Java code for compliance.http://eclipse-cs.sf.net/update
FindbugsUses static analysis to look for bugs in Java code.

http://findbugs.cs.umd.edu/eclipse

The update sites can be added directly in Eclipse using the Help->Install New Software->Add... menu command to add the appropriate update site to your list of available update sites. In addition, you can find more plugins on the Eclipse Marketplace or by using the Help->Eclipse Marketplace... menu command. Note that STS does not come with the Eclipse Marketplace plugin by default, but you can install it manually.

 You can also import this bookmarks.xml in your Available Software Sites preferences to add the update sites to Eclipse: bookmarks.xml

Mercurial

Mercurial is a modern, distributed version control system. All official NRG Mercurial repositories are hosted at bitbucket.org/nrg. You can integrate Mercurial with Eclipse using the MercurialEclipse plugin, but you may need to install a separate Mercurial tool to work with the NRG repositories on bitbucket.org due to version issues.

Maven

Many NRG projects use Maven 2 to manage dependencies and perform the software build. A developer's system should have Maven 2 installed.

The xdat_release and pipeline projects currently are based upon Maven 1, however the Maven 1 binary is shipped in the Mercurial repositories for these projects, so the developer does not need to install Maven 1. We plan to move all projects over to Maven 2 eventually.

We recommend installing the Eclipse plugin for Maven, m2eclipse. As noted above, m2eclipse is included in STS by default.

Velocity

Currently XNAT uses Velocity templates for creating pages in the XNAT site. The Veloeclipse plugin provides a number of tools for working with Velocity templates.

  • No labels