[ISSUE #646] Fix start script error, fix slf4j binder error (#647)
* [iot-bridge] Fix start script error, fix slf4j binder error
* update pom, use logback-classic dependency
Co-authored-by: zhangxu16 <zhangxu16@xiaomi.com>
diff --git a/rocketmq-iot-bridge/bin/server.sh b/rocketmq-iot-bridge/bin/server.sh
index aedf02b..4aa1e2c 100644
--- a/rocketmq-iot-bridge/bin/server.sh
+++ b/rocketmq-iot-bridge/bin/server.sh
@@ -22,13 +22,13 @@
JAR=rocketmq-iot-bridge-${VERSION}.jar
PID_FILE=${CURDIR}/.server.pid
-function _start() {
+_start() {
java -cp ${BASEDIR}/target/${JAR} ${MAINCLASS} &
echo $! > ${CURDIR}/.server.pid
echo "RocketMQ-IoT-Bridge started ..."
}
-function _stop() {
+_stop() {
if [ ! -f ${PID_FILE} ]; then
echo "RocketMQ-IoT-Bridge is not started!"
exit 1
@@ -37,7 +37,7 @@
rm ${PID_FILE}
}
-function _restart() {
+_restart() {
if [ -f ${PID_FILE} ]; then
echo "Restart RocketMQ-IoT-Bridge"
_stop
diff --git a/rocketmq-iot-bridge/pom.xml b/rocketmq-iot-bridge/pom.xml
index e9f0cf4..1acfa3e 100644
--- a/rocketmq-iot-bridge/pom.xml
+++ b/rocketmq-iot-bridge/pom.xml
@@ -64,6 +64,11 @@
<artifactId>slf4j-api</artifactId>
<version>1.7.7</version>
</dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>1.0.13</version>
+ </dependency>
</dependencies>
<properties>
@@ -138,9 +143,9 @@
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<includeTestSourceDirectory>false</includeTestSourceDirectory>
- <exludes>
+ <excludes>
<exclude>**/org/apache/rocketmq/iot/example/**</exclude>
- </exludes>
+ </excludes>
</configuration>
<goals>
<goal>check</goal>