You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Olivier Lamy (Jira)" <ji...@apache.org> on 2022/07/22 07:55:00 UTC

[jira] [Updated] (MCOMPILER-498) Recompilation when class name doesn't match file name

     [ https://issues.apache.org/jira/browse/MCOMPILER-498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy updated MCOMPILER-498:
-----------------------------------
    Priority: Minor  (was: Major)

> Recompilation when class name doesn't match file name
> -----------------------------------------------------
>
>                 Key: MCOMPILER-498
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-498
>             Project: Maven Compiler Plugin
>          Issue Type: Bug
>            Reporter: T3rm1
>            Priority: Minor
>
> The compiler plugin detects a file as stale whenever the class defined inside has a different name than the file.
> Steps to reproduce:
> Create a file named {{SpecialTest.java}} in directory {{{}foo{}}}.
> Paste in following content:
> {code:java}
> package foo;
> class UncommonTest {
> }
> class CommonTest {
> } {code}
> Run {{mvn -X test-compile}}
> It'll report on each invocation: {{[DEBUG] Stale source detected: F:\Git\bug\src\test\java\foo\SpecialTest.java}}
> That's because the plugin is looking for a fileĀ {{{}SpecialTest.class{}}}.
> This is a problem because it can easily happen that you have a typo in your class or file name so that they don't match.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)