Skip to content

Commit

Permalink
Add ant script to generate a release zip
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesbraun committed Jun 16, 2020
1 parent 39d37b6 commit 668fd24
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ util/excel/~$*.*

test.xml
/result.properties
jar/build/
jar/out/
jar/
log/
*.TMP
*.java-*
Expand Down
50 changes: 50 additions & 0 deletions magmaFatProxy.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="magmaFatProxy">
<property name="buildDir" value="jar/build" />

<target name="clean">
<delete dir="${buildDir}" />
</target>

<target name="compile">
<mkdir dir="${buildDir}" />
<javac destdir="${buildDir}" includeantruntime="false" source="1.8" target="1.8">
<src path="base/src" />
<src path="srcCommon" />
<src path="srcAgent" />
<classpath>
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
<fileset dir="base/lib">
<include name="**/*.jar" />
</fileset>
</classpath>
</javac>
</target>

<target name="jar" depends="compile">
<jar destfile="jar/magmaFatProxy.jar" basedir="${buildDir}">
<manifest>
<attribute name="Main-Class" value="magma.fatproxy.MagmaFatProxy" />
</manifest>
<zipgroupfileset dir="lib/runtime" includes="magmaProxy.jar" />
<zipgroupfileset dir="lib/runtime" includes="magmaMonitor.jar" />
<zipgroupfileset dir="lib/runtime" includes="kdolib.jar" />
<zipgroupfileset dir="base/lib/runtime" includes="commons-math3-3.3.jar" />
<zipgroupfileset dir="base/lib/runtime" includes="gson-2.7.jar" />
<zipfileset dir="config" includes="behaviors/**" />
<zipfileset dir="config" includes="properties/**" />
</jar>
</target>

<target name="deploy" depends="jar">
<mkdir dir="jar/out/magmaFatProxy" />
<copy file="jar/magmaFatProxy.jar" todir="jar/out/magmaFatProxy" />
<copy file="scripts/start.sh" todir="jar/out/magmaFatProxy" />

<zip destfile="jar/magmaFatProxy.zip" basedir="jar/out" />

<delete dir="jar/out" />
</target>
</project>
30 changes: 30 additions & 0 deletions scripts/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#*******************************************************************************
# Copyright 2008 - 2020 Hochschule Offenburg
#
# This file is part of magmaOffenburg.
# magmaOffenburg is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# magmaOffenburg is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with magmaOffenburg. If not, see <http://www.gnu.org/licenses/>.
#*******************************************************************************
#!/bin/bash
###########################################
# Starts a magmaFatProxy
# example: bash start.sh 127.0.0.1 3100 3110
###########################################

if [ $# -ne 3 ]; then
echo "Usage: $0 <Simspark server IP> <Simspark server Port> <Proxy server port>"
exit 1
fi

cd "$(dirname "$0")"
java -jar magmaFatProxy.jar --server=$1 --serverport=$2 --proxyport=$3

0 comments on commit 668fd24

Please sign in to comment.