You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rp...@apache.org on 2018/01/18 14:38:19 UTC
logging-log4j2 git commit: LOG4J2-2191 Made log4j-core a
multi-release jar; added log4j-core-java9 module
Repository: logging-log4j2
Updated Branches:
refs/heads/master 904e58b26 -> 46cdb7f47
LOG4J2-2191 Made log4j-core a multi-release jar; added log4j-core-java9 module
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/46cdb7f4
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/46cdb7f4
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/46cdb7f4
Branch: refs/heads/master
Commit: 46cdb7f470f4e0452fc662f97bad1f6e2a174e0d
Parents: 904e58b
Author: rpopma <rp...@apache.org>
Authored: Thu Jan 18 23:37:52 2018 +0900
Committer: rpopma <rp...@apache.org>
Committed: Thu Jan 18 23:37:52 2018 +0900
----------------------------------------------------------------------
log4j-core-java9/pom.xml | 153 +++++++++++++++++++
log4j-core-java9/src/assembly/java9.xml | 51 +++++++
.../apache/logging/log4j/core/util/Dummy.java | 24 +++
.../apache/logging/log4j/core/util/Temp.java | 24 +++
.../apache/logging/log4j/core/util/Dummy.java | 24 +++
log4j-core/pom.xml | 56 +++++++
pom.xml | 7 +
src/changes/changes.xml | 3 +
8 files changed, 342 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/46cdb7f4/log4j-core-java9/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-core-java9/pom.xml b/log4j-core-java9/pom.xml
new file mode 100644
index 0000000..e05f30e
--- /dev/null
+++ b/log4j-core-java9/pom.xml
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You 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
+ ~
+ ~ http://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.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>2.10.1-SNAPSHOT</version>
+ <relativePath>../</relativePath>
+ </parent>
+ <artifactId>log4j-core-java9</artifactId>
+ <packaging>pom</packaging>
+ <name>Apache Log4j Implementation Java 9 support</name>
+ <description>The Apache Log4j Implementation (Java 9)</description>
+ <properties>
+ <log4jParentDir>${basedir}/..</log4jParentDir>
+ <docLabel>Log4j Implementation Documentation</docLabel>
+ <projectDir>/core</projectDir>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-toolchains-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>toolchain</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <toolchains>
+ <jdk>
+ <version>9</version>
+ </jdk>
+ </toolchains>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-compile</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>default-test-compile</id>
+ <phase>test-compile</phase>
+ <goals>
+ <goal>testCompile</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <source>9</source>
+ <target>9</target>
+ <release>9</release>
+ <proc>none</proc>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <!-- Do not upgrade until https://issues.apache.org/jira/browse/SUREFIRE-720 is fixed -->
+ <version>2.13</version>
+ <executions>
+ <execution>
+ <id>test</id>
+ <phase>test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <systemPropertyVariables>
+ <java.awt.headless>true</java.awt.headless>
+ </systemPropertyVariables>
+ <forkCount>2C</forkCount>
+ <reuseForks>true</reuseForks>
+ <includes>
+ <include>**/Test*.java</include>
+ <include>**/*Test.java</include>
+ </includes>
+ <excludes>
+ <exclude>**/*FuncTest.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>zip</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <finalName>log4j-core-java9-${project.version}</finalName>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>src/assembly/java9.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>${deploy.plugin.version}</version>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
+
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/46cdb7f4/log4j-core-java9/src/assembly/java9.xml
----------------------------------------------------------------------
diff --git a/log4j-core-java9/src/assembly/java9.xml b/log4j-core-java9/src/assembly/java9.xml
new file mode 100644
index 0000000..3e59561
--- /dev/null
+++ b/log4j-core-java9/src/assembly/java9.xml
@@ -0,0 +1,51 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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
+
+ http://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.
+-->
+
+<assembly>
+ <id>src</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <baseDirectory>/</baseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${project.build.outputDirectory}</directory>
+ <outputDirectory>/classes/META-INF/versions/9</outputDirectory>
+ <includes>
+ <include>**/*.class</include>
+ </includes>
+ <excludes>
+ <exclude>module-info.class</exclude>
+ <exclude>**/Dummy.class</exclude>
+ <exclude>**/spi/Provider.class</exclude>
+ <exclude>**/util/PropertySource.class</exclude>
+ <exclude>**/message/ThreadDumpMessage.class</exclude>
+ <exclude>**/message/ThreadDumpMessage$ThreadInfoFactory.class</exclude>
+ </excludes>
+ </fileSet>
+ <fileSet>
+ <directory>${project.build.outputDirectory}</directory>
+ <outputDirectory>/classes</outputDirectory>
+ <includes>
+ <include>module-info.class</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</assembly>
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/46cdb7f4/log4j-core-java9/src/main/java/org/apache/logging/log4j/core/util/Dummy.java
----------------------------------------------------------------------
diff --git a/log4j-core-java9/src/main/java/org/apache/logging/log4j/core/util/Dummy.java b/log4j-core-java9/src/main/java/org/apache/logging/log4j/core/util/Dummy.java
new file mode 100644
index 0000000..6bffac6
--- /dev/null
+++ b/log4j-core-java9/src/main/java/org/apache/logging/log4j/core/util/Dummy.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://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.
+ */
+package org.apache.logging.log4j.core.util;
+
+/**
+ * This is a dummy class and is only here to allow module-info.java to compile. It will not
+ * be copied into the log4j-api module.
+ */
+public class Dummy {
+}
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/46cdb7f4/log4j-core-java9/src/main/java/org/apache/logging/log4j/core/util/Temp.java
----------------------------------------------------------------------
diff --git a/log4j-core-java9/src/main/java/org/apache/logging/log4j/core/util/Temp.java b/log4j-core-java9/src/main/java/org/apache/logging/log4j/core/util/Temp.java
new file mode 100644
index 0000000..edb6d47
--- /dev/null
+++ b/log4j-core-java9/src/main/java/org/apache/logging/log4j/core/util/Temp.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://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.
+ */
+package org.apache.logging.log4j.core.util;
+
+/**
+ * Temporary class to ensure the log4j-core-java9 jar has at least one class (or Maven will refuse to proceed).
+ * To be removed as soon as real classes are added to the log4j-core-java9 module.
+ */
+public class Temp {
+}
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/46cdb7f4/log4j-core-java9/src/test/java/org/apache/logging/log4j/core/util/Dummy.java
----------------------------------------------------------------------
diff --git a/log4j-core-java9/src/test/java/org/apache/logging/log4j/core/util/Dummy.java b/log4j-core-java9/src/test/java/org/apache/logging/log4j/core/util/Dummy.java
new file mode 100644
index 0000000..6bffac6
--- /dev/null
+++ b/log4j-core-java9/src/test/java/org/apache/logging/log4j/core/util/Dummy.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://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.
+ */
+package org.apache.logging.log4j.core.util;
+
+/**
+ * This is a dummy class and is only here to allow module-info.java to compile. It will not
+ * be copied into the log4j-api module.
+ */
+public class Dummy {
+}
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/46cdb7f4/log4j-core/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-core/pom.xml b/log4j-core/pom.xml
index 49521f5..97a6892 100644
--- a/log4j-core/pom.xml
+++ b/log4j-core/pom.xml
@@ -38,6 +38,13 @@
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
+ <!-- Classes and resources to be shaded into the core jar -->
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core-java9</artifactId>
+ <scope>provided</scope>
+ <type>zip</type>
+ </dependency>
<!-- Used for OSGi bundle support -->
<dependency>
<groupId>org.osgi</groupId>
@@ -343,6 +350,55 @@
<build>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>3.0.2</version>
+ <executions>
+ <execution>
+ <id>unpack-classes</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core-java9</artifactId>
+ <version>${project.version}</version>
+ <type>zip</type>
+ <overWrite>false</overWrite>
+ </artifactItem>
+ </artifactItems>
+ <includes>**/*.class</includes>
+ <excludes>**/*.java</excludes>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.7</version>
+ <executions>
+ <execution>
+ <id>add-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${project.build.directory}/log4j-core-java9</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/46cdb7f4/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 7ee72a4..5582690 100644
--- a/pom.xml
+++ b/pom.xml
@@ -331,6 +331,12 @@
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core-java9</artifactId>
+ <version>${project.version}</version>
+ <type>zip</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${project.version}</version>
</dependency>
@@ -1296,6 +1302,7 @@
<modules>
<module>log4j-api-java9</module>
<module>log4j-api</module>
+ <module>log4j-core-java9</module>
<module>log4j-core</module>
<module>log4j-core-its</module>
<module>log4j-1.2-api</module>
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/46cdb7f4/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 868579f..8cb729a 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -31,6 +31,9 @@
- "remove" - Removed
-->
<release version="2.11.0" date="2018-xx-xx" description="GA Release 2.11.0">
+ <action issue="LOG4J2-2191" dev="rpopma" type="add">
+ Made log4j-core a multi-release ("multi-version") jar, added log4j-core-java9 module.
+ </action>
<action issue="LOG4J2-2129" dev="rgoers" type="fix" due-to="Blazej Bucko">
Log4j2 throws NoClassDefFoundError in Java 9 in java.util.ServiceLoader.
</action>