JSoarDevelopersGuide - soartech/jsoar GitHub Wiki
The instructions here are only if you're interested in checking out JSoar and building it from source, or contributing to the JSoar source code. To use JSoar in a project, just grab the jars from a release and see JSoarUsersGuide
JSoar has the following software requirements:
- Java 11 or newer
- Maven 3.x or newer
The coding conventions for the JSoar codebase are stored as Eclipse formatter rules in jsoar/eclipse-formatter.xml.
To import into Eclipse:
Window -> Preferences -> Java -> Code Style -> Formatter -> Import ...
Otherwise, basic rules are:
- NO TABS
- 4 spaces of indentation
- Opening braces on their own line
- WRITE TESTS
- Document public methods
JSoar is a maven project, so you should import it as a maven project into your IDE. You do not need the root pom.xml to be imported.
There are already Eclipse launch configurations set up in the tools/launches folder. If you're not using Eclipse, you should examine these files to see how to set things up in your IDE.
JSoar uses JUnit 5. Please run these tests so you know you haven't broken anything. New unit tests go in the src/test/java folder of the appropriate sub-project.
From the root directory of your jsoar repo, simply run mvn package
or mvn install
depending on what you're trying to do. The resulting binaries will end up in the various target
directories, and if you did an install, in your .m2
cache. These jars are intended to be used as dependencies, like what you would get from maven central
Some of jsoar's projects, such as jsoar-debugger, jsoar-soarunit, etc. can also be run as standalone applications, but these jars are not built by default. You need to enable the "uber" maven profile. For example, to build the jsoar-debugger standlone jar, do this:
mvn -pl jsoar-debugger -P uber package -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dmaven.source.skip=true
(I'm skipping the tests, javadoc, and source jar generation because they are unnecessary and it makes the build go much faster.)
The resulting jar will be at `jsoar\jsoar-debugger\target\jsoar-debugger--uber.jar
You can run this from the command line from within the target directory with java -jar jsoar-debugger-<version>-uber.jar
or by double-clicking the jar if your OS is setup to support that.
See the README.md.