fix SLF4J-456

This commit is contained in:
Ceki Gulcu 2019-02-19 17:21:46 +01:00
parent e9d4b6a4a8
commit fb418db538
18 changed files with 177 additions and 42 deletions

View File

@ -16,6 +16,10 @@
<description>JCL 1.2 implemented over SLF4J</description>
<url>http://www.slf4j.org</url>
<properties>
<module-name>org.apache.commons.logging</module-name>
</properties>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
@ -28,4 +32,4 @@
</dependency>
</dependencies>
</project>
</project>

View File

@ -5,4 +5,4 @@ Bundle-Vendor: SLF4J.ORG
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.slf4j.bridge;version=${parsedVersion.osgiVersion};uses:="org.slf4j,org.slf4j.spi"
Import-Package: org.slf4j;version=${parsedVersion.osgiVersion},org.slf4j.spi;version=${parsedVersion.osgiVersion}
Automatic-Module-Name: jul_to_slf4j
Automatic-Module-Name: jul.to.slf4j

View File

@ -25,6 +25,10 @@
</license>
</licenses>
<properties>
<module-name>log4j</module-name>
</properties>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
@ -37,4 +41,4 @@
</dependency>
</dependencies>
</project>
</project>

55
pom.xml
View File

@ -33,7 +33,7 @@
</scm>
<properties>
<stable.version>1.7.25</stable.version>
<latest.stable.version>1.7.26</latest.stable.version>
<!-- java.util.ServiceLoader requires Java 6 -->
<jdk.version>1.6</jdk.version>
<maven.compiler.source>${jdk.version}</maven.compiler.source>
@ -50,6 +50,7 @@
<maven-site-plugin.version>3.6</maven-site-plugin.version>
<compiler-plugin.version>3.6.1</compiler-plugin.version>
<javadoc.plugin.version>2.10.4</javadoc.plugin.version>
<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
</properties>
<developers>
@ -183,34 +184,45 @@
<executions>
<execution>
<id>base-compile</id>
<id>default-compile</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
<jdkToolchain>
<version>[6, )</version>
</jdkToolchain>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
</configuration>
</execution>
<execution>
<id>default-compile</id>
<execution>
<id>module-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<jdkToolchain>
<version>[9, )</version>
</jdkToolchain>
<release>9</release>
<compileSourceRoots>
<compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>
</compileSourceRoots>
<outputDirectory>${project.build.outputDirectory}/META-INF/versions/9</outputDirectory>
<compilerArgs>
<arg>--patch-module</arg>
<arg>${module-name}=${project.build.outputDirectory}</arg>
</compilerArgs>
</configuration>
</execution>
</executions>
<configuration>
<jdkToolchain>
<version>[1.6, )</version>
</jdkToolchain>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
</configuration>
</plugin>
<plugin>
@ -225,6 +237,7 @@
<X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK>
<X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK>
<Implementation-Version>${project.version}</Implementation-Version>
<Multi-Release>true</Multi-Release>
</manifestEntries>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
@ -251,7 +264,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
@ -492,6 +505,18 @@
</profiles>
<pluginRepositories>
<pluginRepository>
<id>apache-snapshot-repo</id>
<name>apache-snapshot-repo</name>
<url>https://repository.apache.org/content/groups/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<distributionManagement>

49
release.sh Executable file
View File

@ -0,0 +1,49 @@
#mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${VERSION_NUMBER}
MVN='/java/maven-3.5.2//bin/mvn'
PASS=$1
echo $PASS
function checkExit(){
if test "$?" != "0"; then
echo Command $1 exited with abnormal status
exit 1;
else echo $?
fi
}
function echoThenRun () { # echo and then run the command
echo $1
$1
ret=$?
echo $ret
return $ret
}
$MVN clean
checkExit "mvn clean"
$MVN install
checkExit "mvn install"
$MVN site:site
checkExit "mvn site:ste"
$MVN assembly:single
checkExit "mvn assembly:single"
$MVN deploy -P javadocjar,sign-artifacts -Dgpg.passphrase=$PASS
checkExit "mvn deploy -P javadocjar,sign-artifacts -Dgpg.passphrase=xxx"
#$MVN site:deploy -N # with Java 8!!!
#checkExit "mvn site:deploy -N"
#git tag -m "tagging" -a v_${VERSION_NUMBER}
#git push --tags
#release version and add next version on jira

View File

@ -18,6 +18,10 @@
<url>http://www.slf4j.org</url>
<properties>
<module-name>org.slf4j</module-name>
</properties>
<build>
<plugins>
<plugin>
@ -52,4 +56,4 @@
</build>
</project>
</project>

View File

@ -16,6 +16,10 @@
<description>SLF4J JDK14 Binding</description>
<url>http://www.slf4j.org</url>
<properties>
<module-name>org.slf4j.jul</module-name>
</properties>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
@ -31,4 +35,4 @@
</dependency>
</dependencies>
</project>
</project>

View File

@ -17,6 +17,10 @@
<description>SLF4J NOP Binding</description>
<url>http://www.slf4j.org</url>
<properties>
<module-name>org.slf4j.nop</module-name>
</properties>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
@ -24,4 +28,4 @@
</dependency>
</dependencies>
</project>
</project>

View File

@ -16,6 +16,10 @@
<description>SLF4J Simple binding</description>
<url>http://www.slf4j.org</url>
<properties>
<module-name>org.slf4j.simple</module-name>
</properties>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
@ -31,4 +35,4 @@
</dependency>
</dependencies>
</project>
</project>

View File

@ -38,7 +38,28 @@
<outputDirectory>${project.parent.basedir}/target/site</outputDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<configuration>
<!-- Maven central does not allow entries with ../.. in
*-source.jar but requires that they exist. -->
<includes>
<include>**/META-INF/*</include>
</includes>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
</project>

View File

@ -43,12 +43,12 @@
<h2>Latest STABLE version</h2>
<p>Download version ${stable.version} including <i>full source code</i>,
<p>Download version ${latest.stable.version} including <i>full source code</i>,
class files and documentation in ZIP or TAR.GZ format: </p>
<ul>
<li><a href="dist/slf4j-${stable.version}.tar.gz"><b>slf4j-${stable.version}.tar.gz</b></a> </li>
<li><a href="dist/slf4j-${stable.version}.zip"><b>slf4j-${stable.version}.zip</b></a> </li>
<li><a href="dist/slf4j-${latest.stable.version}.tar.gz"><b>slf4j-${latest.stable.version}.tar.gz</b></a> </li>
<li><a href="dist/slf4j-${latest.stable.version}.zip"><b>slf4j-${latest.stable.version}.zip</b></a> </li>
</ul>
<h2>Java 9 Modularized EXPERIMENTAL version</h2>

View File

@ -31,17 +31,19 @@
announce</a> mailing list.
</p>
<!--
Conventions:
file names in <em/>
class names in <code/>
-->
<hr noshade="noshade" size="1"/>
<!--
<h3>2019 - Release of SLF4J 1.8.0-beta4</h3>
<p>Removed <code>MDCStrLookup</code> class in
<code>org.slf4j.ext</code> package which relied on
<code>commons-lang</code>. Thus, slf4j-ext module no longer depends
on <code>commons-lang</code> fixing <a
href="https://jira.qos.ch/browse/SLF4J-454">SLF4J-454</a>.
-->
<hr noshade="noshade" size="1"/>
<h3>February 16th, 2019 - Release of SLF4J 1.8.0-beta3</h3>
@ -74,28 +76,39 @@
<a href="https://jira.qos.ch/browse/SLF4J-409">SLF4J-409</a> as
reported by Devin Smith.</p>
<p>For reasons of coherency, the
<em>Automatic-Automatic-Module-Name</em> for the jul-to-slf4j
module is now "jul.to.slf4j". In the eartly versions of Java 9 the
string "to" within "jul.to.slf4j" was incorrectly interpreted as a
reserved keyword. This bug has been fixed in the JDK for a while.
</p>
<p>Fixed <a
href="https://nvd.nist.gov/vuln/detail/CVE-2018-8088">CVE-2018-8088</a>
by removing the <code>EventData</code> <code>EventException</code>
<code>EventLogger</code> classes in the same way as done in SLF4J
1.7.26.
</p>
<p>Removed <code>MDCStrLookup</code> class in
<code>org.slf4j.ext</code> package which relied on
<code>commons-lang</code>. Thus, <code>slf4j-ext</code> module no
longer depends on <code>commons-lang</code> fixing <a
href="https://jira.qos.ch/browse/SLF4J-454">SLF4J-454</a>.
<h3>February 16th, 2019 - Release of SLF4J 1.7.26</h3>
<p>Due to popular demand in relation <a
<p>Due to popular demand in relation to <a
href="https://nvd.nist.gov/vuln/detail/CVE-2018-8088">CVE-2018-8088</a>,
removed <code>EventData</code> <code>EventException</code>
<code>EventLogger</code> classes in the <code>org.slf4j.ext</code>
package in the slf4j-ext module. These classes were rarely
used.
<code>EventData</code>, <code>EventException</code> and
<code>EventLogger</code> classes were removed from the
<code>org.slf4j.ext</code> package located in the
<code>slf4j-ext</code> module.
</p>
<p>The aforementioned vulnerabilty has quite a low severty but was
incorrectly marked critical in National Vulnerability
Database. However, it was easier to remove the rarely-used
incriminated classes than to try to convince the universe that the
severity of the vulnerability was indeed low.
<p>The aforementioned vulnerabilty has a low severty but was
incorrectly marked critical in the National Vulnerability Database.
</p>
@ -112,6 +125,9 @@
<p class="source">Automatic-Module-Name: <b>jul_to_slf4j</b></p>
<p>In later versions of Java 9 this problem was fixed and we
reverted to <b>jul.to.slf4j</b> in 1.8.0-beta3 and later.</p>
<p>See also <a
href="https://jira.qos.ch/browse/SLF4J-428">SLF4J-428</a>.</p>