> A previous `generate-module-descriptors` execution leaves
> `target/classes/module-info.class` files. These interfere with
> the way the `maven-compiler-plugin` works.

Piotr, could you elaborate on this interference? What exactly is the
problem we are trying to address here?

I have the impression we are working around a `maven-compiler-plugin` bug.
If it is so, is there also an associated `m-c-p` ticket?

On Sat, Dec 30, 2023 at 3:33 PM <pkarw...@apache.org> wrote:

> This is an automated email from the ASF dual-hosted git repository.
>
> pkarwasz pushed a commit to branch main
> in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
>
> commit 7117838e7b973c4c150365678149138b642cd672
> Author: Piotr P. Karwasz <piotr.git...@karwasz.org>
> AuthorDate: Fri Dec 22 12:53:32 2023 +0100
>
>     Delete generated module descriptors before recompilation
> ---
>  log4j-parent/pom.xml | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>
> diff --git a/log4j-parent/pom.xml b/log4j-parent/pom.xml
> index f024dceb36..8866501c47 100644
> --- a/log4j-parent/pom.xml
> +++ b/log4j-parent/pom.xml
> @@ -932,6 +932,35 @@
>
>      <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>
> +
>        <plugin>
>          <groupId>org.apache.maven.plugins</groupId>
>          <artifactId>maven-surefire-plugin</artifactId>
>
>

Reply via email to