The Job Common (or Java Common) project is a Java library that contains various useful utility classes and serializable models that are used commonly throughout the Java applications in the Piazza Core.
The models in this library are fully annotated using Jackson in order to support serialization of the Models to and from JSON.
Before building and running the pz-jobcommon project, please ensure that the following components are available and/or installed, as necessary:
- Java (JDK for building/developing, otherwise JRE is fine)
- Maven (v3 or later)
- Git (for checking out repository source)
- Eclipse, or any maven-supported IDE
- Access to Nexus is required to build
Ensure that the nexus url environment variable ARTIFACT_STORAGE_URL
is set:
$ export ARTIFACT_STORAGE_URL={Artifact Storage URL}
For additional details on prerequisites, please refer to the Piazza Developer's Guide Core Overview or Piazza Job Common sections. Also refer to the prerequisites for using Piazza section for additional details.
Create the directory the repository must live in, and clone the git repository:
$ mkdir -p {PROJECT_DIR}/src/github.com/venicegeo
$ cd {PROJECT_DIR}/src/github.com/venicegeo
$ git clone [email protected]:venicegeo/pz-jobcommon.git
$ cd pz-jobcommon
Note: In the above commands, replace {PROJECT_DIR} with the local directory path for where the project source is to be installed.
For details on configuring the job common project, refer to the Piazza job common documentation.
To build and run the job common library locally, pz-jobcommon can be run using Eclipse any maven-supported IDE. Alternatively, pz-jobcommon can be run through command line interface (CLI), by navigating to the project directory and run:
$ mvn clean install
To run the job common library unit tests from the main directory, run the following command:
$ mvn test