Build Process
Build Process
The details of the build process are very different with respect to the different Jadex versions. In the following the steps for Jadex V2 are explained.
Basically Jadex V2 is modular project, which consists of many submodules with clearly defined dependencies. The overall build process is defined using the Maven tool.
Project Structure
In this section the basic Jadex project structure is briefly explained. It is very helpful to know what the basic functionalities of the different modules are and which dependencies between them exist in order to understand how Jadex V2 works and at which spots extensions could be possibly added.

Jadex packages
On an abstract level Jadex is composed of four main building blocks:
Jadex Rules
Jadex Rules is a general purpose forward-chaining rule system. It is comparable to other rule engines like JESS and Drools, but has been developed with a special focus on a small and lightweight design, which facilitates the usage in agents. This package is currently used as basis for the BDI kernel of the Jadex agent system. Relying on a general purpose rule engine allows for efficient rule execution and simplifies the optimization of the BDI kernel. Jadex Rules is a self-contained project on its own (cf. Jadex Rules Home).
Jadex Support Libraries
The Support Libraries contain small helper functionalities of general applicability. The 'commons' packages mainly contains static helper classes for e.g. enhanced reflection functionalities. In addition, the 'nuggets' package is a highly efficient general purpose XML to Java and vice versa converter. In the Jadex agent system nuggets is mainly used for marshalling and unmarshalling message content. Finally, the 'parser' package is a (slightly extended) Java parser. It allows for parsing arbitrary complex Java (1.4) expressions (right hand side of an assignment). The parsed expressions can be directly evaluated (possibly with parameters) to Java objects. The parser is utilized in the Jadex agent system for evaluating Java expressions from XML description files of agents (e.g. for belief values).
External Software
External libraries are used where appropriate. One specific aspect here is the construction of agent platforms relying of existing middleware. E.g. the JADE adapter of the Jadex agent system wraps the well-known JADE agent platform and reuses its services for controlling Jadex agents.
Jadex Agent System
The Jadex agent system is based on the explicit distinction between kernels and platforms. A kernel is the realization of a specific agent architecture such as BDI (belief-desire-intention), rule-based or task-based, whereas a platform is responsible for executing agents and providing the necessary management functionalities e.g. for starting/stopping agents and registering/searching for services. To avoid a direct dependency between kernels and platforms the common base package 'bridge' has been devised. It contains functionalities that are needed by kernels as well as platforms and mainly consists of interfaces e.g. for an agent identifier.
On the kernel side, currently two different implementations are available. The BDI kernel allows for programming intelligent agent based on mentalistic (human-like) notions like beliefs and goals. An extensive library (applib) is available for this kernel. It provides reusable functionalities e.g. for interaction protocols like contract-net and interaction with management services like AMS and DF. In contrast, the micro kernel is a minimal agent kernel implementation, which only offers very basic functionalities for the agent programmer. Nonetheless, these agents are extremely small and efficient and can e.g. be used for conducting simulation experiments with a high number of agents (over 100.000 in a standard JVM with 64MB memory are possible). All agents rely on platform services for communication means. Hence, agents of different kernels can easily communicate and also hybrid systems (using BDI agents for complex tasks and micro agents for simpler ones) are possible.
On the platform side, currently the Standalone and the JADE implementations are available. The standalone platform is a lightweight, extensible, highly-efficient realization for running Jadex agents. It is based on the service metaphor and provides all its functionalities via so called platform services. These services can be easily configured using a configuration file (using a custom property or a Spring beans descriptor). With this approach the Standalone platform can be easily adapted to different use cases, e.g. a streamlined version for mobile devices can be built. As all aspects of the platform can be customized using services the Standalone platform can also be configured as simulation infrastructure providing event-driven and time-driven execution modes. The JADE adapter reuses the JADE agent platform as middleware for executing agents and thus allows a FIPA-compliant communication with other agent platforms.
Finally, packages for tools as well as example applications exist. One aim is that the tools should be independent from the the concrete kernel and hence be reuable to a great extent. As this is not achieveable for all kinds of tools (e.g. a BDI introspector), it future versions a separation to general purpose and kernel specific tools will be provided. The tools are integrated in the so called Jadex Control Center (JCC), which represents the central access point for all further tools. These tools are developed as plugins, so that the JCC can be configured in a flexible way and new tools can be added without much efforts.
Building with Eclipse
- Download [Jadex V2>Download.Available Packages] and unzip it to some directory
- If not present on your system install a new Java SE Development Kit (JDK) version from Sun
- If not present on your system install eclipse version 3.6 or newer
- Start eclipse and select some workspace
Install the M2Eclipse Plugin
- Select "Help -> Install New Software..." from the menu.
- Enter the plugin URL http://download.eclipse.org/technology/m2e/releases
- Select "Maven Integration for Eclipse" and install the plugin.

Install the m2eclipse plugin
Import Maven project
- Unzip the sources.zip from the Jadex distribution to a directory of your choice. Only the contents of this zip are needed for building.
- Use "File -> Import -> Maven / Existing Maven Projects" and choose "Next".

Import maven project (1)
- "Browse..." to the directory where you unzipped the sources. Maven will detect all projects in this directory and its subdirectories.

Import maven project (2)
- Click "Finish". Maven will import the projects and start the build process thereby download the necessary libraries from the web. The created jadex projects are named after the project structure explained above (e.g. kernels start with 'jadex-kernel-').

Imported Jadex projects in eclipse
Launching
- There are several predefined launch configuration available. Go to the folder scr
> main> config in the project "jadex-platform-sandalone-launch" - Rightclick on the file "Jadex Standalone.launch" and select "Run as
> Jadex Standalone"
Building a Binary Distribution with Maven
You can use the command line version of Maven 'mvn' to build a Jadex distribution, e.g. if you wish to provide a modified version of Jadex to other developers or users. The distribution will produce a zip file with a layout that resembles the original binary Jadex distribution.
- Install Maven, e.g. by downloading an unpacking a binary distribution from http://maven.apache.org/download.html and setting 'PATH' and 'JAVA_HOME' environment variables accordingly.
- Open a console window and go to the directory where you unpacked the Jadex sources (i.e. the directory where the top-level 'pom.xml' is located).
- Type 'mvn -P jadex-full-dist clean package', hit enter and wait.
- The '-P' option selects a so called profile from the 'pom.xml'. You can define other profiles in the 'pom.xml', e.g. if you wish to exclude certain parts in the distribution. The 'jadex-full-dist' profile will include everything that is normally part of the Jadex distribution.
- The 'clean' goal makes sure that previously built artifacts are removed and a fresh build is done for the distribution. Omitting the 'clean' goal might speed up the build process as only changed sources need to be recompiled. It is recommended to perform a clean build at least for a final distribution.
- The 'package' goal finally produces the build. First all classes are compiled and test cases of the single projects are executed. When all projects are build, the assembly is performed, ultimately leading to a 'jadex-xxx.zip' being placed in the 'target' folder, where 'xxx' will contain the current version number.