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 11 (or higher version) You can verify the Java installation via command line with
  
java -version
openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)
  • Maven 3.3.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
Apache Maven 3.6.3

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/citrusframework/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>org.citrusframework</groupId>
  <artifactId>citrus-base</artifactId>
  <version>4.5.0-SNAPSHOT</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!