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 bt...@apache.org on 2017/11/01 11:00:12 UTC

[14/15] james-project git commit: JAMES-2205 Generate swagger documentation when building

JAMES-2205 Generate swagger documentation when building


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/b4aa905b
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/b4aa905b
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/b4aa905b

Branch: refs/heads/master
Commit: b4aa905b6504a8848ca263f33821173a424ed5f1
Parents: 466d91a
Author: Antoine Duprat <ad...@linagora.com>
Authored: Fri Oct 27 15:49:01 2017 +0200
Committer: benwa <bt...@linagora.com>
Committed: Wed Nov 1 17:56:47 2017 +0700

----------------------------------------------------------------------
 README.adoc                               |  1 +
 dockerfiles/compilation/java-8/compile.sh | 11 +++++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/b4aa905b/README.adoc
----------------------------------------------------------------------
diff --git a/README.adoc b/README.adoc
index 0a372a1..3768040 100644
--- a/README.adoc
+++ b/README.adoc
@@ -107,6 +107,7 @@ To retrieve compiled artifacts, one might mount these volumes:
 - --volume $PWD/dockerfiles/run/spring/destination:/spring/destination : is the volume used to get the compiled elements for Spring packaging.
 - --volume $PWD/dockerfiles/run/guice/cassandra/destination:/cassandra/destination : is the volume used to get the compiled elements for Guice Cassandra packaging and Cassandra-LDAP packaging.
 - --volume $PWD/dockerfiles/run/guice/cassandra/destination:/jpa/destination : is the volume used to get the compiled elements for Guice JPA packaging.
+- --volume $PWD/swagger:/swagger : is the volume used to get the swagger json files for webadmin documentation.
 
 Some tests needs a DOCKER_HOST environment variable in order to be played, they will be ignored if you don't provide this variable.
 If you wish to play them, you may use a command like the following (depending on your docker configuration):

http://git-wip-us.apache.org/repos/asf/james-project/blob/b4aa905b/dockerfiles/compilation/java-8/compile.sh
----------------------------------------------------------------------
diff --git a/dockerfiles/compilation/java-8/compile.sh b/dockerfiles/compilation/java-8/compile.sh
index afc499c..9b4d298 100755
--- a/dockerfiles/compilation/java-8/compile.sh
+++ b/dockerfiles/compilation/java-8/compile.sh
@@ -13,6 +13,7 @@ ORIGIN=/origin
 CASSANDRA_DESTINATION=/cassandra/destination
 JPA_DESTINATION=/jpa/destination
 SPRING_DESTINATION=/spring/destination
+SWAGGER_DESTINATION=/swagger
 
 for arg in "$@"
 do
@@ -46,9 +47,9 @@ git checkout $SHA1
 # Compilation
 
 if [ "$SKIPTESTS" = "skipTests" ]; then
-   mvn package -DskipTests -Pcassandra,inmemory,jpa,elasticsearch,lucene,with-assembly,with-jetm
+   mvn package -DskipTests -Pcassandra,inmemory,jpa,elasticsearch,lucene,with-assembly,with-jetm,swagger-json
 else
-   mvn package -Pcassandra,inmemory,jpa,elasticsearch,lucene,with-assembly,with-jetm
+   mvn package -Pcassandra,inmemory,jpa,elasticsearch,lucene,with-assembly,with-jetm,swagger-json
 fi
 
 # Retrieve result
@@ -77,4 +78,10 @@ if [ $? -eq 0 ]; then
       echo "Copying SPRING jars"
       cp server/app/target/james-server-app-*-app.zip $SPRING_DESTINATION
    fi
+
+   if [ -d "$SWAGGER_DESTINATION" ]; then
+      cp server/protocols/webadmin/webadmin-data/target/webadmin-data.json $SWAGGER_DESTINATION || true
+      cp server/protocols/webadmin/webadmin-mailbox/target/webadmin-mailbox.json $SWAGGER_DESTINATION || true
+      cp server/protocols/webadmin/webadmin-swagger/target/webadmin-swagger.json $SWAGGER_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