Creating pom to autobuild bundle. Refs #3280
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/distributions/smartgears-distribution-bundle@113550 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
24d477de22
commit
ecff7c8050
28
pom.xml
28
pom.xml
|
@ -16,6 +16,8 @@
|
|||
|
||||
<properties>
|
||||
<distroDirectory>distro</distroDirectory>
|
||||
<resourcesDirectory>src/resources</resourcesDirectory>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<scm>
|
||||
|
@ -44,6 +46,12 @@
|
|||
<type>tar.gz</type>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat</groupId>
|
||||
<artifactId>tomcat</artifactId>
|
||||
<version>7.0.42</version>
|
||||
<type>tar.gz</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -54,16 +62,32 @@
|
|||
<version>2.5.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-smartgears-distribution</id>
|
||||
<id>create-bundle</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>unpack-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${basedir}/bundle</outputDirectory>
|
||||
<outputDirectory>${basedir}/SmartGear</outputDirectory>
|
||||
<excludeTypes>war</excludeTypes>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-setup</id>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<phase>process-resources</phase>
|
||||
<configuration>
|
||||
<outputDirectory>${basedir}/SmartGear</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${resourcesDirectory}</directory>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
#!/bin/bash
|
||||
TOMCAT_DST_FOLDER="tomcat"
|
||||
TOMCAT_VERSION="7.0.42"
|
||||
TOMCAT_PID_FILENAME="pid.txt"
|
||||
SMARTGEAR_DISTRIBUTION_DIRECTORY="smartgears-distribution-1.2.0-SNAPSHOT"
|
||||
SMARTGEAR_ROOT=${PWD}
|
||||
|
||||
GHN_HOME=${SMARTGEAR_ROOT}/${SMARTGEAR_DISTRIBUTION_DIRECTORY}
|
||||
CONTAINER_FILENAME="container.xml"
|
||||
CONTAINER_XML=${GHN_HOME}/${CONTAINER_FILENAME}
|
||||
|
||||
ENV_VARIABLES="export CATALINA_OPTS=\"-Xmx2000m -Xms2000m\"
|
||||
export GHN_HOME=${GHN_HOME}
|
||||
export CATALINA_PID=${SMARTGEAR_ROOT}/${TOMCAT_PID_FILENAME}
|
||||
export CATALINA_HOME=${SMARTGEAR_ROOT}/${TOMCAT_DST_FOLDER}"
|
||||
|
||||
echo "Creating tomcat symlink..."
|
||||
ln -s apache-tomcat-${TOMCAT_VERSION} ${TOMCAT_DST_FOLDER}
|
||||
ls -l ${TOMCAT_DST_FOLDER}
|
||||
|
||||
echo ""
|
||||
echo "Adding the following variables to environment..."
|
||||
echo "${ENV_VARIABLES}"
|
||||
echo "${ENV_VARIABLES}" >> pippo.txt
|
||||
#echo ${ENV_VARIABLES} >> ~/.bashrc
|
||||
#source ~/.bashrc
|
||||
|
||||
echo ""
|
||||
echo "Entering on SmartGear Distribution Directory " ${SMARTGEAR_DISTRIBUTION_DIRECTORY}
|
||||
cd ${SMARTGEAR_DISTRIBUTION_DIRECTORY}
|
||||
|
||||
echo ""
|
||||
echo "Launching SmartGear install for Tomcat...."
|
||||
#./install -s tomcat
|
||||
|
||||
echo ""
|
||||
echo "Just few steps to do to reach the goal:"
|
||||
echo "- Modify ${CONTAINER_XML} with your hostname"
|
||||
echo "- Modify ${CONTAINER_XML} startup infrastructure and vres"
|
||||
|
||||
CATALINA_STARTUP_SCRIPT="${TOMCAT_DST_FOLDER}/bin/startup.sh"
|
||||
echo "- Launch tomcat from ${SMATGEAR_ROOT} using the command ${CATALINA_STARTUP_SCRIPT}"
|
||||
|
||||
echo ""
|
||||
echo "By default tomcat start on 8080 port.
|
||||
If you want to change this port remeber to modify ${CONTAINER_XML} consistently"
|
||||
|
||||
|
Loading…
Reference in New Issue