Use Spring Boot Build Tool Plugins to package Chutney as an executable jar.
| <plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<executable>true</executable>
<layout>ZIP</layout>
<mainClass>com.chutneytesting.ServerBootstrap</mainClass>
<finalName>chutney-${project.artifactId}-${chutney.version}</finalName>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
|
Declare a BOM dependency on Chutney parent.
| <dependencyManagement>
<dependencies>
<dependency>
<groupId>com.chutneytesting</groupId>
<artifactId>chutney-parent</artifactId>
<version>${chutney.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
|
Add Chutney server and UI as dependencies.
| <dependency>
<groupId>com.chutneytesting</groupId>
<artifactId>server</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.chutneytesting</groupId>
<artifactId>ui</artifactId>
<scope>runtime</scope>
</dependency>
|
Then, add JDBC driver dependency for your chosen Chutney main database.
| <dependency> <!-- (1) -->
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
</dependency>
<dependency> <!-- (2) -->
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency> <!-- (3) -->
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
|
- For SQLite as Chutney main database
- For H2 as Chutney main database
- For PostgreSQL as Chutney main database
Also, you should add any dependencies you would need to run your scenarios.
This may depend on the underlying Chutney actions you are using.
| <dependency> <!-- (1) -->
<groupId>com.oracle</groupId>
<artifactId>ojdbc11</artifactId>
<version>x.x.x</version>
<scope>runtime</scope>
</dependency>
<dependency> <!-- (2) -->
<groupId>weblogic</groupId>
<artifactId>wlthinclient</artifactId>
<version>x.x.x</version>
<scope>runtime</scope>
</dependency>
|
- Example for using SQL actions and query an Oracle database
- Example for using JMS actions with a WebLogic server
Optionally, add your own Actions and Functions.
| <dependency>
<groupId>com.my.company</groupId>
<artifactId>chutney-extensions</artifactId>
<version>x.x.x</version>
<scope>runtime</scope>
</dependency>
|