Setting Up the SH Planning System - PlanX-Universe/sh GitHub Wiki
Dependencies
Before setting up the SH planning system, ensure you have the following dependencies installed:
- JDK
- Scala
- sbt (compatible with the Scala version)
For SH v2.0.0, the specific versions are:
- JDK 1.8
- Scala 2.11.12
- sbt 1.5.0
Installation
To get started with SH, follow these steps:
- Download the source code - Clone or download the SH repository to your local machine.
- Build the project - Navigate to the project directory and execute
sbt compile
. This compiles the source code and prepares the codebase for use.
Libraries
SH relies on several Scala and Java libraries. The build.sbt
file includes all necessary library dependencies with their respective versions. For SH v.20, the versions are:
Library Name | Version |
---|---|
Spray json | 1.3.6 |
Akka actor | 2.5.32 |
Akka http core | 10.1.15 |
Akka HTTP | 10.1.15 |
Akka stream | 2.5.32 |
Scalatest | 3.3.0-SNAP3 |
Junit | 4.13.2 |
grizzled-slf4j | 1.3.4 |
Scala parser combinators | 1.1.0 |
Java Executable Compilation
Package the SH planning system into a JAR file using sbt (sbt package
) or an IDE. If using IntelliJ IDEA, refer to this guide: https://www.jetbrains.com/help/idea/compiling-applications.html#package_into_jar.
HTTP Server
Host the SH planning system as a Web service using an HTTP server. This will allow various API calls to SH to obtain planning results.
- Start the server. Run
sbt
inside theservices
folder or run theHTTPServer
object. - Configuration. The default server configuration is set in
application.conf
with host127.0.0.1
and port9090
. These settings can be modified as needed.