Guice-JPA installation guide



  • Java 11 SDK
  • Maven 3 (optional)

Download the artifacts

Download from the download page and deflate it.

(alternative) Building the artifacts

An usual compilation using maven of this Git repository content will produce two artifacts into server/container/guice/jpa-guice/target directory:

  • james-server-jpa-guice.jar
  • james-server-jpa-guice.lib

You can for example run in the base of this git repository:

mvn clean install

To run james, you have to create a directory containing required configuration files.

James requires the configuration to be in a subfolder of working directory that is called conf. You can get a sample directory for configuration from server/apps/jpa-app/sample-configuration. You might need to adapt it to your needs.


James Launch

Edit the configuration to match your needs.

You also need to generate a keystore in your conf folder with the following command:

$ keytool -genkey -alias james -keyalg RSA -keystore conf/keystore

Once everything is set up, you just have to run the jar with:

$ java -javaagent:james-server-jpa-guice.lib/openjpa-3.2.0.jar \
    -Dlogback.configurationFile=conf/logback.xml \
    -Djdk.tls.ephemeralDHKeySize=2048 \ \
    -jar james-server-jpa-app.jar