Creating pom to autobuild bundle. Refs #3280

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/distributions/smartgears-distribution-bundle@113551 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2015-03-10 17:30:53 +00:00
parent ecff7c8050
commit 7c43292740
2 changed files with 42 additions and 6 deletions

15
pom.xml
View File

@ -16,6 +16,8 @@
<properties>
<distroDirectory>distro</distroDirectory>
<tomcat.version>7.0.42</tomcat.version>
<smartgear.version>1.2.0-SNAPSHOT</smartgear.version>
<resourcesDirectory>src/resources</resourcesDirectory>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
@ -42,14 +44,14 @@
<dependency>
<groupId>org.gcube.distribution</groupId>
<artifactId>smartgears-distribution</artifactId>
<version>LATEST</version>
<version>${smartgear.version}</version>
<type>tar.gz</type>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat</artifactId>
<version>7.0.42</version>
<version>${tomcat.version}</version>
<type>tar.gz</type>
</dependency>
</dependencies>
@ -72,8 +74,15 @@
<excludeTypes>war</excludeTypes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-setup</id>
<id>copy-resources</id>
<goals>
<goal>copy-resources</goal>
</goals>

View File

@ -1,8 +1,8 @@
#!/bin/bash
TOMCAT_DST_FOLDER="tomcat"
TOMCAT_VERSION="7.0.42"
TOMCAT_VERSION="${tomcat.version}"
TOMCAT_PID_FILENAME="pid.txt"
SMARTGEAR_DISTRIBUTION_DIRECTORY="smartgears-distribution-1.2.0-SNAPSHOT"
SMARTGEAR_DISTRIBUTION_DIRECTORY="smartgears-distribution-${smartgear.version}"
SMARTGEAR_ROOT=${PWD}
GHN_HOME=${SMARTGEAR_ROOT}/${SMARTGEAR_DISTRIBUTION_DIRECTORY}
@ -14,6 +14,33 @@ export GHN_HOME=${GHN_HOME}
export CATALINA_PID=${SMARTGEAR_ROOT}/${TOMCAT_PID_FILENAME}
export CATALINA_HOME=${SMARTGEAR_ROOT}/${TOMCAT_DST_FOLDER}"
function showhelp {
echo -e "\nUsage: setup.sh [-d <distro directory>] [-f |-h] \n"
echo " <distro directory> = the directory where installing SmartGear"
echo " By default, this is the directory of this script."
echo " f = Really run the setup. By default it will be a dry-run"
echo -e " h = shows this help.\n"
}
while getopts ":d:fh" opt; do
case $opt in
d) distro=$OPTARG;;
f) force="true";;
h) showhelp
exit 0 ;;
:) echo -e "\nERROR:option -$OPTARG requires an argument." >&2 ;
showhelp;
echo -e "\naborting.\n"
exit 1;;
\?) echo -e "\nERROR:invalid option: -$OPTARG";
showhelp;
echo -e "\naborting.\n"
exit 1 >&2 ;;
esac
done
echo "Creating tomcat symlink..."
ln -s apache-tomcat-${TOMCAT_VERSION} ${TOMCAT_DST_FOLDER}
ls -l ${TOMCAT_DST_FOLDER}
@ -43,6 +70,6 @@ echo "- Launch tomcat from ${SMATGEAR_ROOT} using the command ${CATALINA_STARTUP
echo ""
echo "By default tomcat start on 8080 port.
If you want to change this port remeber to modify ${CONTAINER_XML} consistently"
If you want to change this port REMEMBER to modify ${CONTAINER_XML} consistently"