|
19 | 19 | <modelVersion>4.0.0</modelVersion> |
20 | 20 | <parent> |
21 | 21 | <groupId>org.apache.logging.log4j</groupId> |
22 | | - <artifactId>log4j</artifactId> |
| 22 | + <artifactId>log4j-jdk-parent</artifactId> |
23 | 23 | <version>${revision}</version> |
24 | | - <relativePath>../log4j-parent</relativePath> |
| 24 | + <relativePath>../parent</relativePath> |
25 | 25 | </parent> |
26 | 26 |
|
27 | | - <artifactId>jul-to-log4j</artifactId> |
28 | | - <name>Apache Log4j JUL LogManager</name> |
| 27 | + <artifactId>jul-to-log4j-api</artifactId> |
| 28 | + <name>JUL to Log4j API logging bridge</name> |
29 | 29 | <description>A `java.util.logging` LogManager that forwards events to the Log4j API.</description> |
30 | 30 |
|
31 | 31 | <properties> |
| 32 | + <!-- Skips BND Baseline until the first release --> |
| 33 | + <bnd.baseline.fail.on.missing>false</bnd.baseline.fail.on.missing> |
| 34 | + |
| 35 | + <!-- TODO: Adapt to Java 9 --> |
| 36 | + <maven.compiler.release>17</maven.compiler.release> |
| 37 | + <maven.compiler.source>${maven.compiler.release}</maven.compiler.source> |
| 38 | + <maven.compiler.target>${maven.compiler.release}</maven.compiler.target> |
32 | 39 | <!-- |
33 | 40 | ~ OSGi and JPMS options |
34 | 41 | --> |
|
40 | 47 | <!-- Optional modules can not be `transitive` --> |
41 | 48 | org.jspecify;transitive=false |
42 | 49 | </bnd-extra-module-options> |
| 50 | + |
| 51 | + <!-- Dependency versions --> |
| 52 | + <log4j.version>3.0.0-SNAPSHOT</log4j.version> |
43 | 53 | </properties> |
44 | 54 |
|
45 | 55 | <dependencies> |
|
60 | 70 | <scope>test</scope> |
61 | 71 | </dependency> |
62 | 72 |
|
63 | | - <dependency> |
64 | | - <groupId>org.hamcrest</groupId> |
65 | | - <artifactId>hamcrest</artifactId> |
66 | | - <scope>test</scope> |
67 | | - </dependency> |
68 | | - |
69 | | - <dependency> |
70 | | - <groupId>junit</groupId> |
71 | | - <artifactId>junit</artifactId> |
72 | | - <scope>test</scope> |
73 | | - </dependency> |
74 | | - |
75 | 73 | <dependency> |
76 | 74 | <groupId>org.apache.logging.log4j</groupId> |
77 | 75 | <artifactId>log4j-async-logger</artifactId> |
|
89 | 87 | <artifactId>log4j-core-test</artifactId> |
90 | 88 | <scope>test</scope> |
91 | 89 | </dependency> |
| 90 | + |
92 | 91 | </dependencies> |
93 | 92 |
|
94 | 93 | <build> |
95 | 94 | <plugins> |
96 | 95 | <plugin> |
97 | 96 | <groupId>org.apache.maven.plugins</groupId> |
98 | 97 | <artifactId>maven-surefire-plugin</artifactId> |
99 | | - <configuration> |
100 | | - <systemPropertyVariables> |
101 | | - <java.awt.headless>true</java.awt.headless> |
102 | | - </systemPropertyVariables> |
103 | | - <argLine>-Xms256m -Xmx1024m</argLine> |
104 | | - <forkCount>1</forkCount> |
105 | | - <reuseForks>false</reuseForks> |
106 | | - </configuration> |
107 | | - <dependencies> |
108 | | - <!-- The `surefire-junit-platform` provider initializes JUL before tests start --> |
109 | | - <dependency> |
110 | | - <groupId>org.apache.maven.surefire</groupId> |
111 | | - <artifactId>surefire-junit47</artifactId> |
112 | | - <version>${surefire.version}</version> |
113 | | - </dependency> |
114 | | - </dependencies> |
115 | 98 | <executions> |
116 | 99 | <execution> |
117 | 100 | <id>default-test</id> |
|
120 | 103 | </goals> |
121 | 104 | <phase>test</phase> |
122 | 105 | <configuration> |
| 106 | + <excludes> |
| 107 | + <exclude>**/AsyncLoggerThreadsTest.class</exclude> |
| 108 | + <exclude>**/CustomLoggerAdapterTest.class</exclude> |
| 109 | + </excludes> |
123 | 110 | <!-- Use custom `j.u.l.LogManager` --> |
124 | 111 | <systemPropertyVariables> |
125 | 112 | <java.util.logging.manager>org.apache.logging.jul.tolog4j.LogManager</java.util.logging.manager> |
126 | 113 | </systemPropertyVariables> |
127 | 114 | </configuration> |
128 | 115 | </execution> |
| 116 | + <execution> |
| 117 | + <id>async-logger-test</id> |
| 118 | + <goals> |
| 119 | + <goal>test</goal> |
| 120 | + </goals> |
| 121 | + <phase>test</phase> |
| 122 | + <configuration> |
| 123 | + <includes> |
| 124 | + <include>**/AsyncLoggerThreadsTest.class</include> |
| 125 | + </includes> |
| 126 | + <!-- Use custom `j.u.l.LogManager` and an asynchronous selector --> |
| 127 | + <systemPropertyVariables> |
| 128 | + <java.util.logging.manager>org.apache.logging.jul.tolog4j.LogManager</java.util.logging.manager> |
| 129 | + <log4j.loggerContext.selector>org.apache.logging.log4j.async.logger.AsyncLoggerContextSelector</log4j.loggerContext.selector> |
| 130 | + </systemPropertyVariables> |
| 131 | + </configuration> |
| 132 | + </execution> |
| 133 | + <execution> |
| 134 | + <id>custom-logger-adapter-test</id> |
| 135 | + <goals> |
| 136 | + <goal>test</goal> |
| 137 | + </goals> |
| 138 | + <phase>test</phase> |
| 139 | + <configuration> |
| 140 | + <includes> |
| 141 | + <include>**/CustomLoggerAdapterTest.class</include> |
| 142 | + </includes> |
| 143 | + <!-- Use custom `j.u.l.LogManager` and a custom adapter --> |
| 144 | + <systemPropertyVariables> |
| 145 | + <java.util.logging.manager>org.apache.logging.jul.tolog4j.LogManager</java.util.logging.manager> |
| 146 | + <log4j.jul.loggerAdapter>org.apache.logging.jul.tolog4j.test.support.CustomLoggerAdapterTest$CustomLoggerAdapter</log4j.jul.loggerAdapter> |
| 147 | + </systemPropertyVariables> |
| 148 | + </configuration> |
| 149 | + </execution> |
129 | 150 | </executions> |
130 | 151 | </plugin> |
131 | 152 | </plugins> |
|
0 commit comments