Skip to content

[MCOMPILER-569] Plugin doesn't exclude module-info #778

Closed

Description

@jira-importer

Pavel_K opened MCOMPILER-569 and commented

The following code must exclude maven-info file.

<plugin>
     <artifactId>maven-compiler-plugin</artifactId>
     <version>3.11.0</version>
     <configuration>
         <source>${maven.compiler.source}</source>
         <target>${maven.compiler.target}</target>
         <excludes>
             <exclude>**/module-info.java</exclude>
         </excludes>
     </configuration>
 </plugin>

However, plugin compiles module-info and adds module-info.class to jar file


Affects: 3.11.0

Activity

  1. added
    bug
    priority:major
    on Jun 16, 2025
  2. wilx commented on Jul 28, 2026

    @wilx
    Contributor

    The filter itself works. But javac finds the source via dir search and compiles it anyway. It can be prevented via <implicit>none</implicit> option.

  3. desruisseaux commented on Jul 29, 2026

    @desruisseaux
    Contributor

    Is this issue specific to Compiler Plugin 3.x, or does it occurs also on 4.x?

  4. wilx commented on Jul 29, 2026

    @wilx
    Contributor

    Is this issue specific to Compiler Plugin 3.x, or does it occurs also on 4.x?

    Since the behaviour is part of javac, it does happen with 4.x m-c-p as well.

  5. desruisseaux commented on Jul 29, 2026

    @desruisseaux
    Contributor

    So I guess that the fix would be to port #1092 to master.

  6. wilx commented on Jul 29, 2026

    @wilx
    Contributor

    Yes.

  7. added a commit that references this issue on Jul 29, 2026
  8. desruisseaux commented on Jul 29, 2026

    @desruisseaux
    Contributor

    Closing since this issue is now covered by #1092 and #1095.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:major

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions