Skip to content

Commit 64a77a4

Browse files
committed
upgrade dependencies
1 parent c3ddf32 commit 64a77a4

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ env:
2121
# Log4j 2.4 and greater requires Java 7
2222
# versions 2.0-alpha1 to 2.3 required Java 6.
2323
- dummy=dummy
24+
- LOG4J2_VERSION=2.12.0
2425
- LOG4J2_VERSION=2.11.0
2526
- LOG4J2_VERSION=2.10.0
2627
- LOG4J2_VERSION=2.9.0

pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
<properties>
5151
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5252

53-
<log4j2.version>2.12.1</log4j2.version>
54-
<slf4j.version>1.7.29</slf4j.version>
53+
<log4j2.version>2.13.3</log4j2.version>
54+
<slf4j.version>1.7.30</slf4j.version>
5555
</properties>
5656

5757
<dependencies>
@@ -76,7 +76,7 @@
7676
<dependency>
7777
<groupId>junit</groupId>
7878
<artifactId>junit</artifactId>
79-
<version>4.12</version>
79+
<version>4.13</version>
8080
<scope>test</scope>
8181
</dependency>
8282
<dependency>
@@ -189,7 +189,7 @@
189189
</plugin>
190190
<plugin>
191191
<artifactId>maven-source-plugin</artifactId>
192-
<version>3.2.0</version>
192+
<version>3.2.1</version>
193193
</plugin>
194194
<plugin>
195195
<artifactId>maven-compiler-plugin</artifactId>
@@ -201,15 +201,15 @@
201201
</plugin>
202202
<plugin>
203203
<artifactId>maven-javadoc-plugin</artifactId>
204-
<version>3.1.1</version>
204+
<version>3.2.0</version>
205205
</plugin>
206206
<plugin>
207207
<artifactId>maven-surefire-plugin</artifactId>
208208
<version>2.22.2</version>
209209
</plugin>
210210
<plugin>
211211
<artifactId>maven-site-plugin</artifactId>
212-
<version>3.8.2</version>
212+
<version>3.9.0</version>
213213
</plugin>
214214
<plugin>
215215
<artifactId>maven-gpg-plugin</artifactId>

scripts/common.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,18 +91,26 @@ readonly -a JAVA_CMD=(
9191
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
9292
}
9393
)
94+
readonly JAVA_VERSION=$("${JAVA_CMD[@]}" -version 2>&1 | awk '-F"' 'NR==1{print $2}')
9495

9596
readonly -a MVN_CMD=( ./mvnw ${LOG4J2_VERSION:+-Dlog4j2.version=$LOG4J2_VERSION} )
9697

9798
isLog4j2NotSupportedByJdk() {
98-
local java_version=$("${JAVA_CMD[@]}" -version 2>&1 | awk '-F"' 'NR==1{print $2}')
9999
local log4j2_minor_version="$(echo "${LOG4J2_VERSION:-"$log4j2_version_in_pom"}" | awk -F'[.]' '{print $2}')"
100100

101101
# log4j2 Changelog
102102
# https://logging.apache.org/log4j/2.x/changelog.html
103+
# Log4j 2.13 and greater requires Java 8
103104
# Log4j 2.4 and greater requires Java 7
104105
# versions 2.0-alpha1 to 2.3 required Java 6.
105-
[[ "$java_version" == 1.6.* ]] && (( log4j2_minor_version >= 4 ))
106+
107+
if (( log4j2_minor_version >= 13 )) && [[ "$JAVA_VERSION" == 1.6.* || "$JAVA_VERSION" == 1.7.* ]]; then
108+
return 0 # true
109+
elif (( log4j2_minor_version >= 4 )) && [[ "$JAVA_VERSION" == 1.6.* ]] ; then
110+
return 0 # true
111+
else
112+
return 1 # false
113+
fi
106114
}
107115

108116
#################################################################################

scripts/run-junit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ junit_test_cases() {
1515
}
1616

1717
if isLog4j2NotSupportedByJdk; then
18-
yellowEcho "skip run junit: log4j2 $LOG4J2_VERSION not support java 6"
18+
yellowEcho "skip run junit: log4j2 $LOG4J2_VERSION not support java $JAVA_VERSION"
1919
exit
2020
fi
2121

0 commit comments

Comments
 (0)