apache / apache/netbeans

CoS: Excesive recompilation of classes in Maven project on Windows

Open
#8,898 0 comments 0 reactions 0 assignees View on GitHub
Java kind:bug needs:triage
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 27

### What happened

Java classes are recompiled even when the files don't change. Each `.class` file is modified on visit even when corresponding `.java` file was unchanged for days.

### Language / Project Type / NetBeans Component

Java Maven Web application project

### How to reproduce

1. Compile the project.
2. Enable compile on save.
3. Run in debug mode (from NB).
4. In NB open `ReaderController.java` and then open `ReaderListDTO.java`.
5. Note timestamps on `target\...\ReaderController.class` and `ReaderListDTO.class`.

### Did this work correctly in an earlier version?

No / Don't know

### Operating System

Windows11 x64

### JDK

Java runtime: 21.0.8; OpenJDK 64-Bit Server VM 21.0.8+9-LTS; Tomcat 9, JDK17

### Apache NetBeans packaging

Third-party package

### Anything else

This happens each time I switch IDE tabs. So it seems like NB is just constantly recompiling everything I visit.

I deactivated "User Installed Plugins", restarted NB, but the problem still occurred.

### Are you willing to submit a pull request?

No

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in Apache NetBeans 27 with a Java Maven Web application on Windows 11, using compile on save and debug mode. Open ReaderController.java and ReaderListDTO.java, then compare the timestamps of their target\\...\\*.class files; done means switching IDE tabs no longer recompiles unchanged classes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.