Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Append some missing dependencies #79

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 33 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,30 @@ If you want to host the application with your own hardware, follow the instructi
#### Dependencies
Download and uncompress the source code for each of following dependencies:

* [ccd-job-queue-0.1.8](https://github.com/bd2kccd/ccd-job-queue/releases/tag/v0.1.8)
* [ccd-mail-0.2.4](https://github.com/bd2kccd/ccd-mail/releases/tag/v0.2.4)
* [ccd-db-0.6.7](https://github.com/bd2kccd/ccd-db/releases/tag/v0.6.7)
* [ccd-commons-0.3.1](https://github.com/bd2kccd/ccd-commons/releases/tag/v0.3.1)
* [ccd-db-0.6.5](https://github.com/bd2kccd/ccd-db/releases/tag/v0.6.5)
* [remoteSchedulerClient](https://github.com/bd2kccd/remoteSchedulerClient/archive/v0.1.4.zip)
* [ccd-job-queue-0.1.8](https://github.com/bd2kccd/ccd-job-queue/releases/tag/v0.1.8)

To install the dependencies, go to the top directory of each project and do a maven install by typing **mvn install**.

#### Application
Download and uncompress the application source code [causal-web-1.3.7](https://github.com/bd2kccd/causal-web/releases/tag/v1.3.7). To compile and build the application, go to the directory **causal-web-1.3.7** and type **mvn package**.

#### External Dependencies
You need both of these jars:
* [causal-cmd-0.2.1-jar-with-dependencies.jar](https://github.com/bd2kccd/causal-cmd/releases/tag/v0.2.1)
* [tetrad-lib-6.7.0.jar](https://cloud.ccd.pitt.edu/nexus/content/repositories/releases/edu/cmu/tetrad-lib/6.7.0/tetrad-lib-6.7.0.jar)

## Configure the software

### Setup the directory structure and copy libraries
First, you need to create a workspace for the application to work in. Create a directory called **workspace**, for an example ***/home/tuser/workspace***.
Inside the workspace directory, create another folder called **lib**, for example ***/home/tuser/workspace/lib***.

Copy the **causal-cmd-0.2.1-jar-with-dependencies.jar** to the **workspace/lib** folder.
Copy the **causal-cmd-0.2.1-jar-with-dependencies.jar** and the **tetrad-lib-6.7.0.jar** to the **workspace/lib** folder.

### Configure
There are 4 configuration files to configure located in causal-web-1.3.7/src/main/resources folder:
Expand Down Expand Up @@ -73,6 +78,32 @@ spring.profiles.active=scheduler,mysql

Make sure you set **ccd.server.workspace=/home/tuser/workspace** and **ccd.folder.lib=lib** in the **ccd.properties** file.

#### Alternative Database configuration
Instead of MySQL and HSQL, you might find it more convenient to use [H2 Database Engine](https://www.h2database.com/html/main.html). To enable this:

1. In the `pom.xml` file add the following dependency:
```
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.199</version>
</dependency>
```

2. Create a file called `application-h2.properties` in `causal-web-1.3.7/src/main/resources` folder: and add the following contents:
```
# DATASOURCE (DataSourceProperties)
spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.driverClassName=org.h2.Driver

# JPA (JpaBaseConfiguration)
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
```
3. In the `application.properties`, set the following property to:
```
spring.profiles.active=scheduler,h2,shiro
```

## Compile the Program
Go to the **causal-web** directory and run the command **mvn clean package**. This will create a jar file called **causal-web-1.3.7.jar** in the **/target** folder.

Expand Down