Skip to content

Commit

Permalink
geosolutions-it#1137 binary package build under release profile
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandinand committed Feb 2, 2017
1 parent d70b92b commit b59d422
Show file tree
Hide file tree
Showing 30 changed files with 7,148 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ coverage/
web/client/libs/Cesium/
web/cesium.zip
web/.classpath
web/.project
web/.project
.idea
*.iml
12 changes: 11 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
</dependencies>

<build>

</build>

<profiles>
Expand All @@ -34,6 +33,17 @@
</modules>

</profile>
<profile>
<id>release</id>
<activation>
<property>
<name>release</name>
</property>
</activation>
<modules>
<module>release</module>
</modules>
</profile>
</profiles>


Expand Down
64 changes: 64 additions & 0 deletions release/bin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<assembly>
<id>bin</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<!-- the main webapp -->
<directory>../web/target</directory>
<outputDirectory>mapstore2/webapps</outputDirectory>
<includes>
<include>mapstore.war</include>
</includes>
</fileSet>
<fileSet>
<!-- the libs needed to run tomcat -->
<directory>target/dependency</directory>
<outputDirectory>mapstore2/lib</outputDirectory>
<includes>
<include>tomcat-*.jar</include>
<include>ecj-*.jar</include>
</includes>
</fileSet>
<fileSet>
<!-- windows batch files -->
<directory>bin</directory>
<lineEnding>keep</lineEnding>
<outputDirectory>mapstore2/</outputDirectory>
<includes>
<include>mapstore2-*.bat</include>
</includes>
</fileSet>
<fileSet>
<!-- unix shell scripts -->
<directory>bin</directory>
<lineEnding>unix</lineEnding>
<outputDirectory>mapstore2/</outputDirectory>
<fileMode>0755</fileMode>
<directoryMode>0755</directoryMode>
<includes>
<include>mapstore2-*.sh</include>
</includes>
</fileSet>
<fileSet>
<!-- tomcat configuration -->
<directory>tomcat</directory>
<outputDirectory>mapstore2</outputDirectory>
<includes>
<include>**/*</include>
</includes>
</fileSet>
<fileSet>
<!-- empty log directory -->
<directory>logs</directory>
<outputDirectory>mapstore2</outputDirectory>
</fileSet>
<fileSet>
<!-- empty work directory -->
<directory>work</directory>
<outputDirectory>mapstore2</outputDirectory>
</fileSet>
</fileSets>
</assembly>
78 changes: 78 additions & 0 deletions release/bin/mapstore2-shutdown.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
@echo off
REM -----------------------------------------------------------------------------
REM Shutdown Script for MapStore
REM -----------------------------------------------------------------------------


cls
echo Shutting down MapStore2...
echo.
set error=0

set "CURRENT_DIR=%cd%"
set "CATALINA_HOME=%CURRENT_DIR%"

set "EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat"
set CMD_LINE_ARGS=
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1

rem JAVA_HOME not defined
if "%JAVA_HOME%" == "" goto noJava

rem JAVA_HOME defined incorrectly
if not exist "%JAVA_HOME%\bin\java.exe" goto badJava

rem No errors
goto shutdown

:noJava
echo The JAVA_HOME environment variable is not defined.
goto JavaFail

:badJava
echo The JAVA_HOME environment variable is not defined correctly.
goto JavaFail

:JavaFail
echo Java 7 is needed to run MapStore2.
echo.
echo Install it from:
echo http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html
echo.
set error=1
goto end

:shutdown
echo Shutting down MapStore2...
call "%EXECUTABLE%" stop %CMD_LINE_ARGS%
echo Thank you for using MapStore2!
goto end

:end
if %error% == 1 echo Shutting down MapStore2 was unsuccessful.
echo.
pause
























26 changes: 26 additions & 0 deletions release/bin/mapstore2-shutdown.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh
# -----------------------------------------------------------------------------
# Start Script for MapStore2
#
# $Id$
# -----------------------------------------------------------------------------

# Make sure catalina scripts are executable
chmod +x bin/*.sh

PRGDIR=`pwd`
EXECUTABLE=shutdown.sh
CATALINA_HOME="$PRGDIR"

if [ ! -x "$CATALINA_HOME"/bin/"$EXECUTABLE" ]; then
echo "Cannot find $PRGDIR/$EXECUTABLE"
echo "The file is absent or does not have execute permission"
echo "This file is needed to run this program"
exit 1
fi

sh "$CATALINA_HOME"/bin/"$EXECUTABLE" stop "$@"

echo "Waiting for services to stop..."
sleep 4
echo "Thank you for using MapStore2!"
59 changes: 59 additions & 0 deletions release/bin/mapstore2-startup.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
@echo off
rem -----------------------------------------------------------------------------
rem Startup Script for MapStore2
rem -----------------------------------------------------------------------------

cls
echo Welcome to MapStore2!
echo.
set error=0

set "CURRENT_DIR=%cd%"
set "CATALINA_HOME=%CURRENT_DIR%"

set "EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat"
set CMD_LINE_ARGS=
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1

rem JAVA_HOME not defined
if "%JAVA_HOME%" == "" goto noJava

rem JAVA_HOME defined incorrectly
if not exist "%JAVA_HOME%\bin\java.exe" goto badJava

echo JAVA_HOME: %JAVA_HOME%
echo.

goto run

:noJava
echo The JAVA_HOME environment variable is not defined.
goto JavaFail

:badJava
echo The JAVA_HOME environment variable is not defined correctly.
goto JavaFail

:JavaFail
echo Java 7 is needed to run MapStore2.
echo.
echo Install it from:
echo http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html
echo.
set error=1
goto end


:run
if "%JAVA_OPTS%" == "" (set JAVA_OPTS="-XX:MaxPermSize=128m")
echo Please wait while loading MapStore2...
echo.
call "%EXECUTABLE%" start %CMD_LINE_ARGS%
echo Enjoy MapStore2!
goto end


:end
if %error% == 1 echo Startup of MapStore2 was unsuccessful.
echo.
pause
34 changes: 34 additions & 0 deletions release/bin/mapstore2-startup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/sh
# -----------------------------------------------------------------------------
# Start Script for MapStore2
#
# $Id$
# -----------------------------------------------------------------------------

# Make sure catalina scripts are executable
chmod +x bin/*.sh

echo "Welcome to MapStore2 demo package!"

# if not told otherwise pump up the permgen
if [ -z "$JAVA_OPTS" ]; then
export JAVA_OPTS="-XX:MaxPermSize=128m"
fi

PRGDIR=`pwd`
EXECUTABLE=startup.sh
CATALINA_HOME="$PRGDIR"

if [ ! -x "$CATALINA_HOME"/bin/"$EXECUTABLE" ]; then
echo "Cannot find $PRGDIR/$EXECUTABLE"
echo "The file is absent or does not have execute permission"
echo "This file is needed to run this program"
exit 1
fi

sh "$CATALINA_HOME"/bin/"$EXECUTABLE" start "$@"
echo "Waiting for Tomcat start and MapStore2 deploy..."
sleep 4
echo "Point you browser to: http://localhost:8800/mapstore"
sleep 1
echo "Enjoy MapStore2!"
Loading

0 comments on commit b59d422

Please sign in to comment.