diff --git a/.gitignore b/.gitignore index d72ae824..73978d53 100644 --- a/.gitignore +++ b/.gitignore @@ -9,8 +9,4 @@ ais-lib-communication/aisbus.xml .idea *.iml .DS_Store -.gradle/ -ais-lib-cli/build/ -ais-lib-communication/build/ -ais-lib-messages/build/ -ais-lib-utils/build/ + diff --git a/LICENSE.txt b/LICENSE.txt index 5ce638e7..7e94d924 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,10 +1,3 @@ -Copyright (c) 2016 MarkLogic - -For a list of derivations from original work from the Danish Maritime Authority - -https://github.com/sastafford/AisLib/commits/master - -Original work: Danish Maritime Authority Copyright (c) 2011 Danish Maritime Authority. Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/ais-lib-cli/gradle.properties b/ais-lib-cli/gradle.properties deleted file mode 100644 index 05cd9291..00000000 --- a/ais-lib-cli/gradle.properties +++ /dev/null @@ -1 +0,0 @@ -artifactId=ais-lib-cli \ No newline at end of file diff --git a/ais-lib-cli/gradle/wrapper/gradle-wrapper.jar b/ais-lib-cli/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index ca78035e..00000000 Binary files a/ais-lib-cli/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/ais-lib-cli/gradle/wrapper/gradle-wrapper.properties b/ais-lib-cli/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 66007fa2..00000000 --- a/ais-lib-cli/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Wed Aug 24 11:49:17 EDT 2016 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip diff --git a/ais-lib-cli/gradlew b/ais-lib-cli/gradlew deleted file mode 100644 index 27309d92..00000000 --- a/ais-lib-cli/gradlew +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/ais-lib-cli/gradlew.bat b/ais-lib-cli/gradlew.bat deleted file mode 100644 index 832fdb60..00000000 --- a/ais-lib-cli/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/ais-lib-communication/gradle.properties b/ais-lib-communication/gradle.properties deleted file mode 100644 index 21c0c5e2..00000000 --- a/ais-lib-communication/gradle.properties +++ /dev/null @@ -1 +0,0 @@ -artifactId=ais-lib-communication \ No newline at end of file diff --git a/ais-lib-communication/gradle/wrapper/gradle-wrapper.jar b/ais-lib-communication/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index ca78035e..00000000 Binary files a/ais-lib-communication/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/ais-lib-communication/gradle/wrapper/gradle-wrapper.properties b/ais-lib-communication/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 06a4f2fc..00000000 --- a/ais-lib-communication/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Wed Aug 24 11:49:18 EDT 2016 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip diff --git a/ais-lib-communication/gradlew b/ais-lib-communication/gradlew deleted file mode 100644 index 27309d92..00000000 --- a/ais-lib-communication/gradlew +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/ais-lib-communication/gradlew.bat b/ais-lib-communication/gradlew.bat deleted file mode 100644 index 832fdb60..00000000 --- a/ais-lib-communication/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/ais-lib-communication/src/test/java/dk/dma/ais/tracker/eventEmittingTracker/EventEmittingTrackerImplTest.java b/ais-lib-communication/src/test/java/dk/dma/ais/tracker/eventEmittingTracker/EventEmittingTrackerImplTest.java index da6852f1..42a22b44 100644 --- a/ais-lib-communication/src/test/java/dk/dma/ais/tracker/eventEmittingTracker/EventEmittingTrackerImplTest.java +++ b/ais-lib-communication/src/test/java/dk/dma/ais/tracker/eventEmittingTracker/EventEmittingTrackerImplTest.java @@ -36,7 +36,7 @@ import dk.dma.enav.model.geometry.PositionTime; import dk.dma.enav.model.geometry.grid.Cell; import dk.dma.enav.model.geometry.grid.Grid; -import net.maritimecloud.util.units.SpeedUnit; +import net.maritimecloud.util.SpeedUnit; import net.maritimecloud.util.geometry.PositionReader; import net.maritimecloud.util.geometry.PositionReaderSimulator; import org.junit.Test; diff --git a/ais-lib-messages/gradle.properties b/ais-lib-messages/gradle.properties deleted file mode 100644 index 838cd155..00000000 --- a/ais-lib-messages/gradle.properties +++ /dev/null @@ -1 +0,0 @@ -artifactId=ais-lib-messages \ No newline at end of file diff --git a/ais-lib-messages/gradle/wrapper/gradle-wrapper.jar b/ais-lib-messages/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index ca78035e..00000000 Binary files a/ais-lib-messages/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/ais-lib-messages/gradle/wrapper/gradle-wrapper.properties b/ais-lib-messages/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 06a4f2fc..00000000 --- a/ais-lib-messages/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Wed Aug 24 11:49:18 EDT 2016 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip diff --git a/ais-lib-messages/gradlew b/ais-lib-messages/gradlew deleted file mode 100644 index 27309d92..00000000 --- a/ais-lib-messages/gradlew +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/ais-lib-messages/gradlew.bat b/ais-lib-messages/gradlew.bat deleted file mode 100644 index 832fdb60..00000000 --- a/ais-lib-messages/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage.java b/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage.java index e8fa54e8..6c5d8aa2 100644 --- a/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage.java +++ b/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage.java @@ -22,8 +22,6 @@ import dk.dma.ais.sentence.Vdm; import dk.dma.enav.model.geometry.Position; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlTransient; import java.io.Serializable; import java.util.Arrays; import java.util.Collections; @@ -35,7 +33,6 @@ /** * Abstract base class for all AIS messages */ -@XmlRootElement public abstract class AisMessage implements Serializable { /** serialVersionUID. */ @@ -49,16 +46,12 @@ public abstract class AisMessage implements Serializable { protected int repeat; // 2 bit: How many times message has been repeated protected int userId; // 30 bit: MMSI number protected transient Vdm vdm; // The VDM encapsulating the AIS message - - public AisMessage() { - } - + /** * Constructor given message id * * @param msgId */ - public AisMessage(int msgId) { this.msgId = msgId; this.repeat = 0; @@ -131,7 +124,6 @@ public void setUserId(int userId) { * * @return */ - @XmlTransient public IProprietarySourceTag getSourceTag() { LinkedList tags = vdm == null ? null : vdm.getTags(); if (tags == null) { @@ -152,7 +144,6 @@ public IProprietarySourceTag getSourceTag() { * * @return */ - @XmlTransient public LinkedList getTags() { return vdm.getTags(); } @@ -160,7 +151,7 @@ public LinkedList getTags() { /** * Add tag (to front) * - * @param tag + * @param sourceTag */ public void setTag(IProprietaryTag tag) { LinkedList tags = vdm.getTags(); @@ -169,7 +160,7 @@ public void setTag(IProprietaryTag tag) { } tags.addFirst(tag); } - + public void setTags(LinkedList tags) { vdm.setTags(tags); } diff --git a/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage1.java b/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage1.java index ce324d09..e11a9dca 100644 --- a/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage1.java +++ b/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage1.java @@ -19,8 +19,6 @@ import dk.dma.ais.binary.SixbitException; import dk.dma.ais.sentence.Vdm; -import javax.xml.bind.annotation.XmlRootElement; - /** * AIS message 1 * @@ -56,7 +54,6 @@ * which the station currently is receiving (between 0 and 16383). * */ -@XmlRootElement public class AisMessage1 extends AisPositionMessage { /** serialVersionUID. */ diff --git a/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage18.java b/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage18.java index 3268bc85..2f7530fc 100644 --- a/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage18.java +++ b/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage18.java @@ -20,15 +20,12 @@ import dk.dma.ais.sentence.Vdm; import dk.dma.enav.model.geometry.Position; -import javax.xml.bind.annotation.XmlRootElement; - /** * AIS message 18 - * + * * CLASS B position report implemented according to ITU-R M.1371-4 - * + * */ -@XmlRootElement public class AisMessage18 extends AisMessage implements IVesselPositionMessage { /** serialVersionUID. */ @@ -151,10 +148,6 @@ public void parse() throws AisMessageException, SixbitException { this.pos = new AisPosition(); this.pos.setRawLongitude(sixbit.getVal(28)); this.pos.setRawLatitude(sixbit.getVal(27)); - String temp = Float.toString((float) pos.getRawLatitude()/10000/60); - temp += " "; - temp += Float.toString((float) pos.getRawLongitude()/10000/60); - this.pos.setPoint(temp); this.cog = (int) sixbit.getVal(12); this.trueHeading = (int) sixbit.getVal(9); diff --git a/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage2.java b/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage2.java index a761569c..0ff91f80 100644 --- a/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage2.java +++ b/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage2.java @@ -17,17 +17,14 @@ import dk.dma.ais.binary.SixbitException; import dk.dma.ais.sentence.Vdm; -import javax.xml.bind.annotation.XmlRootElement; - /** * AIS message 2 - * + * * Assigned scheduled position report - * + * * This class handles the content of an AIS class A transponders general position report as defined by ITU-R M.1371-4. - * + * */ -@XmlRootElement public class AisMessage2 extends AisMessage1 { /** serialVersionUID. */ diff --git a/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage27.java b/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage27.java index 5a48a366..08ebb16f 100644 --- a/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage27.java +++ b/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage27.java @@ -19,15 +19,12 @@ import dk.dma.ais.binary.SixbitException; import dk.dma.ais.sentence.Vdm; -import javax.xml.bind.annotation.XmlRootElement; - /** * AIS message 27 * * Long-range broadcast position report implemented according to ITU-R M.1371-4 * */ -@XmlRootElement public class AisMessage27 extends AisMessage implements IPositionMessage { /** serialVersionUID. */ @@ -95,10 +92,6 @@ public void parse() throws AisMessageException, SixbitException { this.pos = new AisPosition(); this.pos.setRawLongitude(binArray.getVal(18)); this.pos.setRawLatitude(binArray.getVal(17)); - String temp = Float.toString((float) pos.getRawLatitude()/10000/60); - temp += " "; - temp += Float.toString((float) pos.getRawLongitude()/10000/60); - this.pos.setPoint(temp); this.pos.set1817(); this.sog = (int) binArray.getVal(6); this.cog = (int) binArray.getVal(9); diff --git a/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage3.java b/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage3.java index 46345d38..8e3c18e5 100644 --- a/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage3.java +++ b/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage3.java @@ -19,19 +19,16 @@ import dk.dma.ais.binary.SixbitException; import dk.dma.ais.sentence.Vdm; -import javax.xml.bind.annotation.XmlRootElement; - /** * AIS message 3 - * + * * Special position report, response to interrogation;(Class A shipborne mobile equipment) - * + * * This class handles the content of an AIS class A transponders general position report as defined by ITU-R M.1371-4. - * + * * Generally the position report is handled in the super class but there are some ITDMA specific purposes of this class. - * + * */ -@XmlRootElement public class AisMessage3 extends AisPositionMessage { /** serialVersionUID. */ diff --git a/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage4.java b/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage4.java index bf588d4d..b202e8a2 100644 --- a/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage4.java +++ b/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage4.java @@ -17,15 +17,12 @@ import dk.dma.ais.binary.SixbitException; import dk.dma.ais.sentence.Vdm; -import javax.xml.bind.annotation.XmlRootElement; - /** * AIS message 4 * * Base station report as defined by ITU-R M.1371-4 * */ -@XmlRootElement public class AisMessage4 extends UTCDateResponseMessage { /** serialVersionUID. */ diff --git a/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage9.java b/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage9.java index af5b4e95..01c54616 100644 --- a/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage9.java +++ b/ais-lib-messages/src/main/java/dk/dma/ais/message/AisMessage9.java @@ -19,15 +19,12 @@ import dk.dma.ais.binary.SixbitException; import dk.dma.ais.sentence.Vdm; -import javax.xml.bind.annotation.XmlRootElement; - /** * This message should be used as a standard position report for aircraft involved * in SAR operations instead of Messages 1, 2 or 3. Stations other than * aircraft involved in SAR operations should not use transmit this message. The * default reporting interval for this message should be 10 seconds. */ -@XmlRootElement public class AisMessage9 extends AisMessage implements IPositionMessage { /** serialVersionUID. */ @@ -36,7 +33,7 @@ public class AisMessage9 extends AisMessage implements IPositionMessage { /** * Altitude (derived from GNSS) expressed in metres (0 4 094 metres) * 4 095 = not available, 4 094 = 4 094 metres or higher. - * + * * Altitude is in meters. The special value 4095 indicates altitude is * not available; 4094 indicates 4094 meters or higher. */ @@ -45,7 +42,7 @@ public class AisMessage9 extends AisMessage implements IPositionMessage { /** * Speed over ground in knot steps (0-1022 knots) * 1023 = not available, 1022 = 1022 knots or higher. - * + * * Speed over ground is in knots, NOT deciknots as in the common navigation * block; planes go faster. The special value 1023 indicates speed not * available, 1022 indicates 1022 knots or higher. @@ -95,7 +92,7 @@ public class AisMessage9 extends AisMessage implements IPositionMessage { /** * Not used. Should be set to zero. Reserved for future use. - * + * * NOTE: In ITU-R M1371-4 this field is 3 bits compared to 1 previously */ private int spare; // 3 bits @@ -124,7 +121,7 @@ public class AisMessage9 extends AisMessage implements IPositionMessage { * SOTDMA/ITDMA sync state: sync state is part of the defined communication * state (19) bits. The sync state is the first 2 bits of the 19 bits in the * communication state of the message. - * + * * 0 UTC direct (see 3.1.1.1) 1 UTC indirect (see 3.1.1.2) 2 Station is * synchronized to a base station (base direct) 3 Station is synchronized to * another station based on the highest number of received stations or to diff --git a/ais-lib-messages/src/main/java/dk/dma/ais/message/AisPosition.java b/ais-lib-messages/src/main/java/dk/dma/ais/message/AisPosition.java index b14d49ae..b1a89e98 100644 --- a/ais-lib-messages/src/main/java/dk/dma/ais/message/AisPosition.java +++ b/ais-lib-messages/src/main/java/dk/dma/ais/message/AisPosition.java @@ -16,16 +16,14 @@ import dk.dma.enav.model.geometry.Position; -import javax.xml.bind.annotation.XmlRootElement; import java.io.Serializable; /** * AIS position class - * + * * Convert raw unsigned AIS position to signed 1/10000 degree position and provide helper methods for other formats - * + * */ -@XmlRootElement public class AisPosition implements Serializable{ private int bitCorrection; @@ -33,61 +31,30 @@ public class AisPosition implements Serializable{ private long rawLongitude; private double resolution = 10000.0; -// private AisPoint point; - private String point; - public AisPosition() { - // this.point = new AisPoint(100, 100, 10000.0); - } + public AisPosition() {} /** * Constructor given raw latitude and raw longitude as received in AIS message - * + * * @param rawLatitude * @param rawLongitude */ public AisPosition(long rawLatitude, long rawLongitude) { this.rawLatitude = rawLatitude; this.rawLongitude = rawLongitude; - //this.point = new AisPoint(100, 100, 10000.0); - //setPoint(); - - - // this.point += String.valueOf(rawLatitude); - // this.point += " "; - // this.point += String.valueOf(rawLongitude); } /** * Constructor given a GeoLocation - * + * * @param location */ public AisPosition(Position location) { setLatitude(Math.round(location.getLatitude() * resolution * 60.0)); setLongitude(Math.round(location.getLongitude() * resolution * 60.0)); -// setPoint(); - // this.point = new String(); - // - // this.point += String.valueOf(location.getLatitude()); - // this.point += " "; - // this.point += String.valueOf(location.getLongitude()); - } - - public void setPoint(String val) { -// this.point = new AisPoint(rawLatitude,rawLongitude,resolution); - this.point = val; - - } - - public String getPoint() { -// return point.getPoint(); -return point; - } - - @Override public boolean equals(Object obj) { if (obj == null) { @@ -99,7 +66,7 @@ public boolean equals(Object obj) { /** * Get position as {@link Position} object - * + * * @return */ public Position getGeoLocation() { @@ -113,7 +80,7 @@ public Position getGeoLocation() { /** * Get signed latitude - * + * * @return */ public long getLatitude() { @@ -137,7 +104,7 @@ public double getLongitudeDouble() { /** * Get signed longitude - * + * * @return */ public long getLongitude() { @@ -213,7 +180,7 @@ public void setLongitude(long longitude) { /** * Set the raw latitude as received from AIS - * + * * @param rawLatitude */ public void setRawLatitude(long rawLatitude) { @@ -222,7 +189,7 @@ public void setRawLatitude(long rawLatitude) { /** * Set the raw longitude as received from AIS - * + * * @param rawLongitude */ public void setRawLongitude(long rawLongitude) { diff --git a/ais-lib-messages/src/main/java/dk/dma/ais/message/AisPositionMessage.java b/ais-lib-messages/src/main/java/dk/dma/ais/message/AisPositionMessage.java index 97774112..53822bf7 100644 --- a/ais-lib-messages/src/main/java/dk/dma/ais/message/AisPositionMessage.java +++ b/ais-lib-messages/src/main/java/dk/dma/ais/message/AisPositionMessage.java @@ -20,8 +20,6 @@ import dk.dma.ais.sentence.Vdm; import dk.dma.enav.model.geometry.Position; -import javax.xml.bind.annotation.XmlRootElement; - /** * AIS position message * @@ -34,11 +32,7 @@ * mobile equipment) * */ -@XmlRootElement public abstract class AisPositionMessage extends AisMessage implements IVesselPositionMessage { - public AisPositionMessage() { - super(); - } /** serialVersionUID. */ private static final long serialVersionUID = 1L; @@ -158,10 +152,6 @@ public void parse(BinArray binArray) throws AisMessageException, SixbitException this.pos = new AisPosition(); this.pos.setRawLongitude(binArray.getVal(28)); this.pos.setRawLatitude(binArray.getVal(27)); - String temp = Float.toString((float) pos.getRawLatitude()/10000/60); - temp += " "; - temp += Float.toString((float) pos.getRawLongitude()/10000/60); - this.pos.setPoint(temp); this.cog = (int) binArray.getVal(12); this.trueHeading = (int) binArray.getVal(9); diff --git a/ais-lib-messages/src/main/java/dk/dma/ais/message/UTCDateResponseMessage.java b/ais-lib-messages/src/main/java/dk/dma/ais/message/UTCDateResponseMessage.java index 91781868..48933f07 100644 --- a/ais-lib-messages/src/main/java/dk/dma/ais/message/UTCDateResponseMessage.java +++ b/ais-lib-messages/src/main/java/dk/dma/ais/message/UTCDateResponseMessage.java @@ -20,18 +20,16 @@ import dk.dma.ais.sentence.Vdm; import dk.dma.enav.model.geometry.Position; -import javax.xml.bind.annotation.XmlRootElement; import java.util.Calendar; import java.util.Date; import java.util.TimeZone; /** * AIS message 4 - * + * * Base station report as defined by ITU-R M.1371-4 - * + * */ -@XmlRootElement public abstract class UTCDateResponseMessage extends AisMessage implements IPositionMessage { /** serialVersionUID. */ @@ -40,7 +38,6 @@ public abstract class UTCDateResponseMessage extends AisMessage implements IPosi private int utcYear; // 14 bits : UTC Year private int utcMonth; // 4 bits : UTC Month private int utcDay; // 5 bits : UTC Day - private int utcHour; // 5 bits : UTC Hour private int utcMinute; // 6 bits : UTC Minute private int utcSecond; // 6 bits : UTC Second @@ -55,9 +52,6 @@ public abstract class UTCDateResponseMessage extends AisMessage implements IPosi private int slotTimeout; // 3 bits : SOTDMA Slot Timeout private int subMessage; // 14 bits : SOTDMA sub-message - public UTCDateResponseMessage() { - } - protected UTCDateResponseMessage(int msgId) { super(msgId); } @@ -86,10 +80,6 @@ public void parse() throws AisMessageException, SixbitException { this.pos = new AisPosition(); this.pos.setRawLongitude(binArray.getVal(28)); this.pos.setRawLatitude(binArray.getVal(27)); - String temp = Float.toString((float) pos.getRawLatitude()/10000/60); - temp += " "; - temp += Float.toString((float) pos.getRawLongitude()/10000/60); - this.pos.setPoint(temp); this.posType = (int) binArray.getVal(4); this.transmissionControl = (int) binArray.getVal(1); diff --git a/ais-lib-messages/src/test/java/dk/dma/ais/message/AisMessage4Test.java b/ais-lib-messages/src/test/java/dk/dma/ais/message/AisMessage4Test.java index d4653704..294f4c07 100644 --- a/ais-lib-messages/src/test/java/dk/dma/ais/message/AisMessage4Test.java +++ b/ais-lib-messages/src/test/java/dk/dma/ais/message/AisMessage4Test.java @@ -8,15 +8,6 @@ import dk.dma.ais.binary.SixbitException; import dk.dma.ais.sentence.SentenceException; import dk.dma.ais.sentence.Vdm; -import org.w3c.dom.Document; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.*; public class AisMessage4Test { @@ -53,25 +44,4 @@ public void test2() throws AisMessageException, SixbitException, SentenceExcepti assertEquals(1, msg4.getUtcMonth()); assertEquals(2006, msg4.getUtcYear()); } - - @Test - public void marshallAisMesage4ToXmlTest() throws AisMessageException, SixbitException, SentenceException, JAXBException, ParserConfigurationException, TransformerException { - Vdm vdm = new Vdm(); - vdm.parse( - //"!AIVDM,1,1,,A,402R3WiuH@jaaPtgjhOgcA7000S:,0*7D" - "!AIVDM,2,2,6,A,53mgj802=cUo=ThH0008E8LDr1HTdTpL0000001D0aJ996;l0=SCkQlm0A0000000000000,0*34" - ); - - AisMessage message = AisMessage.getInstance(vdm); - assertTrue(message instanceof AisMessage4); - AisMessage4 msg4 = (AisMessage4) message; - JAXBContext jc = JAXBContext.newInstance(AisMessage4.class); - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - dbf.setNamespaceAware(true); - DocumentBuilder db = dbf.newDocumentBuilder(); - Document doc = db.newDocument(); - Marshaller m = jc.createMarshaller(); - System.out.println("marshal"); - m.marshal( msg4, System.out ); - } } \ No newline at end of file diff --git a/ais-lib-messages/src/test/java/dk/dma/ais/message/PosTest.java b/ais-lib-messages/src/test/java/dk/dma/ais/message/PosTest.java index e5feec02..2973ba5b 100644 --- a/ais-lib-messages/src/test/java/dk/dma/ais/message/PosTest.java +++ b/ais-lib-messages/src/test/java/dk/dma/ais/message/PosTest.java @@ -14,24 +14,10 @@ */ package dk.dma.ais.message; -import dk.dma.ais.binary.SixbitException; -import dk.dma.ais.sentence.SentenceException; -import dk.dma.ais.sentence.Vdm; import org.junit.Assert; import org.junit.Test; import dk.dma.enav.model.geometry.Position; -import org.w3c.dom.Document; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.TransformerException; - -import static org.junit.Assert.assertTrue; public class PosTest { @@ -85,17 +71,5 @@ private void testPos(AisPosition aisPosition) { Assert.assertEquals(aisPosition, pos3); } - - @Test - public void marshallAisMesage4ToXmlTest() throws AisMessageException, SixbitException, SentenceException, JAXBException, ParserConfigurationException, TransformerException { - AisPosition aisPosition = new AisPosition(33366469, 7501031); - JAXBContext jc = JAXBContext.newInstance(AisPosition.class); - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - dbf.setNamespaceAware(true); - DocumentBuilder db = dbf.newDocumentBuilder(); - Document doc = db.newDocument(); - Marshaller m = jc.createMarshaller(); - m.marshal( aisPosition, System.out ); - } } diff --git a/ais-lib-messages/src/test/java/dk/dma/ais/sentence/SentenceLineTest.java b/ais-lib-messages/src/test/java/dk/dma/ais/sentence/SentenceLineTest.java index 251ca41d..e3aa97cb 100644 --- a/ais-lib-messages/src/test/java/dk/dma/ais/sentence/SentenceLineTest.java +++ b/ais-lib-messages/src/test/java/dk/dma/ais/sentence/SentenceLineTest.java @@ -58,10 +58,6 @@ public void sentenceLineTest() { Assert.assertFalse(sl.isChecksumMatch()); Assert.assertEquals(sl.getPrefix(), ""); Assert.assertEquals(sl.getFields().size(), 7); - - sl = new SentenceLine("\\s:rORBCOMM999,q:u,c:1457740802*38\\!AIVDM,1,1,,A,405flgAv0n0001wV11e62q700400,0*20"); - System.out.println("s1: " + sl.toString()); - Assert.assertTrue(sl.getPrefix().equals("\\s:rORBCOMM999,q:u,c:1457740802*38\\")); } diff --git a/ais-lib-utils/gradle.properties b/ais-lib-utils/gradle.properties deleted file mode 100644 index d8c4f255..00000000 --- a/ais-lib-utils/gradle.properties +++ /dev/null @@ -1 +0,0 @@ -artifactId=ais-lib-utils \ No newline at end of file diff --git a/ais-lib-utils/gradle/wrapper/gradle-wrapper.jar b/ais-lib-utils/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index ca78035e..00000000 Binary files a/ais-lib-utils/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/ais-lib-utils/gradle/wrapper/gradle-wrapper.properties b/ais-lib-utils/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 06a4f2fc..00000000 --- a/ais-lib-utils/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Wed Aug 24 11:49:18 EDT 2016 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip diff --git a/ais-lib-utils/gradlew b/ais-lib-utils/gradlew deleted file mode 100644 index 27309d92..00000000 --- a/ais-lib-utils/gradlew +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/ais-lib-utils/gradlew.bat b/ais-lib-utils/gradlew.bat deleted file mode 100644 index 832fdb60..00000000 --- a/ais-lib-utils/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 6af635e3..00000000 --- a/build.gradle +++ /dev/null @@ -1,95 +0,0 @@ -allprojects { - task wrapper(type: Wrapper) { - gradleVersion = '2.14' - } -} - -subprojects { - /* - * Not applying the bintray plugin. Couldn't get it working properly when declared - * in subprojects, and when declared at root level of this script, it caused an httpcomponents - * classpath issue with ml-gradle in the core project. So for now, each project has to - * duplicate bintray publishing configuration. - */ - - apply plugin: "java" - apply plugin: "eclipse" - apply plugin: "idea" - apply plugin: "maven-publish" - - repositories { - jcenter() - mavenLocal() - } - - dependencies { - compile "org.slf4j:slf4j-api:1.7.21" - compile "net.jcip:jcip-annotations:1.0" - compile "org.apache.commons:commons-lang3:3.4" - compile "com.marklogic:enav-model:1.0.0" - compile "com.marklogic:dma-commons-management:1.0.0" - compile "com.marklogic:dma-commons-util:1.0.0" - testCompile "junit:junit:4+" - } - - sourceSets.test.resources.srcDir 'src/test/java' - - task sourcesJar(type: Jar, dependsOn: classes) { - baseName = artifactId - version = project.version - classifier = 'sources' - from sourceSets.main.allSource - } - - jar { - baseName = artifactId - version = project.version - } - - /* - * Assumes each project has a single publication. - */ - publishing { - publications { - mainJavaWithSources(MavenPublication) { - groupId group - artifactId project.property("artifactId") - version project.version - from components.java - artifact sourcesJar - } - } - } -} - -project(':ais-lib-communication') { - - dependencies { - compile project(':ais-lib-messages') - compile "com.google.guava:guava:14.0" - compile "org.antlr:antlr4-runtime:4.2" - compile "joda-time:joda-time:2.2" - compile "de.micromata.jak:JavaAPIforKml:2.2.0" - compile "org.apache.commons:commons-csv:1.1" - compile "javax.xml.bind:jaxb-api:2.2.7" - compile 'com.google.code.findbugs:jsr305:3.0.1' - testCompile 'net.maritimecloud:mc-core:0.3' - } -} - -project(':ais-lib-utils') { - dependencies { - compile project (':ais-lib-communication') - compile "com.marklogic:dma-commons-app:1.0.0" - compile "com.beust:jcommander:1.30" - } -} - -project(':ais-lib-cli') { - dependencies { - compile project (':ais-lib-communication') - compile project (':ais-lib-utils') - compile "com.marklogic:dma-commons-app:1.0.0" - compile "commons-io:commons-io:2.4" - } -} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties deleted file mode 100644 index d8422e87..00000000 --- a/gradle.properties +++ /dev/null @@ -1,6 +0,0 @@ -group=com.marklogic -version=1.0.3 - -# Subprojects must override this so that publishing works properly -# This is used instead of project.name, which cannot be overridden -artifactId= diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index ca78035e..00000000 Binary files a/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 66007fa2..00000000 --- a/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Wed Aug 24 11:49:17 EDT 2016 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip diff --git a/gradlew b/gradlew deleted file mode 100644 index 27309d92..00000000 --- a/gradlew +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradlew.bat b/gradlew.bat deleted file mode 100644 index 832fdb60..00000000 --- a/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index 097ae34f..00000000 --- a/settings.gradle +++ /dev/null @@ -1,4 +0,0 @@ -include "ais-lib-cli" -include "ais-lib-communication" -include "ais-lib-messages" -include "ais-lib-utils" \ No newline at end of file