Compare commits
5 Commits
master
...
feature/22
Author | SHA1 | Date |
---|---|---|
Luca Frosini | 0f4e699eca | |
Luca Frosini | 567afc73a6 | |
Luca Frosini | fc6ebbff55 | |
Luca Frosini | 41e2e38b5a | |
Luca Frosini | 9ff71aa9e8 |
|
@ -2,4 +2,3 @@ target
|
|||
.classpath
|
||||
.project
|
||||
.settings
|
||||
/.DS_Store
|
||||
|
|
|
@ -2,11 +2,12 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
|
||||
# Changelog for Smartgears Distribution Bundle
|
||||
|
||||
### [v3.5.0]
|
||||
## [v4.0.0-SNAPSHOT]
|
||||
|
||||
- Creating distribution bundle for smartgears-distribution 3.5.0-SNAPSHOT
|
||||
- Upgraded Smartgears to 4.X.X version
|
||||
|
||||
## [v3.0.0] [r4.26.0] - 2020-10-29
|
||||
|
||||
## [v3.0.0] [r5.0.0] -
|
||||
|
||||
- Switched JSON management to gcube-jackson [#19283]
|
||||
- Fixed distro files and pom according to new release procedure
|
||||
|
|
7
pom.xml
7
pom.xml
|
@ -10,7 +10,7 @@
|
|||
|
||||
<groupId>org.gcube.distribution</groupId>
|
||||
<artifactId>smartgears-distribution-bundle</artifactId>
|
||||
<version>3.5.0</version>
|
||||
<version>4.0.0-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>A distribution bundle for the SmartGears Framework</name>
|
||||
<description>A distribution bundle for the SmartGears Framework containing Tomcat and ReadMe files to install quickly Smartgears</description>
|
||||
|
@ -31,11 +31,10 @@
|
|||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.gcube.distribution</groupId>
|
||||
<artifactId>smartgears-distribution</artifactId>
|
||||
<version>[3.5.0, 4.0.0-SNAPSHOT)</version>
|
||||
<version>[4.0.0-SNAPSHOT, 5.0.0-SNAPSHOT)</version>
|
||||
<type>tar.gz</type>
|
||||
</dependency>
|
||||
|
||||
|
@ -120,7 +119,7 @@
|
|||
</executions>
|
||||
<configuration>
|
||||
<includes>
|
||||
<include>${basedir}/${targetDirectory}/${smartgearsDirectory}/smartgears-distribution-*/container.xml</include>
|
||||
<include>${basedir}/${targetDirectory}/${smartgearsDirectory}/smartgears-distribution-*/container.ini</include>
|
||||
</includes>
|
||||
<replacements>
|
||||
<replacement>
|
||||
|
|
|
@ -10,8 +10,8 @@ STARTUP_SCRIPT="startContainer.sh"
|
|||
STOP_SCRIPT="stopContainer.sh"
|
||||
|
||||
GHN_HOME=${SMARTGEAR_ROOT}/SmartGears
|
||||
CONTAINER_FILENAME="container.xml"
|
||||
CONTAINER_XML=${GHN_HOME}/${CONTAINER_FILENAME}
|
||||
CONTAINER_FILENAME="container.ini"
|
||||
CONTAINER_INI=${GHN_HOME}/${CONTAINER_FILENAME}
|
||||
|
||||
CATALINA_OPTS_BASHRC="export CATALINA_OPTS=\"-Xmx2000m -Xms2000m\""
|
||||
GHN_HOME_BASHRC="export GHN_HOME=${GHN_HOME}"
|
||||
|
@ -37,19 +37,18 @@ function hostname {
|
|||
|
||||
while [ "$HOST_OK" = false ]
|
||||
do
|
||||
|
||||
echo "Is ${HOST} correct?"
|
||||
select yn in "Yes" "No";
|
||||
do
|
||||
case $yn in
|
||||
Yes )
|
||||
ok=true
|
||||
HOST_OK=true;
|
||||
break;;
|
||||
No )
|
||||
ok=false
|
||||
break;;
|
||||
esac
|
||||
case $yn in
|
||||
Yes )
|
||||
ok=true
|
||||
HOST_OK=true;
|
||||
break;;
|
||||
No )
|
||||
ok=false
|
||||
break;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$ok" = false ]; then
|
||||
|
@ -60,29 +59,29 @@ function hostname {
|
|||
}
|
||||
|
||||
function escape_slashes {
|
||||
sed 's/\//\\\//g'
|
||||
sed 's/\//\\\//g'
|
||||
}
|
||||
|
||||
function change_line {
|
||||
local OLD_LINE_PATTERN=$1; shift
|
||||
local NEW_LINE=$1; shift
|
||||
local FILE=$1
|
||||
local OLD_LINE_PATTERN=$1; shift
|
||||
local NEW_LINE=$1; shift
|
||||
local FILE=$1
|
||||
|
||||
local NEW=$(echo "${NEW_LINE}" | escape_slashes)
|
||||
sed -i '/'"${OLD_LINE_PATTERN}"'/s/.*/'"${NEW}"'/' "${FILE}"
|
||||
local NEW=$(echo "${NEW_LINE}" | escape_slashes)
|
||||
sed -i '/'"${OLD_LINE_PATTERN}"'/s/.*/'"${NEW}"'/' "${FILE}"
|
||||
}
|
||||
|
||||
while getopts ":n:fh" opt; do
|
||||
case $opt in
|
||||
n) HOST=$OPTARG;;
|
||||
f) force=true;;
|
||||
h) showhelp
|
||||
h) showhelp
|
||||
exit 0 ;;
|
||||
\?) echo -e "\nERROR:invalid option: -$OPTARG";
|
||||
showhelp;
|
||||
echo -e "\naborting.\n"
|
||||
exit 1 >&2 ;;
|
||||
esac
|
||||
esac
|
||||
done
|
||||
|
||||
if [ $force ]; then
|
||||
|
@ -129,7 +128,7 @@ if [ $force ]; then
|
|||
./install -s tomcat -g ${GHN_HOME}
|
||||
|
||||
hostname
|
||||
change_line "<hostname>" "\t<hostname>$HOST</hostname>" ${CONTAINER_XML}
|
||||
change_line "hostname = localhost" "hostname = $HOST" ${CONTAINER_INI}
|
||||
|
||||
echo -e "\n\n\n"
|
||||
echo "Just few steps to do to reach the goal:"
|
||||
|
@ -180,14 +179,14 @@ else
|
|||
|
||||
echo "Then:"
|
||||
|
||||
echo "- Modify ${CONTAINER_XML} with your hostname"
|
||||
echo "- Modify ${CONTAINER_INI} with your hostname"
|
||||
fi
|
||||
|
||||
echo "- Modify ${CONTAINER_XML} startup infrastructure and vres"
|
||||
echo "- Modify ${CONTAINER_INI} authorization section"
|
||||
|
||||
echo "- You can Start the container from ${BUNDLE_HOME} directory using the command ./${STARTUP_SCRIPT}"
|
||||
echo "- You can Stop the container from ${BUNDLE_HOME} directory using the command ./${STOP_SCRIPT}"
|
||||
|
||||
echo ""
|
||||
echo "PLEASE NOTE:"
|
||||
echo "By default Tomcat start on 8080 port. If you want to change this port REMEMBER to modify ${CONTAINER_XML} consistently"
|
||||
echo "By default Tomcat start on 8080 port. If you want to change this port REMEMBER to modify ${CONTAINER_INI} consistently"
|
Loading…
Reference in New Issue