An usual compilation using maven will produce two artifacts into server/apps/distributed-app/target directory:
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/distributed-app/sample-configuration. You might need to adapt it to 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
You need to have a Cassandra, OpenSearch, S3 and RabbitMQ instance running. You can either install the servers or launch them via docker:
$ docker run -d -p 9042:9042 --name=cassandra cassandra:4.1.3
$ docker run -d --network james -p 9200:9200 --name=opensearch --env 'discovery.type=single-node' opensearchproject/opensearch:2.1.0
$ docker run -d -p 5672:5672 -p 15672:15672 --name=rabbitmq rabbitmq:3.12.1-management
$ docker run -d --env 'REMOTE_MANAGEMENT_DISABLE=1' --env 'SCALITY_ACCESS_KEY_ID=accessKey1' --env 'SCALITY_SECRET_ACCESS_KEY=secretKey1' --name=s3 registry.scality.com/cloudserver/cloudserver:8.7.25
Once everything is set up, you just have to run the jar with:
$ java -Dworking.directory=. -jar target/james-server-distributed-app.jar
By default, James is configured with Zenko Cloudserver which is compatible with AWS S3, in blobstore.propeties
as such:
implementation=s3
objectstorage.namespace=james
objectstorage.s3.endPoint=http://s3.docker.test:8000/
objectstorage.s3.region=eu-west-1
objectstorage.s3.accessKeyId=accessKey1
objectstorage.s3.secretKey=secretKey1