This is an automated email from the ASF dual-hosted git repository.

pkarwasz pushed a commit to branch release/2.22.1
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/release/2.22.1 by this push:
     new 462225d3ed Delete generated module descriptors before recompilation
462225d3ed is described below

commit 462225d3eda26520424a49ce670f2dd0f4356566
Author: Piotr P. Karwasz <[email protected]>
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>
 

Reply via email to