Skip to content

Clean-up target/classes directory before compilation #90

Description

@ppkarwasz

The javac compiler starts behaving differently if it finds module-info.class file from a previous compilation in the target directory: it tries to resolve the modules, but it fails since the module jars are on the classpath, not the modulepath:

error: module not found: org.apache.logging.log4j

Therefore we need to use a clean execution before each compile execution that will delete that file.

Activity

  1. ppkarwasz commented on Jan 5, 2024

    @ppkarwasz
    MemberAuthor

    A minimal reproducible example of the bug can be found here:

    https://github.com/copernik-eu/bug-reproducibility/tree/main/javac-module-info-bug

  2. added this to the 10.6.0 milestone on Jan 10, 2024
  3. ppkarwasz commented on Jan 16, 2024

    @ppkarwasz
    MemberAuthor

    Apparently it is not a bug, it is a feature: https://bugs.openjdk.org/browse/JDK-8323757

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions