Add esr portal source file to tomcat. 65/13365/1
authorlizi00164331 <li.zi30@zte.com.cn>
Tue, 19 Sep 2017 08:56:13 +0000 (16:56 +0800)
committerlizi00164331 <li.zi30@zte.com.cn>
Tue, 19 Sep 2017 08:56:13 +0000 (16:56 +0800)
Change-Id: Icf76b16954d68a0b7795747bb72324be0bc6b820
Issue-ID: AAI-333
Signed-off-by: lizi00164331 <li.zi30@zte.com.cn>
12 files changed:
common/pom.xml
distribution/pom.xml [new file with mode: 0644]
distribution/src/main/assembly/Dockerfile [new file with mode: 0644]
distribution/src/main/assembly/shutdown.bat [moved from integration/src/main/assembly/shutdown.bat with 95% similarity]
distribution/src/main/assembly/shutdown.sh [moved from integration/src/main/assembly/shutdown.sh with 92% similarity]
distribution/src/main/assembly/startup.bat [moved from integration/src/main/assembly/startup.bat with 95% similarity]
distribution/src/main/assembly/startup.sh [moved from integration/src/main/assembly/startup.sh with 92% similarity]
integration/pom.xml
integration/src/main/assembly/monitor.sh [deleted file]
integration/src/main/assembly/startup4docker.sh [deleted file]
pom.xml
portal/pom.xml

index d91eab3..13f6517 100644 (file)
@@ -22,7 +22,7 @@
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
-  <artifactId>aai-esr-gui-common</artifactId>
+  <artifactId>common</artifactId>
   <version>1.0.0-SNAPSHOT</version>
   <packaging>war</packaging>
   <name>esr-gui/common</name>
diff --git a/distribution/pom.xml b/distribution/pom.xml
new file mode 100644 (file)
index 0000000..5e153e8
--- /dev/null
@@ -0,0 +1,303 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Copyright 2017 ZTE Corporation.
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <parent>
+        <groupId>org.onap.aai.esr-gui</groupId>
+        <artifactId>aai-esr-gui-parent</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>distribution</artifactId>
+    <packaging>pom</packaging>
+    <name>esr-gui/distribution</name>
+
+    <properties>
+        <packagename>esr-gui</packagename>
+        <version.logback>1.1.2</version.logback>
+        <version.slf4j>1.7.6</version.slf4j>
+               <linux64id>linux64</linux64id>
+        <win64id>win64</win64id>
+        <linux64outputdir>target/assembly/${linux64id}</linux64outputdir>
+        <win64outputdir>target/assembly/${win64id}</win64outputdir>
+        <version.output>target/version</version.output>
+    </properties>
+
+    <build>
+               <finalName>esr-gui</finalName>
+        <plugins>
+                       <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack-tomcat-to-temporary-dir</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.apache.tomcat</groupId>
+                                    <artifactId>tomcat</artifactId>
+                                    <type>zip</type>
+                                    <outputDirectory>target/tomcat</outputDirectory>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+                       
+                       <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                                       <execution>
+                        <id>copy-resources-portal-linux</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${linux64outputdir}/tomcat/webapps/</outputDirectory>                                                     
+                            <resources>
+                                <resource>                                                             
+                                    <directory>../integration/target/esr-gui/</directory>
+                                    <filtering>false</filtering>
+                                    <includes>
+                                        <include>**/*</include>
+                                    </includes>
+                                </resource>
+                            </resources>
+                            <overwrite>true</overwrite>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>copy-resources-${linux64id}</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${linux64outputdir}</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>src/main/assembly/</directory>
+                                    <filtering>false</filtering>
+                                    <includes>
+                                        <include>**/*</include>
+                                    </includes>
+                                    <excludes>
+                                        <exclude>**/*.bat</exclude>
+                                    </excludes>
+                                </resource>
+                            </resources>
+                            <overwrite>true</overwrite>
+                        </configuration>
+                    </execution>
+                                       <execution>
+                        <id>copy-tomcat-resources-${linux64id}</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${linux64outputdir}/tomcat</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>${basedir}/target/tomcat/apache-tomcat-${tomcat.version}</directory>
+                                    <includes>
+                                        <include>**/*</include>
+                                    </includes>
+                                                                       <excludes>
+                                        <exclude>**/*.bat</exclude>
+                                    </excludes>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                                       <execution>
+                        <id>copy-resources-portal-win</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${win64outputdir}/tomcat/webapps/</outputDirectory>                                                       
+                            <resources>
+                                <resource>                                                             
+                                    <directory>../integration/target/esr-gui/</directory>
+                                    <filtering>false</filtering>
+                                    <includes>
+                                        <include>**/*</include>
+                                    </includes>
+                                </resource>
+                            </resources>
+                            <overwrite>true</overwrite>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>copy-resources-${win64id}</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${win64outputdir}</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>src/main/assembly/</directory>
+                                    <filtering>false</filtering>
+                                    <includes>
+                                        <include>**/*</include>
+                                    </includes>
+                                    <excludes>
+                                        <exclude>**/*.sh</exclude>
+                                    </excludes>
+                                </resource>
+                            </resources>
+                            <overwrite>true</overwrite>
+                        </configuration>
+                    </execution>
+                                       <execution>
+                        <id>copy-tomcat-resources-${win64id}</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${win64outputdir}/tomcat</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>${basedir}/target/tomcat/apache-tomcat-${tomcat.version}</directory>
+                                    <includes>
+                                        <include>**/*</include>
+                                    </includes>
+                                                                       <excludes>
+                                        <exclude>**/*.sh</exclude>
+                                    </excludes>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                                       <execution>
+                        <id>copy-dockerfile</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${version.output}</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>src/main/assembly/</directory>
+                                    <filtering>false</filtering>
+                                    <includes>
+                                        <include>Dockerfile</include>
+                                    </includes>
+                                </resource>
+                            </resources>
+                            <overwrite>true</overwrite>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+                       
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>distribution</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <target name="distribution">
+                                <tar destfile="${version.output}/${packagename}-${project.version}-linux64.tar.gz" longfile="posix" compression="gzip">
+                                    <tarfileset dir="target/assembly/linux64" filemode="0644" dirmode="0755">
+                                        <exclude name="**/*.sh"/>
+                                    </tarfileset>
+                                    <tarfileset dir="target/assembly/linux64" filemode="0755" dirmode="0755">
+                                        <include name="**/*.sh"/>
+                                    </tarfileset>
+                                </tar>
+                                <attachartifact file="${version.output}/${packagename}-${project.version}-linux64.tar.gz" classifier="linux64" type="tar.gz"/>
+                                <zip destfile="${version.output}/${packagename}-${project.version}-win64.zip" update="true">
+                                    <zipfileset dir="target/assembly/win64" includes="**"/>
+                                </zip>
+                                <attachartifact file="${version.output}/${packagename}-${project.version}-win64.zip" classifier="win64" type="zip"/>
+                            </target>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+       
+       <profiles>
+        <profile>
+            <id>docker</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>io.fabric8</groupId>
+                        <artifactId>docker-maven-plugin</artifactId>
+                        <version>0.16.5</version>
+                        <inherited>false</inherited>
+                        <configuration>
+                            <images>
+                                <image>
+                                    <name>onap/sdc/sdc-workflow-designer</name>
+                                    <build>
+                                        <cleanup>try</cleanup>
+                                        <dockerFileDir>${basedir}/${version.output}</dockerFileDir>
+                                        <dockerFile>${basedir}/target/version/Dockerfile</dockerFile>
+                                        <tags>
+                                            <tag>${project.version}-STAGING-latest</tag>
+                                        </tags>
+                                    </build>
+                                </image>
+                            </images>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>generate-images</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>build</goal>
+                                </goals>
+                            </execution>
+
+                            <execution>
+                                <id>push-images</id>
+                                <phase>deploy</phase>
+                                <goals>
+                                    <goal>build</goal>
+                                    <goal>push</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+       
+</project>
diff --git a/distribution/src/main/assembly/Dockerfile b/distribution/src/main/assembly/Dockerfile
new file mode 100644 (file)
index 0000000..1e26c6f
--- /dev/null
@@ -0,0 +1,26 @@
+FROM ubuntu:16.04
+
+MAINTAINER "Li Zi" <li.zi30@zte.com.cn>
+
+EXPOSE 8080
+
+#install openjdk-1.8
+#RUN sed -i 's#http://archive.ubuntu.com#http://mirrors.163.com#g' /etc/apt/sources.list
+RUN apt-get update
+RUN apt-get install -y openjdk-8-jdk
+
+#configure the JDK
+RUN sed -i 's|#networkaddress.cache.ttl=-1|networkaddress.cache.ttl=10|' /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/java.security
+ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
+ENV PATH $PATH:/usr/lib/jvm/java-8-openjdk-amd64/jre/bin:/usr/lib/jvm/java-8-openjdk-amd64/bin
+ENV CLASSPATH .:${JAVA_HOME}/lib:${JRE_HOME}/lib
+ENV JRE_HOME ${JAVA_HOME}/jre
+
+#add esr gui related resources to the docker image
+RUN mkdir /home/esr
+WORKDIR /home/esr
+ADD esr-gui-*-linux64.tar.gz /home/esr-gui/
+RUN chmod 755 /home/esr-gui/**/*.sh
+
+ENTRYPOINT /home/esr-gui/startup.sh
+
similarity index 95%
rename from integration/src/main/assembly/shutdown.bat
rename to distribution/src/main/assembly/shutdown.bat
index c2178a3..3fa4b1b 100644 (file)
@@ -15,7 +15,7 @@
 @REM\r
 \r
 @echo off\r
-title catalog\r
+title esr-gui\r
 \r
 set RUNHOME=%~dp0\r
 echo ##RUNHOME %RUNHOME%\r
similarity index 92%
rename from integration/src/main/assembly/shutdown.sh
rename to distribution/src/main/assembly/shutdown.sh
index d1762c7..2e4f99a 100644 (file)
@@ -18,10 +18,10 @@ DIRNAME=`dirname $0`
 RUNHOME=`cd $DIRNAME/; pwd`
 echo @RUNHOME@ $RUNHOME
 
-echo "### shutdown blueprint";
+echo "### shutdown esr-gui";
 cd $RUNHOME
 cd ./tomcat
 export CATALINA_HOME=$RUNHOME/tomcat
 export CATALINA_BASE=$RUNHOME/tomcat
 $RUNHOME/tomcat/bin/shutdown.sh &
-echo "### shutdown blueprint end";
+echo "### shutdown esr-gui end";
similarity index 95%
rename from integration/src/main/assembly/startup.bat
rename to distribution/src/main/assembly/startup.bat
index 52bfe3c..11ffe1e 100644 (file)
@@ -15,7 +15,7 @@
 @REM\r
 \r
 @echo off\r
-title catalog\r
+title esr-gui\r
 \r
 set RUNHOME=%~dp0\r
 echo ##RUNHOME %RUNHOME%\r
similarity index 92%
rename from integration/src/main/assembly/startup.sh
rename to distribution/src/main/assembly/startup.sh
index d95c99b..6929ef1 100644 (file)
@@ -18,7 +18,7 @@
 DIRNAME=`dirname $0`
 RUNHOME=`cd $DIRNAME/; pwd`
 echo @RUNHOME@ $RUNHOME
-echo "### Starting blueprint";
+echo "### Starting esr-gui";
 cd ./tomcat
 if [ ! -d "$RUNHOME/tomcat/logs" ]; then
   mkdir $RUNHOME/tomcat/logs
@@ -26,4 +26,4 @@ fi
 export CATALINA_HOME=$RUNHOME/tomcat
 export CATALINA_BASE=$RUNHOME/tomcat
 $RUNHOME/tomcat/bin/startup.sh &
-echo "### Starting blueprint end";
+echo "### Starting esr-gui end";
index b4cef04..868311c 100644 (file)
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-    Copyright (C) 2017 CMCC, Inc. and others. All rights reserved.
+    Copyright 2017 ZTE Corporation.
 
     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at
 
-            http://www.apache.org/licenses/LICENSE-2.0
+        http://www.apache.org/licenses/LICENSE-2.0
 
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
@@ -22,8 +22,8 @@
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
-    <artifactId>aai-esr-gui-integration</artifactId>
-    <packaging>pom</packaging>
+    <artifactId>integration</artifactId>
+    <packaging>war</packaging>
     <name>esr-gui/integration</name>
 
     <properties>
         </dependency>
         <dependency>
             <groupId>org.onap.aai.esr-gui</groupId>
-            <artifactId>httpserver</artifactId>
-            <version>${project.version}</version>
-            <type>zip</type>
-        </dependency>
+            <artifactId>portal</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+            <type>war</type>
+        </dependency>   
     </dependencies>
 
     <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-resources-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>copy-resources-${linux64id}</id>
-                        <phase>process-resources</phase>
-                        <goals>
-                            <goal>copy-resources</goal>
-                        </goals>
-                        <configuration>
-                            <outputDirectory>${linux64outputdir}</outputDirectory>
-                            <resources>
-                                <resource>
-                                    <directory>src/main/assembly/</directory>
-                                    <filtering>false</filtering>
-                                    <includes>
-                                        <include>**/*</include>
-                                    </includes>
-                                    <excludes>
-                                        <exclude>**/*.bat</exclude>
-                                    </excludes>
-                                </resource>
-                            </resources>
-                            <overwrite>true</overwrite>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>copy-resources-${win64id}</id>
-                        <phase>process-resources</phase>
-                        <goals>
-                            <goal>copy-resources</goal>
-                        </goals>
-                        <configuration>
-                            <outputDirectory>${win64outputdir}</outputDirectory>
-                            <resources>
-                                <resource>
-                                    <directory>src/main/assembly/</directory>
-                                    <filtering>false</filtering>
-                                    <includes>
-                                        <include>**/*</include>
-                                    </includes>
-                                    <excludes>
-                                        <exclude>**/*.sh</exclude>
-                                    </excludes>
-                                </resource>
-                            </resources>
-                            <overwrite>true</overwrite>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <executions>                    
-                    <execution>
-                        <id>unpack-httpserver-${linux64id}</id>
-                        <goals>
-                            <goal>unpack</goal>
-                        </goals>
-                        <phase>prepare-package</phase>
-                        <configuration>
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>org.onap.aai.esr-gui</groupId>
-                                    <artifactId>httpserver</artifactId>
-                                    <type>zip</type>
-                                </artifactItem>
-                            </artifactItems>
-                            <excludes>**/*.bat,*.cmd</excludes>
-                            <outputDirectory>${linux64outputdir}</outputDirectory>
-                            <overWriteReleases>false</overWriteReleases>
-                            <overWriteSnapshots>true</overWriteSnapshots>
-                            <outputAbsoluteArtifactFilename>true</outputAbsoluteArtifactFilename>
-                        </configuration>
-                    </execution>                    
-                    <execution>
-                        <id>unpack-httpserver-${win64id}</id>
-                        <goals>
-                            <goal>unpack</goal>
-                        </goals>
-                        <phase>prepare-package</phase>
-                        <configuration>
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>org.onap.aai.esr-gui</groupId>
-                                    <artifactId>httpserver</artifactId>
-                                    <type>zip</type>
-                                </artifactItem>
-                            </artifactItems>
-                            <excludes>*.sh,*/*.sh,*/*/*.sh</excludes>
-                            <outputDirectory>${win64outputdir}</outputDirectory>
-                            <overWriteReleases>false</overWriteReleases>
-                            <overWriteSnapshots>true</overWriteSnapshots>
-                            <outputAbsoluteArtifactFilename>true</outputAbsoluteArtifactFilename>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
+               <finalName>esr-gui</finalName>
+        <plugins>              
+                       <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>distribution</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                        <configuration>
-                            <target name="distribution">
-                                <tar destfile="${version.output}/${packagename}-${project.version}-linux64.tar.gz" longfile="posix" compression="gzip">
-                                    <tarfileset dir="target/assembly/linux64" filemode="0644" dirmode="0755">
-                                        <exclude name="**/*.sh"/>
-                                    </tarfileset>
-                                    <tarfileset dir="target/assembly/linux64" filemode="0755" dirmode="0755">
-                                        <include name="**/*.sh"/>
-                                    </tarfileset>
-                                </tar>
-                                <attachartifact file="${version.output}/${packagename}-${project.version}-linux64.tar.gz" classifier="linux64" type="tar.gz"/>
-                                <zip destfile="${version.output}/${packagename}-${project.version}-win64.zip" update="true">
-                                    <zipfileset dir="target/assembly/win64" includes="**"/>
-                                </zip>
-                                <attachartifact file="${version.output}/${packagename}-${project.version}-win64.zip" classifier="win64" type="zip"/>
-                            </target>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
+                <artifactId>maven-war-plugin</artifactId>
+                <configuration>
+                    <packagingExcludes>WEB-INF/web.xml</packagingExcludes>
+                    <overlays>
+                        <overlay>
+                            <groupId>org.onap.aai.esr-gui</groupId>
+                            <artifactId>common</artifactId>
+                        </overlay>
+                        <overlay>
+                            <groupId>org.onap.aai.esr-gui</groupId>
+                            <artifactId>portal</artifactId>
+                        </overlay>
+                    </overlays>
+                </configuration>
+            </plugin>                  
         </plugins>
     </build>
 </project>
diff --git a/integration/src/main/assembly/monitor.sh b/integration/src/main/assembly/monitor.sh
deleted file mode 100644 (file)
index 9cac87a..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/bash
-DIRNAME=`dirname $0`
-RUNHOME=`cd $DIRNAME/; pwd`
-LOG_DIR=${RUNHOME}/tomcat/logs
-
-RETRY=$1
-CURL_RETRY_COUNT=1
-SLEEP_SECONDS_IN_MONITOR=2
-
-if [ x"$HTTP_OVERWRITE_PORT" == x"" ]; then
-       apds_port=80    
-else
-       apds_port=$HTTP_OVERWRITE_PORT
-fi
-
-#####################################
-echo @RUNHOME@ $RUNHOME
-echo @LOG_DIR@ $LOG_DIR
-echo @apds_port@ $apds_port
-#####################################
-       
-print_log() {   
-    LOG_DATE=`date "+%Y-%m-%d %H:%M:%S"`
-    LOG_FILENAME="$LOG_DIR/apds-monitor-`date "+%Y-%m-%d"`.log"    
-    ######[$$]:½ø³Ìid
-    ###### $n ´«µÝ¸ø½Å±¾»òº¯ÊýµÄ²ÎÊý, $1Ϊº¯ÊýÃû³Æ£¬Ä¬ÈÏΪFUNCNAME[0] $2ΪÈÕÖ¾Êä³öÄÚÈÝ 
-    ###### $? º¯ÊýµÄ·µ»ØÖµ
-    ###### FUNCNAME[@]: º¯Êýµ÷ÓÃÕ»£¬
-    ###### {} µÚÒ»¸ö¿Õ¸ñºóÔÚд½Å±¾
-    { echo -e  $LOG_DATE "[$$]===${FUNCNAME[@]}=== $2 "; } >> $LOG_FILENAME
-}
-
-apds_monitor() {
-    print_log ${FUNCNAME[0]} "Starting health check. ==$1==";
-       if [ "$1" == "with-retry" ]; then
-               CURL_RETRY_COUNT=5      
-       fi
-       
-       for i in `seq $CURL_RETRY_COUNT`
-       do
-               success=0
-               response=$(curl -m 2 -sL 127.0.0.1:$apds_port/blueprint/readme.txt -w %{http_code} -o /dev/null)
-               rc=$?
-               if [ $rc -eq 0 ];then
-                       print_log "${FUNCNAME[0]}" "Info: Curl to health check endpoint succeeded.";
-                       success=1
-                       break
-               else
-                       print_log "${FUNCNAME[0]}" "Warn: Curl to health check endpoint failed $i time(s).";
-                       if [ "$1" == "with-retry" ]; then
-                               sleep $SLEEP_SECONDS_IN_MONITOR
-                       fi                      
-               fi
-       done
-       
-       if [ $success -eq 0 ];then
-        print_log "${FUNCNAME[0]}" "Failed: health check Endpoint is unreachable.";
-               return 1
-    fi
-    
-    if [ $response -eq 200 ]; then
-        print_log "${FUNCNAME[0]}" "health check succeed.";            
-        return 0
-    fi
-       
-    print_log "${FUNCNAME[0]}" "Failed:health check return non 200 but is : $response ";             
-    return 1
-}  
-
-if [ ! -d "$LOG_DIR" ]; then
-       echo there is no $LOG_DIR but will be created, You can ignore this message!
-       mkdir -p "$LOG_DIR"
-fi
-
-apds_monitor $RETRY
diff --git a/integration/src/main/assembly/startup4docker.sh b/integration/src/main/assembly/startup4docker.sh
deleted file mode 100644 (file)
index f2adb11..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright 2017 ZTE Corporation.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-#!/bin/sh
-DIRNAME=`dirname $0`
-RUNHOME=`cd $DIRNAME/; pwd`
-echo @RUNHOME@ $RUNHOME
-echo "### Starting blueprint";
-#cd ./tomcat
-cd $RUNHOME/tomcat
-if [ ! -d "$RUNHOME/tomcat/logs" ]; then
-  mkdir $RUNHOME/tomcat/logs
-fi
-export CATALINA_HOME=$RUNHOME/tomcat
-export CATALINA_BASE=$RUNHOME/tomcat
-$RUNHOME/tomcat/bin/catalina.sh run
-echo "### Starting blueprint end";
diff --git a/pom.xml b/pom.xml
index 4f6b593..275d273 100644 (file)
--- a/pom.xml
+++ b/pom.xml
     <modules>
         <module>common</module>
                <module>portal</module>
-               <module>httpserver</module>
-               <module>integration</module>            
+               <module>integration</module>    
+               <module>distribution</module>           
     </modules>
+       
+       <properties>
+        <tomcat.version>8.5.6</tomcat.version>
+    </properties>
+       
+       <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.tomcat</groupId>
+                <artifactId>tomcat</artifactId>
+                <version>${tomcat.version}</version>
+                <type>zip</type>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+       
+       <build>
+               <pluginManagement>
+                       <plugins>
+                               <plugin>
+                                       <groupId>org.apache.maven.plugins</groupId>
+                                       <artifactId>maven-dependency-plugin</artifactId>
+                                       <version>2.10</version>
+                               </plugin>
+                               <plugin>
+                                       <artifactId>maven-antrun-plugin</artifactId>
+                                       <version>1.8</version>
+                               </plugin>
+                       </plugins>
+               </pluginManagement>
+       </build>
 </project>
index aa63a25..7007203 100644 (file)
@@ -23,7 +23,7 @@
         <version>1.0.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
-    <artifactId>aai-esr-gui-portal</artifactId>
+    <artifactId>portal</artifactId>
        <version>1.0.0-SNAPSHOT</version>
     <packaging>war</packaging>
     <name>esr-gui/portal</name>