diff options
Diffstat (limited to 'servicegateway/deployment')
-rw-r--r-- | servicegateway/deployment/pom.xml | 97 | ||||
-rw-r--r-- | servicegateway/deployment/src/main/release/bin/start.sh | 4 | ||||
-rw-r--r-- | servicegateway/deployment/src/main/release/bin/stop.sh | 2 |
3 files changed, 90 insertions, 13 deletions
diff --git a/servicegateway/deployment/pom.xml b/servicegateway/deployment/pom.xml index 88d6f4eb..2f025e92 100644 --- a/servicegateway/deployment/pom.xml +++ b/servicegateway/deployment/pom.xml @@ -18,22 +18,97 @@ <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.openo.gso.gui</groupId> - <artifactId>servicegateway</artifactId> + <artifactId>service-gateway-root</artifactId> <version>1.0.0-SNAPSHOT</version> </parent> - <artifactId>deployment</artifactId> - <name>deployment</name> - <packaging>jar</packaging> + <artifactId>service-gateway-deployment</artifactId> + <name>ServiceGatewayRootDeployment</name> + <packaging>pom</packaging> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> - <dependencies> - <dependency> - <groupId>org.openo.common-services.common-utilities</groupId> - <artifactId>commonlib-cbb</artifactId> - <version>1.0.0-SNAPSHOT</version> - </dependency> - </dependencies> + + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.codehaus.gmaven</groupId> + <artifactId>groovy-maven-plugin</artifactId> + <version>2.0</version> + </plugin> + </plugins> + </pluginManagement> + <plugins> + <plugin> + <groupId>org.codehaus.gmaven</groupId> + <artifactId>gmaven-plugin</artifactId> + <version>1.5</version> + <executions> + <execution> + <id>ServiceGateway package</id> + <phase>package</phase> + <goals> + <goal>execute</goal> + </goals> + <configuration> + <source> + System.out.println("******** Going to make release zip ********") + + deployFolder = "${project.build.directory}/deployoutput" + deployUnzip = "${project.build.directory}/deployunzip" + outfileName = "ServiceGateway-.${project.version}.zip" + + ant.delete(dir: "${deployFolder}") + ant.mkdir(dir: "${deployFolder}") + + ant.delete(dir: "${deployUnzip}") + ant.mkdir(dir: "${deployUnzip}") + + ant.mkdir(dir: "${deployUnzip}/webapps/ROOT") + ant.mkdir(dir: "${deployUnzip}/webapps/openoui#servicegateway#v1") + + ant.copy(todir: "${deployUnzip}") { + fileset(dir: "${basedir}/src/main/release"){ + exclude(name: "**/.gitignore") + } + } + + ant.copy(todir: "${deployUnzip}/webapps/ROOT") { + fileset(dir: "${project.build.directory}/../../service/target/ROOT") + } + + ant.zip(destfile: "${deployFolder}/${outfileName}") { + fileset(dir: "${deployUnzip}") + } + System.out.println("******** completed. ************") + </source> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <executions> + <execution> + <id>attach-artifacts</id> + <phase>package</phase> + <goals> + <goal>attach-artifact</goal> + </goals> + <configuration> + <artifacts> + <artifact> + <file>${project.build.directory}/deployoutput/ServiceGateway-.${project.version}.zip</file> + <type>zip</type> + </artifact> + </artifacts> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> </project> diff --git a/servicegateway/deployment/src/main/release/bin/start.sh b/servicegateway/deployment/src/main/release/bin/start.sh index 235b3197..521ef3b7 100644 --- a/servicegateway/deployment/src/main/release/bin/start.sh +++ b/servicegateway/deployment/src/main/release/bin/start.sh @@ -14,6 +14,8 @@ # limitations under the License. #******************************************************************************* #!/bin/bash +mkdir logs +mkdir temp cd .. export CATALINA_BASE=$(cd `dirname $0`; pwd) -catalina.sh start
\ No newline at end of file +$CATALINA_HOME/bin/catalina.sh start
\ No newline at end of file diff --git a/servicegateway/deployment/src/main/release/bin/stop.sh b/servicegateway/deployment/src/main/release/bin/stop.sh index bcc60433..365da00d 100644 --- a/servicegateway/deployment/src/main/release/bin/stop.sh +++ b/servicegateway/deployment/src/main/release/bin/stop.sh @@ -16,4 +16,4 @@ #!/bin/bash cd .. export CATALINA_BASE=$(cd `dirname $0`; pwd) -catalina.sh stop
\ No newline at end of file +$CATALINA_HOME/bin/catalina.sh stop
\ No newline at end of file |