Skip to content

Commit 8ff0f18

Browse files
committed
Revert "Merge remote-tracking branch 'origin/2.x' into 2.x-docgen"
This reverts commit c8d60bc, reversing changes made to af045db.
1 parent 27b7649 commit 8ff0f18

File tree

42 files changed

+392
-665
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+392
-665
lines changed

log4j-1.2-api/.log4j-plugin-processing-activator

Lines changed: 0 additions & 1 deletion
This file was deleted.

log4j-1.2-api/pom.xml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,17 @@
1616
~ limitations under the License.
1717
-->
1818
<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">
19-
2019
<modelVersion>4.0.0</modelVersion>
21-
2220
<parent>
2321
<groupId>org.apache.logging.log4j</groupId>
2422
<artifactId>log4j</artifactId>
2523
<version>${revision}</version>
2624
<relativePath>../log4j-parent</relativePath>
2725
</parent>
28-
2926
<artifactId>log4j-1.2-api</artifactId>
30-
27+
<packaging>jar</packaging>
3128
<name>Apache Log4j 1.x Compatibility API</name>
3229
<description>The Apache Log4j 1.x Compatibility API</description>
33-
3430
<properties>
3531
<module.name>org.apache.log4j</module.name>
3632

@@ -49,7 +45,6 @@
4945
<Fragment-Host>org.apache.logging.log4j.core</Fragment-Host>
5046
<!-- we have an `bnd.bnd` file to override the parent's defaults -->
5147
</properties>
52-
5348
<dependencies>
5449
<!-- Used for JMS appenders (needs an implementation of course) -->
5550
<dependency>
@@ -143,6 +138,27 @@
143138
</dependency>
144139
</dependencies>
145140

141+
<build>
142+
<plugins>
143+
144+
<!-- Enable Log4j plugin processing -->
145+
<plugin>
146+
<groupId>org.apache.maven.plugins</groupId>
147+
<artifactId>maven-compiler-plugin</artifactId>
148+
<configuration>
149+
<annotationProcessorPaths combine.children="append">
150+
<path>
151+
<groupId>org.apache.logging.log4j</groupId>
152+
<artifactId>log4j-core</artifactId>
153+
<version>${project.version}</version>
154+
</path>
155+
</annotationProcessorPaths>
156+
</configuration>
157+
</plugin>
158+
159+
</plugins>
160+
</build>
161+
146162
<profiles>
147163

148164
<!-- Fixes incompatible with Java 8 -->

log4j-cassandra/.log4j-plugin-processing-activator

Lines changed: 0 additions & 1 deletion
This file was deleted.

log4j-cassandra/pom.xml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
~ limitations under the License.
1717
-->
1818
<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/xsd/maven-4.0.0.xsd">
19-
2019
<modelVersion>4.0.0</modelVersion>
21-
2220
<parent>
2321
<groupId>org.apache.logging.log4j</groupId>
2422
<artifactId>log4j</artifactId>
@@ -27,10 +25,8 @@
2725
</parent>
2826

2927
<artifactId>log4j-cassandra</artifactId>
30-
3128
<name>Apache Log4j Cassandra</name>
3229
<description>Cassandra appender for Log4j.</description>
33-
3430
<properties>
3531

3632
<!--
@@ -112,4 +108,26 @@
112108
</dependency>
113109
</dependencies>
114110

111+
<build>
112+
<plugins>
113+
<plugin>
114+
<groupId>org.apache.maven.plugins</groupId>
115+
<artifactId>maven-compiler-plugin</artifactId>
116+
<configuration>
117+
<!--
118+
~ Modules that contain `log4j-core` plugins, must be compiled with:
119+
~
120+
~ org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
121+
-->
122+
<annotationProcessorPaths combine.children="append">
123+
<path>
124+
<groupId>org.apache.logging.log4j</groupId>
125+
<artifactId>log4j-core</artifactId>
126+
<version>${project.version}</version>
127+
</path>
128+
</annotationProcessorPaths>
129+
</configuration>
130+
</plugin>
131+
</plugins>
132+
</build>
115133
</project>

log4j-core-java9/pom.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
<properties>
3131
<maven.compiler.release>9</maven.compiler.release>
3232
<maven.deploy.skip>true</maven.deploy.skip>
33-
<maven.install.skip>true</maven.install.skip>
34-
<sign.skip>true</sign.skip>
3533
</properties>
3634
<dependencies>
3735
<!-- Naturally, all implementations require the log4j-api JAR -->

log4j-core-test/.log4j-plugin-processing-activator

Lines changed: 0 additions & 1 deletion
This file was deleted.

log4j-core-test/pom.xml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
~ limitations under the License.
1717
-->
1818
<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">
19-
2019
<modelVersion>4.0.0</modelVersion>
21-
2220
<parent>
2321
<groupId>org.apache.logging.log4j</groupId>
2422
<artifactId>log4j</artifactId>
@@ -27,10 +25,9 @@
2725
</parent>
2826

2927
<artifactId>log4j-core-test</artifactId>
30-
28+
<packaging>jar</packaging>
3129
<name>Apache Log4j Core Tests</name>
3230
<description>The Apache Log4j Implementation Tests</description>
33-
3431
<properties>
3532
<!-- Ignore less important (high rank) bugs for test artifacts -->
3633
<spotbugs.maxRank>9</spotbugs.maxRank>
@@ -354,6 +351,21 @@
354351
<build>
355352
<plugins>
356353

354+
<!-- Enable Log4j plugin processing -->
355+
<plugin>
356+
<groupId>org.apache.maven.plugins</groupId>
357+
<artifactId>maven-compiler-plugin</artifactId>
358+
<configuration>
359+
<annotationProcessorPaths combine.children="append">
360+
<path>
361+
<groupId>org.apache.logging.log4j</groupId>
362+
<artifactId>log4j-core</artifactId>
363+
<version>${project.version}</version>
364+
</path>
365+
</annotationProcessorPaths>
366+
</configuration>
367+
</plugin>
368+
357369
<plugin>
358370
<groupId>org.apache.maven.plugins</groupId>
359371
<artifactId>maven-surefire-plugin</artifactId>

log4j-core/pom.xml

Lines changed: 10 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,20 @@
1616
~ limitations under the License.
1717
-->
1818
<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">
19-
2019
<modelVersion>4.0.0</modelVersion>
21-
2220
<parent>
2321
<groupId>org.apache.logging.log4j</groupId>
2422
<artifactId>log4j</artifactId>
2523
<version>${revision}</version>
2624
<relativePath>../log4j-parent</relativePath>
2725
</parent>
28-
2926
<artifactId>log4j-core</artifactId>
30-
27+
<packaging>jar</packaging>
3128
<name>Apache Log4j Core</name>
3229
<description>The Apache Log4j Implementation</description>
33-
3430
<properties>
35-
3631
<javadoc.skip>false</javadoc.skip>
3732

38-
<!-- Tests are located elsewhere, no need to do any processing for the `src/test` directory: -->
39-
<maven.test.skip>true</maven.test.skip>
40-
4133
<!--
4234
~ OSGi and JPMS options
4335
-->
@@ -90,7 +82,6 @@
9082
javax.mail.api;substitute="javax.mail-api";transitive=false;static=true
9183
</bnd-extra-module-options>
9284
</properties>
93-
9485
<dependencies>
9586
<dependency>
9687
<groupId>javax.activation</groupId>
@@ -209,16 +200,13 @@
209200
<optional>true</optional>
210201
</dependency>
211202
</dependencies>
212-
213203
<build>
214204
<plugins>
215205

216206
<plugin>
217207
<groupId>org.codehaus.mojo</groupId>
218208
<artifactId>build-helper-maven-plugin</artifactId>
219209
<executions>
220-
221-
<!-- Add Java 9+ code for the MRJ -->
222210
<execution>
223211
<id>add-source</id>
224212
<goals>
@@ -231,82 +219,43 @@
231219
</sources>
232220
</configuration>
233221
</execution>
234-
235-
<!-- Attach the generated `log4j-plugins.xml` -->
236-
<execution>
237-
<id>attach-plugin-descriptor</id>
238-
<goals>
239-
<goal>attach-artifact</goal>
240-
</goals>
241-
<phase>package</phase>
242-
<configuration>
243-
<artifacts>
244-
<artifact>
245-
<file>${project.build.directory}/log4j-plugins.xml</file>
246-
<type>xml</type>
247-
<classifier>log4j-plugins</classifier>
248-
</artifact>
249-
</artifacts>
250-
</configuration>
251-
</execution>
252-
253222
</executions>
254223
</plugin>
255224

256-
<!-- We can't use `plugin-processing` Maven profile activated by `.log4j-plugin-processing-activator` file, because...
257-
`log4j-core` contains `PluginProcessor`, that is responsible for generating `META-INF/org/apache/.../Log4j2Plugins.dat` from `@Plugin`-annotated members.
258-
`log4j-core` also contains `@Plugin`-annotated members too.
259-
That is, we need `log4j-core` to build `log4j-core`.
260-
To work around this chicken-and-egg problem, we build as follows:
261-
262-
1. Compile sources using the `default-compile` default compilation execution.
263-
This will generate the `PluginProcessor` class.
264-
265-
2. Make a second compilation pass using the generated `PluginProcessor`. -->
266225
<plugin>
267226
<artifactId>maven-compiler-plugin</artifactId>
227+
<configuration>
228+
<annotationProcessorPaths combine.self="override" />
229+
</configuration>
268230
<executions>
269-
270-
<!-- Compile sources as usual -->
271231
<execution>
232+
<!-- disable annotation processing for first pass -->
272233
<id>default-compile</id>
273234
<configuration>
274-
<annotationProcessorPaths combine.children="append">
275-
<!-- `org.apache.logging.log4j.docgen.processor.DescriptorGenerator` for generating `log4j-plugins.xml`: -->
235+
<annotationProcessorPaths>
276236
<path>
277-
<groupId>org.apache.logging.log4j</groupId>
278-
<artifactId>log4j-docgen</artifactId>
279-
<version>${log4j-docgen.version}</version>
237+
<groupId>com.google.errorprone</groupId>
238+
<artifactId>error_prone_core</artifactId>
239+
<version>${error-prone.version}</version>
280240
</path>
281241
</annotationProcessorPaths>
282-
<compilerArgs combine.children="append">
283-
<!-- Provide `org.apache.logging.log4j.docgen.processor.DescriptorGenerator` arguments: -->
284-
<arg>-Alog4j.docgen.descriptorFilePath=${project.build.directory}/log4j-plugins.xml</arg>
285-
<arg>-Alog4j.docgen.groupId=${project.groupId}</arg>
286-
<arg>-Alog4j.docgen.artifactId=${project.artifactId}</arg>
287-
<arg>-Alog4j.docgen.version=${project.version}</arg>
288-
<arg>-Alog4j.docgen.description=${project.description}</arg>
289-
</compilerArgs>
290242
</configuration>
291243
</execution>
292-
293-
<!-- Process sources using `PluginProcessor` to generate `META-INF/org/apache/.../Log4j2Plugins.dat` -->
294244
<execution>
245+
<!-- then do a processing-only pass to generate plugins .dat file -->
295246
<id>process-plugins</id>
296247
<goals>
297248
<goal>compile</goal>
298249
</goals>
299250
<phase>process-classes</phase>
300251
<configuration>
301-
<annotationProcessorPaths combine.self="override" />
302252
<annotationProcessors>
303253
<processor>org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor</processor>
304254
</annotationProcessors>
305255
<compilerArgs combine.self="override" />
306256
<proc>only</proc>
307257
</configuration>
308258
</execution>
309-
310259
</executions>
311260
</plugin>
312261

@@ -342,5 +291,4 @@
342291

343292
</plugins>
344293
</build>
345-
346294
</project>

log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/ScriptCondition.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ public List<PathWithAttributes> selectFilesToDelete(
8989
* <li>pathList - a {@code java.util.List} containing {@link org.apache.logging.log4j.core.appender.rolling.action.PathWithAttributes} objects. (The script is
9090
* free to modify and return this list.)</li>
9191
* <li>substitutor - a {@link org.apache.logging.log4j.core.lookup.StrSubstitutor} that can be used to look up variables embedded in the base
92-
* dir or other properties</li>
93-
* <li>statusLogger - the {@link StatusLogger} that can be used to log events during script execution</li>
92+
* dir or other properties
93+
* <li>statusLogger - the {@link StatusLogger} that can be used to log events during script execution
9494
* <li>any properties declared in the configuration</li>
9595
* </ul>
9696
* @param configuration the configuration

log4j-couchdb/.log4j-plugin-processing-activator

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)