Skip to content

Build Xatkit

Gwendal Daniel edited this page Feb 7, 2022 · 21 revisions

This page details how to build and install Xatkit.

Requirements

All systems

  • JDK 8 (exact version). Xatkit requires a JDK to compile the different Xatkit components. Note that the Xatkit engine itself only requires a JRE to run and deploy bots.
  • Git
  • Maven

📚 If you already have a previous version of Xatkit installed we recommend to also delete the xatkit directory from your .m2 repository. On Windows, it is located here: /users/<Username>/.m2/repository/com/xatkit

Installation

1- Clone the Xatkit repository and pull the submodules

git clone https://github.com/xatkit-bot-platform/xatkit.git
cd xatkit
git submodule update --init --recursive

This command will clone several Git repositories under the xatkit/ directory:

  • xatkit/xatkit-runtime: the Xatkit execution engine
  • xatkit/xatkit-metamodels/*: the Xatkit base metamodels
  • xatkit/platforms/*: the Xatkit platforms bundled with the base distribution
  • xatkit/intent-providers: the intent providers supported by Xatkit
  • xatkit/processors: the processors bundled with Xatkit
  • xatkit/monitoring: the monitoring solutions bundled with Xatkit

Each Git repository contains a maven project that can be imported in your preferred IDE.

2- Build Xatkit projects

Navigate to the root of the xatkit directory and run the following command:

mvn clean install -DskipTests

This will build all the necessary projects to get started with Xatkit. Note that test execution are skipped because they require some additional configuration.

📚 You can rebuild a single platform by navigating to its root directory and running the same command. Here is an example for the chat platform: cd platforms/xatkit-chat-platform && mvn clean install -DskipTests

Check the Installation

Congratulations! You have now performed all the steps to build your own Xatkit development installation. You can test that everything is correctly setup by navigating to the xatkit/xatkit-examples/GreetingsBots/GreetingsBot directory and run the preset GreetingsBot example using the following command:

mvn clean compile
mvn exec:java -Dexec.mainClass="com.xatkit.example.GreetingsBot"

⚠ Windows users may need to replace mvn exec:java -D"exec.mainClass"="com.xatkit.example.GreetingsBot" depending on the command prompt they use.

The console will log some initialization information, and after a few seconds you should see the following message:

You can test your chatbot here http://localhost:5000/admin (note that the bots behavior can be slightly different on the test page than when it is deployed on a server)

Open your browser and navigate to http://localhost:5000/admin to test your deployed chat bot!

Build the latest development version

The git submodule update command fetches the Xatkit repositories at the commit corresponding to the latest stable version of Xatkit. If you want to contribute to Xatkit you probably want to work on the latest development version. To do so you can run the following command:

git submodule foreach 'git checkout master'
mvn clean install -DskipTests

This will checkout the master branch of all the submodules, and build a fresh installation of Xatkit with the latest versions of each repository.

If you want to pull the latest updates of Xatkit you can run the following command:

git submodule update --recursive
mvn clean install -DskipTests

Update specific components development version

If you just want to update a specific component, move to the component's folder and write

git checkout master
git pull
mvn clean install -DskipTests

TL;DR

To deploy a Xatkit example server in Linux running in localhost, run the following commands:

git clone https://github.com/xatkit-bot-platform/xatkit.git
cd xatkit
git submodule update --init --recursive
mvn clean install -DskipTests
cd xatkit-examples/GreetingsBots/GreetingsBot
mvn clean compile
mvn exec:java -Dexec.mainClass="com.xatkit.example.GreetingsBot"

Open your browser and navigate to http://localhost:5000/admin to test your deployed chat bot!

Clone this wiki locally