This tutorial explains how to build LightJason/AgentSpeak(L++) from source.
Following the git-flow
paradigm (see → A successful Git branching model for details), the master
branch contains our current releases while the developing
branch contains the ongoing development.
git
via your preferred package manager should be sufficient.brew install git
.Notes:
Choose the right branch!
master
→ current release (default branch)developing
→ bleeding-edge developmentObtain the branch which is right for you by either downloading the corresponding ZIP-archive or change the branch inside the cloned git repository (
git checkout <branchname>
).If you chose to download the ZIP-archive, be aware that the resulting directory will be
AgentSpeak-<branchname>
. Either rename it toAgentSpeak
or keep this in mind in the following sections.In this section we assume that you are working inside the directory
Developer/
. If you choose another directory, replaceDeveloper/
accordingly.
Obtain the current source code from AgentSpeak(L++) and place it into Developer/AgentSpeak
. This can be done on the command line
either via Git
cd Developer
git clone https://github.com/LightJason/AgentSpeak.git
(if you chose to obtain the bleeding-edge AgentSpeak, checkout the developing
branch)
cd AgentSpeak
git checkout developing
or by downloading the AgentSpeak-master.zip (or AgentSpeak-developing.zip) and extracting it to Developer/
.
cd Developer
unzip AgentSpeak-master.zip # or unzip AgentSpeak-developing.zip
mv AgentSpeak-master AgentSpeak # or mv AgentSpeak-developing AgentSpeak
You should now have the following directory structure:
├── Developer/
│ └── AgentSpeak/
Change into the AgentSpeak project directory Developer/AgentSpeak
and run mvn package install
to build and install AgentSpeak:
cd Developer/AgentSpeak
mvn install
AgentSpeak will be installed as a local maven artifact in the directory ~/.m2
and can be imported as a dependency by your project.
The build process should terminate with a BUILD SUCCESS
message.
Add the installed AgentSpeak to your project by adding
<dependency>
<groupId>org.lightjason</groupId>
<artifactId>agentspeak</artifactId>
<version>0.0.2-SNAPSHOT</version>
</dependency>
to the dependency section of your pom.xml
. (Adjust version number if needed.)