Development

This quickstart gets the Citrus project sources running in a few minutes, starting with initial git repository clone and ending with a built Citrus project ready for coding.

Preconditions

  • Git This can be either a command line client or some graphical UI. For simplicity, we assume you have the command line client installed.
  • Java 8 (or higher version) You can verify the Java installation via command line with
  
java -version
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b16, mixed mode)</pre>
  • Maven 3.0.x (or higher version) Download maven and install Maven on your machine. Please verify correct version and MAVEN_HOME setup using following command
  
mvn -version
Maven version: 3.0.x
Java version: 1.7.0_xx
Default locale: en_US, platform encoding: MacRoman
OS name: &quot;mac os x&quot; version: &quot;10.9&quot; arch: &quot;x86_64&quot; Family: &quot;mac&quot;</pre>

Initial git clone

First of all we get the Citrus sources from the repository on GitHub. You can use the following command to do this

  
git clone git://github.com/christophd/citrus.git

This will clone the Citrus project to the target directory citrus. In the following this project directory is referred to as PROJECT_HOME. For detailed instructions about the version control system git, please consult the official git website.

Build the Citrus artifacts

Now everything is setup properly and you can use Maven for all the rest:

  
mvn install

This command runs the full Maven build lifecycle with compilation, testing, packaging and installation of all artifacts. You will find the freshly built Citrus JAR files in your local Maven repository. Using this new own Citrus version is quite simple. Just add the SNAPSHOT dependency to your projects POM like this

  
<dependency>
  <groupId>com.consol.citrus</groupId>
  <artifactId>citrus-core</artifactId>
  <version>2.7.2</version>
  <scope>test</scope>
</dependency>

Create IDE project files

You can easily create the project files for your favorite IDE (IntelliJ IDEA, Eclipse or Netbeans). In your **** call

mvn idea:idea
mvn eclipse:eclipse
mvn netbeans:netbeans

The project files are now ready for import in your IDE. This is the preferred way for creating IDE project files in Maven. Please do not create IDE projects manually. Maven takes care of the whole project classpath construction.

Make sure that you have set the M2_REPO classpath variable set in Eclipse (or Netbeans). The variable value points to your local Maven repository (typically found in C:\Documents and Settings\username.m2\repo or ~/.m2/repo).

Maven ofers a suitable command to do this automatically:

mvn -Declipse.workspace=<path-to-eclipse-workspace> eclipse:add-maven-repo 

What’s next?

Have fun with Citrus!