Terracotta Summer Plugins

This summer at Terracotta, we’ve been pretty busy working on making our test and build infrastructure more convenient for the developers.
In fact, Ludovic, Louis and myself used some of our innovation days (days offered by Terracotta we can spend working on projects we want) to create (and contribute to) plugins for Nexus, Maven, and also for Jenkins (well, this last one was not developed during innovation days, but still, there it is !)
These plugins are really useful to us, and since we’ve made them open source (Apache 2 license ), here I am giving you a quick introduction to those plugins (source, binaries and docs , hoping they’ll help you too ! (and also hoping you’ll contribute to them if you like them ! ;-) )
They are hosted on Terracotta’s github account , follow their links to get more details about them.

Nexus plugins

If you want to know what are the dependencies of your project, or what depends on your project, your company repository manager is probably the best place to find out; after all, all the binaries are published there; that’s why we chose to develop / contribute to Nexus plugins :

  • Nexus Dependency Management Plugin : a plugin to list the dependencies of a given artifact (and its parent) and also display some metadata such as SCM url, build url (think Jenkins job url) and the maven profiles enabled during the build; you can also use its optional maven plugin companion , the Maven Metadata Properties Plugin that publishes additional metadata in the pom before committing it to the tag, during release.
  • Nexus Dependency Management Plugin

    Nexus Dependency Management Plugin

  • Nexus Artifact Usage Plugin a plugin (from ebay, we mainly contributed to it to make it work with recent Nexus releases) to list the backward dependencies of an artifact; with that plugin you can visualize all the artifacts depending on a given artifact. The index is built in memory at start up and is updated at each new deployment

The Nexus Dependency Plugin functionality is very similar to Sonatype’s Nexus pro Maven Dependency plugin functionality; but the Nexus Dependency Plugin can not only list your artifacts compile dependencies, but also the provided, and test ones (telling you which scope is each dependency in) and can also give you the parent pom of the selected artifact. (and is open source :-) )

Junit Categories Maven Plugin

This maven plugin lists all the Junit tests of a maven module (classes and methods) annotated with a @Category ; sorted by category names.
So for example, if you type in your terminal :

, you should get something like :

Jenkins Accelerated Build Now plugin

When all Jenkins’ slaves are busy, wouldn’t you like to be able to launch the job you’re waiting after right now ? without adding it to a long queue ? without waiting for current jobs to complete ?
If your answer is yes, then the Accelerated Build Now plugin is for you !
The idea behind this plugin is that a user should not wait for automatically scheduled jobs to complete; his/her jobs should be the priority (and in the case the plugin needed to kill a running job scheduled automatically, it re schedules it).

The plugin code is hosted on Github, its binary is available directly from Jenkins update center (Jenkins-> Manage Jenkins -> Manage plugins) , and its wiki page is hosted on Jenkins Wiki

Bonus : Nexus plugins dev tips

Launch Nexus in debug mode

Open wrapper.conf :

Uncomment some lines to have :

Then start nexus with :

And attach your favourite IDE (in the workspace/ project with all the sources matching your nexus version) to port 8000

Test your plugin without deploying it to a local Nexus

It can be pretty boring to re deploy your built nexus plugin (

) to test any change.
From the Nexus team chat room, I got the following tip :
Just add :

to NEXUS_HOME/conf/nexus.properties , so that XmlNexusPluginRepository reloads your plugin at every save ! (provided you don’t change the methods signatures, in that case you will have to restart Nexus)