![]() | The content on this page is deprecated. Please see the separate documentation space for developer reference material about FishEye and Crucible. |
Introduction
Crucible uses the standard Atlassian Plugins framework, so many of the tasks involved in developing a plugin for Crucible are the same as for other Atlassian products.
The differences are:
- The set of plugin types available.
- And, of course, the API available for plugins to interact with the Crucible application.
Building a Crucible Plugin
The simplest way to build a Crucible plugin is via Maven.
Atlassian provides an Archetype for Fisheye/Crucible plugins.
You can create a maven 2 project containing a sample Servlet Plugin Module with the following command:
mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create \ -DarchetypeGroupId=com.atlassian.maven.archetypes \ -DarchetypeArtifactId=crucible-plugin-archetype \ -DarchetypeVersion=1-SNAPSHOT \ -DremoteRepositories=https://maven.atlassian.com/repository/public/ \ -DgroupId=com.foo -DartifactId=foo-crucible-plugin
This will create your project in a subdirectory of your current directory named foo-crucible-plugin
. Change into that directory (cd foo-crucible-plugin
). You can create the plugin jar with the command mvn package
, and install it in a running Fisheye or Crucible instance by copying target/foo-crucible-plugin-1.0-SNAPSHOT.jar
to the var/plugins/user
directory of your Fisheye/Crucible instance.
Crucible Plugin Module Types
Servlet Modules
Create a servlet which is deployed to the same web application context as Fisheye/Crucible. See Servlet Plugin Modules for more details.
Crucible SCM Plugins
An SCM plugin module lets Crucible create reviews based on files stored in another source code management system. See Crucible SCM Plugins for details.
Event Listener Plugins
An event listener plugin module will be called when certain events occur inside Crucible. See Crucible Event Listener Plugins for details.
The Crucible API
Your plugin will need to use The Crucible API to retrieve data from Crucible and to perform operations on it, such as changing the state of reviews.
Debugging your plugin
You can start Crucible in debug mode with the environment variable setting:
export FISHEYE_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
This allows you to connect your IDE to the debugger listening on port 5005.