-
Notifications
You must be signed in to change notification settings - Fork 39
Using Reach from a FAT JAR
Reach can be compiled, along with all its required dependencies, into a single JVM JAR file, known as a 'FAT' JAR. To produce a default FAT JAR for Reach:
sbt assembly
The resulting FAT JAR will be located in the target/scala-2.11
subdirectory and will be named with the current project version number and the suffix '-FAT.jar' (e.g., reach-1.3.5-FAT.jar
)
By default, the Reach FAT JAR runs in 'batch' mode: processing papers from an input directory and producing output into an output directory. Both directories, and many other configuration options, may be specified in the application.conf
configuration file. For more information on running Reach over multiple papers ('batch' mode) see the Running Reach Wiki page.
A FAT JAR may also be produced which runs a different main program. For instance, to produce a FAT JAR which runs the interactive Reach Shell, compile it like this:
sbt -DmainClass=org.clulab.reach.ReachShell assembly
To produce a FAT JAR which runs a small web service to process files, compile the FAT JAR like this:
sbt -DmainClass=org.clulab.reach.export.server.FileProcessorWebUI assembly
To run the Reach FAT JAR, simply call it from using the Java runtime system:
java -jar reach-1.3.5-FAT.jar
Additional arguments to the embedded main program may be provided on the command line after the JAR name. For example, when starting the file processing server, you may specify a port for the server to use as follows:
java -jar reach-1.3.5-FAT.jar --port 8088