diff options
author | pikusa <pikusa@man.poznan.pl> | 2013-04-03 13:18:17 (GMT) |
---|---|---|
committer | pikusa <pikusa@man.poznan.pl> | 2013-04-03 13:18:17 (GMT) |
commit | 2f2a3a129c91de540e66c3bfbe30b0df1942cd4b (patch) | |
tree | 2d313cdf0068af368d4de6067d676be16f6a6464 /Monitoring/MonitoringTool/PacketTracking/scripts/m2classpath.sh | |
parent | ff8aa232b071a9b54dff833714a870fd0aec0b30 (diff) | |
download | novi-public-2f2a3a129c91de540e66c3bfbe30b0df1942cd4b.zip novi-public-2f2a3a129c91de540e66c3bfbe30b0df1942cd4b.tar.gz novi-public-2f2a3a129c91de540e66c3bfbe30b0df1942cd4b.tar.bz2 |
project commit and dir tree change
Diffstat (limited to 'Monitoring/MonitoringTool/PacketTracking/scripts/m2classpath.sh')
-rw-r--r-- | Monitoring/MonitoringTool/PacketTracking/scripts/m2classpath.sh | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/Monitoring/MonitoringTool/PacketTracking/scripts/m2classpath.sh b/Monitoring/MonitoringTool/PacketTracking/scripts/m2classpath.sh new file mode 100644 index 0000000..b39c22e --- /dev/null +++ b/Monitoring/MonitoringTool/PacketTracking/scripts/m2classpath.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# Bootstrap CAN project +# +# ==[ START CONFIG ]== +JAVA=java + +# ==[ END CONFIG ]== +CMD=$1 +M2CLASSPATH=$2 +CLASSPATH_FILE=.m2classpath +usage () { + cat <<EOT +=======[ Maven Classpath extractor]======= + +Extracts maven class path for launching scripts. + +USAGE: this script should be called from within maven using + the exec-maven-plugin via "mvn compile exec:exec" + <reporting> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>1.1</version> + <configuration> + <executable>../scripts/m2classpath.sh</executable> + <arguments> + <argument>create_classpath_file</argument> + <classpath /> + </arguments> + </configuration> + </plugin> + </plugins> + </reporting> + +EOT +} +# ==[ create classh path file via maven ]== +create_classpath_file () { + if [ "$M2CLASSPATH" != "" ]; then + echo "#=> Creating $CLASSPATH_FILE" + # FIXME worldmap target class path + echo ./target/classes:../../worldmap/target/classes:$M2CLASSPATH > $CLASSPATH_FILE + else + echo "ERROR: this script must be called via 'mvn compile exec:exec'" + fi +} +# ==[ main switch ]== +case $CMD in + create_classpath_file) + create_classpath_file + ;; + *) + usage + ;; +esac + |