Skip to content
This repository was archived by the owner on Feb 8, 2026. It is now read-only.

HOWTO: Build

Derek Battams edited this page Jan 31, 2015 · 4 revisions

Prereqs

Make sure your system's JAVA_HOME environment variable is set and pointing to the root of your JDK installation.

Clone the repository

Clone the psmtp git repository to your system. Details on that left to github docs. Alternatively, you can just grab the latest zip/tar of the source code and use that instead -- removing the need for git in the build process.

Build

To produce the binary deliverable, simply go to the base directory of your cloned repo (where the *.gradle files live) and run one of the following:

$ gradlew

This will clean, build, & test the source code before generating a war file suitable for deployment in your favourite J2EE container. The war file will be located in build/libs/.

$ gradlew -b standalone.gradle

This will also clean, build, & test the source code before producing the packaged zip distribution of the standalone version of psmtp. The zip file will be located in build/distributions/.

Skip unit tests

If you're running against master and the unit tests happen to be failing (should be rare, but could happen) then you can simply append the following to either command to skip unit test execution:

clean war
clean distZip

The first is for the war version (using build.gradle) and the second is for the standalone version (using standalone.gradle).

And that's about it. Building should be easy, not complicated. :)


1 Code is written with and targeted for Java 7 so this is the minimum version required to build and run psmtp. Java 8 may or may not work; no testing has been done with Java 8 at this time.

Clone this wiki locally