You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by pk...@apache.org on 2023/12/27 08:11:35 UTC
(logging-log4j2) 08/16: Delete generated module descriptors before recompilation
This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 60461ea2dfa573ffb37470ed4b9e67664701a01c
Author: Piotr P. Karwasz <pi...@karwasz.org>
AuthorDate: Fri Dec 22 12:53:32 2023 +0100
Delete generated module descriptors before recompilation
---
log4j-parent/pom.xml | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/log4j-parent/pom.xml b/log4j-parent/pom.xml
index 2cc5c583da..d99f4829be 100644
--- a/log4j-parent/pom.xml
+++ b/log4j-parent/pom.xml
@@ -1131,6 +1131,36 @@
</pluginManagement>
<plugins>
+
+ <!--
+ ~ A previous `generate-module-descriptors` execution leaves `target/classes/module-info.class` files.
+ ~ These interfere with the way the `maven-compiler-plugin` works.
+ -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clean-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>delete-module-descriptors</id>
+ <goals>
+ <goal>clean</goal>
+ </goals>
+ <phase>process-sources</phase>
+ <configuration>
+ <excludeDefaultDirectories>true</excludeDefaultDirectories>
+ <filesets>
+ <fileset>
+ <directory>${project.build.outputDirectory}</directory>
+ <includes>
+ <include>module-info.class</include>
+ </includes>
+ </fileset>
+ </filesets>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
<!--
~ Some external logging bridges can interfere with our tests, giving false negatives.
-->
@@ -1167,6 +1197,7 @@
</execution>
</executions>
</plugin>
+
</plugins>
</build>