You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ro...@apache.org on 2016/12/07 08:53:34 UTC
[06/13] james-project git commit: JAMES-1858: Custom compilation
command so that it can compile for both Cassandra and JPA,
change the README file for those update
JAMES-1858: Custom compilation command so that it can compile for both Cassandra and JPA, change the README file for those update
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/4b2604cb
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/4b2604cb
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/4b2604cb
Branch: refs/heads/master
Commit: 4b2604cb66bade1acb7503a89933543c436dea31
Parents: 190a8d2
Author: Quynh Nguyen <qn...@linagora.com>
Authored: Tue Nov 15 17:31:46 2016 +0700
Committer: Quynh Nguyen <qn...@linagora.com>
Committed: Wed Dec 7 14:03:53 2016 +0700
----------------------------------------------------------------------
README.adoc | 49 +++++++++++++++++++++++---
dockerfiles/compilation/java-8/compile.sh | 27 +++++++++-----
2 files changed, 63 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/4b2604cb/README.adoc
----------------------------------------------------------------------
diff --git a/README.adoc b/README.adoc
index 584b1a6..6a971bd 100644
--- a/README.adoc
+++ b/README.adoc
@@ -136,12 +136,12 @@ Run James with Java 8 + Guice + Cassandra + ElasticSearch
=========================================================
## Requirements
-Built artifacts should be in ./dockerfiles/run/guice/destination folder.
+Built artifacts should be in ./dockerfiles/run/guice/cassandra/destination folder for cassandra.
If you haven't already:
```bash
$ docker build -t james/project dockerfiles/compilation/java-8
$ docker run -v $HOME/.m2:/root/.m2 -v $PWD:/origin \
- -v $PWD/dockerfiles/run/guice/destination:/destination \
+ -v $PWD/dockerfiles/run/guice/cassandra/destination:/cassandra/destination \
-t james/project -s HEAD
```
@@ -158,14 +158,14 @@ $ docker run -d --name=elasticsearch elasticsearch:2.2.1
We need to provide the key we will use for TLS. For obvious reasons, this is not provided in this git.
-Copy your TLS keys to `destination/run/guice/conf/keystore` or generate it using the following command. The password must be `james72laBalle` to match default configuration.
+Copy your TLS keys to `run/guice/cassandra/destination/conf/keystore` or generate it using the following command. The password must be `james72laBalle` to match default configuration.
```bash
-$ keytool -genkey -alias james -keyalg RSA -keystore dockerfiles/run/guice/destination/conf/keystore
+$ keytool -genkey -alias james -keyalg RSA -keystore dockerfiles/run/guice/cassandra/destination/conf/keystore
```
Then we need to build james container :
```bash
-$ docker build -t james_run dockerfiles/run/guice/
+$ docker build -t james_run dockerfiles/run/guice/cassandra
```
To run this container :
@@ -180,6 +180,45 @@ You can add an optional port binding to port 8000, to expose the webadmin server
To have log file accessible on a volume, add *-v $PWD/logs:/logs* option to the above command line, where *$PWD/logs* is your local directory to put files in.
+
+Run James with Java 8 + Guice + JPA + Lucene
+=========================================================
+
+## Requirements
+Built artifacts should be in ./dockerfiles/run/guice/jpa/destination folder for jpa.
+If you haven't already:
+```bash
+$ docker build -t james/project dockerfiles/compilation/java-8
+$ docker run -v $HOME/.m2:/root/.m2 -v $PWD:/origin \
+ -v $PWD/dockerfiles/run/guice/jpa/destination:/jpa/destination \
+ -t james/project -s HEAD
+```
+
+## Howto ?
+We need to provide the key we will use for TLS. For obvious reasons, this is not provided in this git.
+
+Copy your TLS keys to `run/guice/jpa/destination/conf/keystore` or generate it using the following command. The password must be `james72laBalle` to match default configuration.
+```bash
+$ keytool -genkey -alias james -keyalg RSA -keystore dockerfiles/run/guice/jpa/destination/conf/keystore
+```
+
+Then we need to build james container :
+```bash
+$ docker build -t james_run dockerfiles/run/guice/jpa
+```
+
+To run this container :
+```bash
+$ docker run --hostname HOSTNAME -p "25:25" -p 80:80 -p "110:110" -p "143:143" -p "465:465" -p "587:587" -p "993:993" --name james_run -t james_run
+```
+
+Where :
+- HOSTNAME: is the hostname you want to give to your James container. This DNS entry will be used to send mail to your James server.
+
+You can add an optional port binding to port 8000, to expose the webadmin server. Please note that users are not authenticated on webadmin server, thus you should avoid exposing it in production.
+
+To have log file accessible on a volume, add *-v $PWD/logs:/logs* option to the above command line, where *$PWD/logs* is your local directory to put files in.
+
Run James with Java 6 + Spring + JPA
====================================
http://git-wip-us.apache.org/repos/asf/james-project/blob/4b2604cb/dockerfiles/compilation/java-8/compile.sh
----------------------------------------------------------------------
diff --git a/dockerfiles/compilation/java-8/compile.sh b/dockerfiles/compilation/java-8/compile.sh
index 966f872..8012a9d 100755
--- a/dockerfiles/compilation/java-8/compile.sh
+++ b/dockerfiles/compilation/java-8/compile.sh
@@ -10,7 +10,8 @@ printUsage() {
}
ORIGIN=/origin
-DESTINATION=/destination
+CASSANDRA_DESTINATION=/cassandra/destination
+JPA_DESTINATION=/jpa/destination
for arg in "$@"
do
@@ -44,17 +45,27 @@ git checkout $SHA1
# Compilation
if [ "$SKIPTESTS" = "skipTests" ]; then
- mvn package -DskipTests -Pcassandra,elasticsearch,inmemory,with-assembly,with-jetm
+ mvn package -DskipTests -Pcassandra,inmemory,jpa,elasticsearch,lucene,with-assembly,with-jetm
else
- mvn package -Pcassandra,inmemory,elasticsearch,with-assembly,with-jetm
+ mvn package -Pcassandra,inmemory,jpa,elasticsearch,lucene,with-assembly,with-jetm
fi
# Retrieve result
if [ $? -eq 0 ]; then
- cp server/app/target/james-server-app-*-app.zip $DESTINATION
- cp server/container/guice/cassandra-guice/target/james-server-cassandra-guice-*-SNAPSHOT.jar $DESTINATION
- cp -r server/container/guice/cassandra-guice/target/james-server-cassandra-guice-*-SNAPSHOT.lib $DESTINATION
- cp server/container/cli/target/james-server-cli-*.jar $DESTINATION
- cp -r server/container/cli/target/james-server-cli-*.lib $DESTINATION
+ if [ -d "$CASSANDRA_DESTINATION" ]; then
+ cp server/app/target/james-server-app-*-app.zip $CASSANDRA_DESTINATION || true
+ cp server/container/guice/cassandra-guice/target/james-server-cassandra-guice-*-SNAPSHOT.jar $CASSANDRA_DESTINATION || true
+ cp -r server/container/guice/cassandra-guice/target/james-server-cassandra-guice-*-SNAPSHOT.lib $CASSANDRA_DESTINATION || true
+ cp server/container/cli/target/james-server-cli-*.jar $CASSANDRA_DESTINATION || true
+ cp -r server/container/cli/target/james-server-cli-*.lib $CASSANDRA_DESTINATION || true
+ fi
+
+ if [ -d "$JPA_DESTINATION" ]; then
+ cp server/app/target/james-server-app-*-app.zip $JPA_DESTINATION || true
+ cp server/container/guice/jpa-guice/target/james-server-jpa-guice-*-SNAPSHOT.jar $JPA_DESTINATION || true
+ cp -r server/container/guice/jpa-guice/target/james-server-jpa-guice-*-SNAPSHOT.lib $JPA_DESTINATION || true
+ cp server/container/cli/target/james-server-cli-*.jar $JPA_DESTINATION || true
+ cp -r server/container/cli/target/james-server-cli-*.lib $JPA_DESTINATION || true
+ fi
fi
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org