Unverified Commit fa894b53 authored by Juon Kawakami's avatar Juon Kawakami 🥗
Browse files

init

parent 31971f1b
BSD 3-Clause License
Copyright (c) 2017-2021, RoboCupRescue
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
= Robocup Rescue Simulation Server
:author: RoboCup Rescue Team
:nofooter:
(Linux) Instructions to download, build and run the RoboCup Rescue Simulator (RCRS)
== Software Pre-Requisites
* Git
* OpenJDK Java 17
* Gradle
== Installation
=== Download project from GitHub
```bash
$ git clone git@github.com:roborescue/rcrs-server.git
```
=== Compile the project
```bash
$ cd rcrs-server
$ ./gradlew completeBuild
```
=== Execute the Rescue Simulation Server
Open a terminal window, navigate to the ```rcrs-server``` root directory and execute
```bash
$ cd scripts
$ ./start.sh -m ../maps/test/map -c ../maps/test/config
```
== Tools
=== Map Editor
Open a terminal window, navigate to the ```rcrs-server``` root directory and execute
```bash
$ ./gradlew gmlEditor --args='<map file path>'
```
where ```--args=<map file path>``` is optional.
==== Example
```
./gradlew gmlEditor --args='maps/test/map/map.gml'
```
=== Scenario Editor
Open a terminal window, navigate to the ```rcrs-server``` root directory and execute
```bash
$ ./gradlew scenarioEditor --args='<scenario path>'
```
where ```--args=<scenario path>``` is optional.
==== Example
```
./gradlew scenarioEditor --args='maps/test/map'
```
=== Random Scenario
Open a terminal window, navigate to the ```rcrs-server``` root directory and execute
```bash
$ ./gradlew randomScenario --args="'<map path>' <options>"
```
where ```<map path>``` is the path to the map directory and ```<options>``` are the minimum and maximum value for each entity in the scenario. The ```<options>``` are optional.
==== Example
```
./gradlew randomScenario --args="'../maps/test/map' -civ 0 100 -fb 0 10 -fs 0 1 -pf 0 10 -po 0 1 -at 0 5 -ac 0 0 -refuge 0 2 -fire 0 0"
```
=== Log Viewer
Open a terminal window, navigate to the ```rcrs-server``` root directory and execute
```bash
$ ./gradlew logViewer --args="'-c' '<config file>' '<log path>'"
```
where ```<config file>``` is the path to the log viewer configuration file, default ```config/logviewer.cfg```. The ```<log path>``` is the rescue log file path, default ```logs/log/rescue.log```.
==== Example
```
./gradlew logViewer --args="'-c' 'config/logviewer.cfg' 'logs/log/rescue.log'"
```
=== `osm2gml`
Open a terminal window, navigate to the ```rcrs-server``` root directory and execute
```bash
$ ./gradlew osm2gml --args="'<osm map path>' '<gml map path>'"
```
The ```<osm map path>``` is the path to the OSM map file and the ```<gml map path>``` is the destination GML map path.
==== Example
```
./gradlew osm2gml --args="'/home/user/newmap.osm' '/home/user/newmap.gml'"
```
== Known Problems
=== Slow agent connection
If the scenario have many agents, the agents connection to the server may slow down at certain moment. To overcome this issue, you should
1. Install the `rng-tools` package
2. Edit the ` /etc/defaults/rng-tools` and add the line
`HRNGDEVICE=/dev/urandom`
3. Start the rng daemon
`/etc/init.d/rng-tools start`
[IMPORTANT]
This instructions are valid for Ubuntu. The package name and initialization commands may change on other distributions.
== Support
To report a bug, suggest improvements or request support, please open an issue at GitHub <https://github.com/roborescue/rcrs-server/issues>.
plugins {
id 'java'
id 'maven-publish'
}
defaultTasks 'completeBuild'
group = 'com.github.roborescue'
sourceCompatibility = '17'
targetCompatibility = '17'
version = '2.0'
def getDateTime() {
new Date().format('yyyyMMddHHmmss', TimeZone.getTimeZone('UTC'))
}
dependencies {
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.13.0'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.13.0'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.13.0'
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'com.google.guava:guava:31.0.1-jre'
implementation 'com.google.protobuf:protobuf-java:3.19.1'
implementation 'com.google.protobuf:protobuf-java-util:3.19.1'
implementation 'com.vividsolutions:jts:1.13'
implementation 'jaxen:jaxen:1.2.0'
implementation 'jfree:jfreechart:1.0.13'
implementation 'log4j:log4j:1.2.17'
implementation 'net.sf.trove4j:trove4j:2.1.0'
implementation 'net.sourceforge.jsi:jsi:1.0.0'
implementation 'org.dom4j:dom4j:2.1.3'
implementation 'org.json:json:20210307'
implementation 'org.jfree:jcommon:1.0.24'
implementation 'org.jscience:jscience:4.3.1'
implementation 'org.slf4j:slf4j-log4j12:1.7.32'
implementation 'org.uncommons.maths:uncommons-maths:1.2.2'
implementation 'org.tukaani:xz:1.9'
implementation 'org.projectlombok:lombok:latest.integration'
implementation 'org.apache.commons:commons-compress:1.21'
annotationProcessor 'org.projectlombok:lombok:latest.integration'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
}
repositories {
mavenCentral()
maven {
url = 'http://sourceforge.net/projects/jsi/files/m2_repo'
allowInsecureProtocol = true
}
maven {
url = 'https://jitpack.io'
}
}
sourceSets {
main {
java {
srcDirs = [ 'modules/kernel/src',
'modules/handy/src',
'modules/misc/src',
'modules/rescuecore2/src',
'modules/standard/src',
'modules/clear/src',
'modules/collapse/src',
'modules/gis2/src',
'modules/ignition/src',
'modules/maps/src',
'modules/sample/src',
'modules/traffic3/src',
'modules/oldsims',
'modules/resq-fire/src'
]
}
}
}
test {
useJUnitPlatform()
}
jar {
manifest {
attributes('Implementation-Title': project.name,
'Implementation-Version': project.version + '-${getDateTime()}')
}
}
javadoc {
options {
encoding = 'UTF-8'
addStringOption('Xdoclint:none', '-quiet')
}
}
publishing {
publications {
maven(MavenPublication) {
groupId = 'com.github.roborescue'
artifactId = 'rcrs-server'
version = 'master-SNAPSHOT'
from components.java
}
}
}
clean {
doFirst {
delete file( new File( rootDir, 'bin' ) )
delete file( new File( rootDir, 'build' ) )
delete file( new File( rootDir, 'jars' ) )
delete file( new File( rootDir, 'lib' ) )
delete file( new File( rootDir, 'test-results' ) )
}
}
[compileJava, compileTestJava].each {
it.options.encoding = 'UTF-8'
it.options.compilerArgs += [ '-Xlint:deprecation' ]
}
task exportLibs(type: Copy) {
from configurations.runtimeClasspath
into 'lib'
}
/* Modules jar generation tasks */
task clearSourceJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from(sourceSets.main.allSource) {
include 'clear/**'
}
destinationDirectory = file('jars/sources')
archiveFileName = 'clear-sources.jar'
}
task clearJar(type: Jar) {
from(sourceSets.main.output) {
include 'clear/**'
}
destinationDirectory = file('jars')
archiveFileName = 'clear.jar'
}
task collapseSourceJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from(sourceSets.main.allSource) {
include 'collapse/**'
}
destinationDirectory = file('jars/sources')
archiveFileName = 'collapse-sources.jar'
}
task collapseJar(type: Jar) {
from(sourceSets.main.output) {
include 'collapse/**'
}
destinationDirectory = file('jars')
archiveFileName = 'collapse.jar'
}
task gis2SourceJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from(sourceSets.main.allSource) {
include 'gis2/**'
}
destinationDirectory = file('jars/sources')
archiveFileName = 'gis2-sources.jar'
}
task gis2Jar(type: Jar) {
from(sourceSets.main.output) {
include 'gis2/**'
}
destinationDirectory = file('jars')
archiveFileName = 'gis2.jar'
}
task ignitionSourceJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from(sourceSets.main.allSource) {
include 'ignition/**'
}
destinationDirectory = file('jars/sources')
archiveFileName = 'ignition-sources.jar'
}
task ignitionJar(type: Jar) {
from(sourceSets.main.output) {
include 'ignition/**'
}
destinationDirectory = file('jars')
archiveFileName = 'ignition.jar'
}
task kernelSourceJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from(sourceSets.main.allSource) {
include 'kernel/**'
}
destinationDirectory = file('jars/sources')
archiveFileName = 'kernel-sources.jar'
}
task kernelJar(type: Jar) {
from(sourceSets.main.output) {
include 'kernel/**'
}
destinationDirectory = file('jars')
archiveFileName = 'kernel.jar'
}
task mapsSourceJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from(sourceSets.main.allSource) {
include 'maps/**'
}
destinationDirectory = file('jars/sources')
archiveFileName = 'maps-sources.jar'
}
task mapsJar(type: Jar) {
from(sourceSets.main.output) {
include 'maps/**'
}
destinationDirectory = file('jars')
archiveFileName = 'maps.jar'
}
task miscSourceJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from(sourceSets.main.allSource) {
include 'misc/**'
}
destinationDirectory = file('jars/sources')
archiveFileName = 'misc-sources.jar'
}
task miscJar(type: Jar) {
from(sourceSets.main.output) {
include 'misc/**'
}
destinationDirectory = file('jars')
archiveFileName = 'misc.jar'
}
task rescuecore2SourceJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from(sourceSets.main.allSource) {
include 'rescuecore2/**'
exclude 'rescuecore2/standard/**'
}
into 'rescuecore2', {
from 'modules/rescuecore2/resources/rescuecore2'
}
destinationDirectory = file('jars/sources')
archiveFileName = 'rescuecore2-sources.jar'
}
task rescuecore2Jar(type: Jar) {
from(sourceSets.main.output) {
include 'rescuecore2/**'
exclude 'rescuecore2/standard/**'
}
into 'rescuecore2', {
from 'modules/rescuecore2/resources/rescuecore2'
}
destinationDirectory = file('jars')
archiveFileName = 'rescuecore2.jar'
}
task resqFireSourceJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from(sourceSets.main.allSource) {
include 'rescuecore/**'
include 'firesimulator/**'
}
destinationDirectory = file('jars/sources')
archiveFileName = 'resq-fire-sources.jar'
}
task resqFireJar(type: Jar) {
from(sourceSets.main.output) {
include 'rescuecore/**'
include 'firesimulator/**'
}
destinationDirectory = file('jars')
archiveFileName = 'resq-fire.jar'
}
task sampleSourceJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from(sourceSets.main.allSource) {
include 'sample/**'
}
destinationDirectory = file('jars/sources')
archiveFileName = 'sample-sources.jar'
}
task sampleJar(type: Jar) {
from(sourceSets.main.output) {
include 'sample/**'
}
destinationDirectory = file('jars')
archiveFileName = 'sample.jar'
}
task standardSourceJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from(sourceSets.main.allSource) {
include 'rescuecore2/standard/**'
}
into 'rescuecore2/standard', {
from 'modules/standard/resources/rescuecore2/standard'
}
destinationDirectory = file('jars/sources')
archiveFileName = 'standard-sources.jar'
}
task standardJar(type: Jar) {
from(sourceSets.main.output) {
include 'rescuecore2/standard/**'
}
into 'rescuecore2/standard', {
from 'modules/standard/resources/rescuecore2/standard'
}
destinationDirectory = file('jars')
archiveFileName = 'standard.jar'
}
task traffic3SourceJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from(sourceSets.main.allSource) {
include 'traffic3/**'
}
from 'modules/traffic3/resources'
destinationDirectory = file('jars/sources')
archiveFileName = 'traffic3-sources.jar'
}
task traffic3Jar(type: Jar) {
from(sourceSets.main.output) {
include 'traffic3/**'
}
from 'modules/traffic3/resources'
destinationDirectory = file('jars')
archiveFileName = 'traffic3.jar'
}
/* Generate the compressed source in Jar files */
task sourcesJar(type: GradleBuild) {
tasks = [ 'clearSourceJar', 'collapseSourceJar', 'gis2SourceJar',
'ignitionSourceJar', 'kernelSourceJar', 'mapsSourceJar',
'miscSourceJar', 'rescuecore2SourceJar', 'resqFireSourceJar',
'sampleSourceJar', 'standardSourceJar', 'traffic3SourceJar'
]
}
/* Perform a complete build of the simulator */
task completeBuild(type: GradleBuild) {
tasks = [ 'clean', 'clearJar', 'collapseJar', 'gis2Jar', 'ignitionJar',
'kernelJar', 'mapsJar', 'miscJar', 'rescuecore2Jar', 'resqFireJar',
'sampleJar', 'standardJar', 'traffic3Jar', 'sourcesJar',
'exportLibs'
]
}
if (project.hasProperty("args")) {
ext.cmdargs = project.getProperty("args")
} else {
ext.cmdargs = '-c maps/test/config/kernel.cfg --gis.map.dir=maps/test/map --kernel.logname=logs/log/rescue.log.xz'
}
/* run simulator */
task run2(type: JavaExec) {
classpath = files('jars')
classpath = files('lib')
classpath += files('.')
classpath += sourceSets.main.runtimeClasspath
mainClass = 'kernel.StartKernel'
maxHeapSize = '2048m'
jvmArgs '-Dlog4j.log.dir=logs/log'
args(cmdargs.split(' '))
}
/* Generate a random scenario */
task randomScenario(type: JavaExec) {
classpath = files('.')
classpath += sourceSets.main.runtimeClasspath
mainClass = 'gis2.scenario.RandomScenarioGenerator'
maxHeapSize = '2048m'
jvmArgs '-Dlog4j.log.dir=logs/log'
}
/* Open scenario editor */
task scenarioEditor(type: JavaExec) {
classpath = files('.')
classpath += sourceSets.main.runtimeClasspath
mainClass = 'gis2.scenario.ScenarioEditor'
maxHeapSize = '2048m'
jvmArgs '-Dlog4j.log.dir=logs/log'
}
/* Open LogViewer */
task logViewer(type: JavaExec, dependsOn: classes) {
classpath = files('.')
classpath += sourceSets.main.runtimeClasspath
mainClass = 'sample.SampleLogViewer'
maxHeapSize = '10240m'
jvmArgs '-Dlog4j.log.dir=logs/log'
args = [ '-c', 'config/logviewer.cfg', '0715-052303-Ri-one-kobe2.xz']
}
/* Open gml editor */
task gmlEditor(type: JavaExec) {
classpath = files('.')
classpath += sourceSets.main.runtimeClasspath
mainClass = 'maps.gml.editor.GMLEditor'
maxHeapSize = '2048m'
jvmArgs '-Dlog4j.log.dir=logs/log'
}
/* Converter OSM to GML */
task osm2gml(type: JavaExec) {
classpath = files('.')
classpath += sourceSets.main.runtimeClasspath
mainClass = 'maps.convert.Convert'
maxHeapSize = '2048m'
jvmArgs '-Dlog4j.log.dir=logs/log'
}
\ No newline at end of file
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_NAME="Gradle"
APP_BASE_NAME=${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='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# 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 ;; #(
MSYS* | 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" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@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 Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@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="-Xmx64m" "-Xms64m"
@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 execute
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 execute
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
: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 %*
: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
before_install:
- source "$HOME/.sdkman/bin/sdkman-init.sh"
- sdk update
- sdk install java 17.0.1-tem
- sdk use java 17.0.1-tem
\ No newline at end of file
File added
log4j.rootLogger=trace, console
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%p %c %x: %m%n
log4j.appender.console.threshold=trace
log4j.appender.console-warn=org.apache.log4j.ConsoleAppender
log4j.appender.console-warn.layout=org.apache.log4j.PatternLayout
log4j.appender.console-warn.layout.ConversionPattern=%p %c %x: %m%n
log4j.appender.console-warn.threshold=warn
log4j.appender.kernel=org.apache.log4j.FileAppender
log4j.appender.kernel.File=${log4j.log.dir}/kernel.log
log4j.appender.kernel.Append=true
log4j.appender.kernel.layout=org.apache.log4j.PatternLayout
log4j.appender.kernel.layout.ConversionPattern=%p %c %x: %m%n
log4j.appender.misc=org.apache.log4j.FileAppender
log4j.appender.misc.File=${log4j.log.dir}/misc.log
log4j.appender.misc.Append=true
log4j.appender.misc.layout=org.apache.log4j.PatternLayout
log4j.appender.misc.layout.ConversionPattern=%p %c %x: %m%n
log4j.appender.launcher=org.apache.log4j.FileAppender
log4j.appender.launcher.File=${log4j.log.dir}/launcher.log
log4j.appender.launcher.Append=true
log4j.appender.launcher.layout=org.apache.log4j.PatternLayout
log4j.appender.launcher.layout.ConversionPattern=%p %c %x: %m%n
log4j.appender.collapse=org.apache.log4j.FileAppender
log4j.appender.collapse.File=${log4j.log.dir}/collapse.log
log4j.appender.collapse.Append=true
log4j.appender.collapse.layout=org.apache.log4j.PatternLayout
log4j.appender.collapse.layout.ConversionPattern=%p %c %x: %m%n
log4j.appender.fire=org.apache.log4j.FileAppender
log4j.appender.fire.File=${log4j.log.dir}/fire.log
log4j.appender.fire.Append=true
log4j.appender.fire.layout=org.apache.log4j.PatternLayout
log4j.appender.fire.layout.ConversionPattern=%p %c %x: %m%n
log4j.appender.traffic=org.apache.log4j.FileAppender
log4j.appender.traffic.File=${log4j.log.dir}/traffic.log
log4j.appender.traffic.Append=true
log4j.appender.traffic.layout=org.apache.log4j.PatternLayout
log4j.appender.traffic.layout.ConversionPattern=%p %c %x: %m%n
log4j.appender.ignition=org.apache.log4j.FileAppender
log4j.appender.ignition.File=${log4j.log.dir}/ignition.log
log4j.appender.ignition.Append=true
log4j.appender.ignition.layout=org.apache.log4j.PatternLayout
log4j.appender.ignition.layout.ConversionPattern=%p %c %x: %m%n
log4j.appender.clear=org.apache.log4j.FileAppender
log4j.appender.clear.File=${log4j.log.dir}/clear.log
log4j.appender.clear.Append=true
log4j.appender.clear.layout=org.apache.log4j.PatternLayout
log4j.appender.clear.layout.ConversionPattern=%p %c %x: %m%n
log4j.appender.gis=org.apache.log4j.FileAppender
log4j.appender.gis.File=${log4j.log.dir}/gis.log
log4j.appender.gis.Append=true
log4j.appender.gis.layout=org.apache.log4j.PatternLayout
log4j.appender.gis.layout.ConversionPattern=%p %c %x: %m%n
log4j.appender.civilian=org.apache.log4j.FileAppender
log4j.appender.civilian.File=${log4j.log.dir}/civilian.log
log4j.appender.civilian.Append=true
log4j.appender.civilian.layout=org.apache.log4j.PatternLayout
log4j.appender.civilian.layout.ConversionPattern=%p %c %x: %m%n
log4j.appender.sample=org.apache.log4j.FileAppender
log4j.appender.sample.File=${log4j.log.dir}/sample.log
log4j.appender.sample.Append=true
log4j.appender.sample.layout=org.apache.log4j.PatternLayout
log4j.appender.sample.layout.ConversionPattern=%p %c %x: %m%n
log4j.appender.viewer=org.apache.log4j.FileAppender
log4j.appender.viewer.File=${log4j.log.dir}/viewer.log
log4j.appender.viewer.Append=true
log4j.appender.viewer.layout=org.apache.log4j.PatternLayout
log4j.appender.viewer.layout.ConversionPattern=%p %c %x: %m%n
log4j.category.kernel=debug, kernel, console-warn
log4j.additivity.kernel=false
log4j.category.collapse=debug, collapse, console-warn
log4j.additivity.collapse=false
log4j.category.misc=debug, misc, console-warn
log4j.additivity.misc=false
log4j.category.fire=debug, fire, console-warn
log4j.category.firesimulator=debug, fire, console-warn
log4j.additivity.fire=false
log4j.additivity.firesimulator=false
log4j.category.traffic3=debug, traffic, console-warn
log4j.additivity.traffic3=false
log4j.category.ignition=debug, ignition, console-warn
log4j.additivity.ignition=false
log4j.category.clear=debug, clear, console-warn
log4j.additivity.clear=false
log4j.category.gis2=debug, gis, console-warn
log4j.additivity.gis2=false
log4j.category.sample.SampleCivilian=debug, civilian, console-warn
log4j.additivity.sample.SampleCivilian=false
log4j.category.sample=debug, sample, console-warn
log4j.additivity.sample=false
log4j.category.sample.SampleViewer=debug, viewer, console-warn
log4j.additivity.sample.SampleViewer=false
log4j.category.com.infomatiq.jsi.rtree=error, console-warn
log4j.additivity.com.infomatiq.jsi.rtree=false
log4j.category.rescuecore2.connection.ConnectionManager=debug, kernel, console-warn
log4j.additivity.rescuecore2.connection.ConnectionManager=false
log4j.category.startup=trace, console
log4j.additivity.startup=false
log4j.category.maps=error, console-warn
log4j.additivity.maps=false
rootProject.name = 'rcrs-server'
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment