[MCOMPILER-498] Recompilation when class name doesn't match file name
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- java
- Domain
- build-system
Research direction
Reproduce the report with SpecialTest.java containing UncommonTest and CommonTest, then run mvn -X test-compile twice. Inspect the compiler plugin's stale-source detection entry point and verify that a second invocation no longer reports SpecialTest.java as stale solely because its filename does not match a contained class.
Written by the indexing model from the issue text.
Description
T3rm1 opened MCOMPILER-498 and commented
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:
package foo;
class UncommonTest {
}
class CommonTest {
}
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.
No further details from MCOMPILER-498
- Dominant language
- Java
- Stars
- 261
- Forks
- 194
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 17
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/maven-compiler-plugin
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
apache/maven-compiler-plugin#1148 · 2 comments ·
Maintainers usually reply within 1 day
-
3.x bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
apache/maven-compiler-plugin#1140 · 1 comment ·
Maintainers usually reply within 1 day
-
3.x enhancement
Difficulty 3/5 1-2 days Newbie friendliness 68/100
apache/maven-compiler-plugin#1138 ·
Maintainers usually reply within 1 day
-
3.x bug
Difficulty 4/5 3-5 days Newbie friendliness 64/100
apache/maven-compiler-plugin#1137 ·
Maintainers usually reply within 1 day
-
3.x bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
apache/maven-compiler-plugin#1124 · 1 comment · 3 reactions ·
Maintainers usually reply within 1 day
All issues in apache/maven-compiler-plugin
Similar issues
-
enhancement good first issue
Difficulty 2/5 Half a day Newbie friendliness 66/100
apache/fineract-consumer-facing#175 ·
Maintainers usually reply within 1 day
-
[BUG] 订单:会员凭订单号即可取消其他会员的待付款订单(取消接口不校验订单归属)Possibly taken @dadiyang claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
macrozheng/mall#1016 ·
-
[Bug] The producer summary counts an unreported client version as a second version and warns about a version mixPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
apache/rocketmq-dashboard#6110 ·
Maintainers usually reply within 4 days
-
Feature:Resolution
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
intellij-elixir/intellij-elixir#4396 ·
Maintainers usually reply within 1 day
-
Python 3.15 supportPossibly taken @amnesiaof claimed this today. OpenL: python L: python:uv
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
dependabot/dependabot-core#16524 · 1 comment ·
Maintainers usually reply within 1 day