Skip to content

Commit 462225d

Browse files
committed
Delete generated module descriptors before recompilation
1 parent 7d98af1 commit 462225d

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

log4j-parent/pom.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,6 +1131,36 @@
11311131
</pluginManagement>
11321132

11331133
<plugins>
1134+
1135+
<!--
1136+
~ A previous `generate-module-descriptors` execution leaves `target/classes/module-info.class` files.
1137+
~ These interfere with the way the `maven-compiler-plugin` works.
1138+
-->
1139+
<plugin>
1140+
<groupId>org.apache.maven.plugins</groupId>
1141+
<artifactId>maven-clean-plugin</artifactId>
1142+
<executions>
1143+
<execution>
1144+
<id>delete-module-descriptors</id>
1145+
<goals>
1146+
<goal>clean</goal>
1147+
</goals>
1148+
<phase>process-sources</phase>
1149+
<configuration>
1150+
<excludeDefaultDirectories>true</excludeDefaultDirectories>
1151+
<filesets>
1152+
<fileset>
1153+
<directory>${project.build.outputDirectory}</directory>
1154+
<includes>
1155+
<include>module-info.class</include>
1156+
</includes>
1157+
</fileset>
1158+
</filesets>
1159+
</configuration>
1160+
</execution>
1161+
</executions>
1162+
</plugin>
1163+
11341164
<!--
11351165
~ Some external logging bridges can interfere with our tests, giving false negatives.
11361166
-->
@@ -1167,6 +1197,7 @@
11671197
</execution>
11681198
</executions>
11691199
</plugin>
1200+
11701201
</plugins>
11711202
</build>
11721203

0 commit comments

Comments
 (0)