I encounter the same problems with NetBeans 8.0 patch 1.1
Also some class not found errors appear in the new version.
It seems that NetBeans remember, that I had some project opened and it tries to search the compiled classes in its directory, instead of using the JAR from Maven repository.
This is extremely painful, when you sometimes open source code of some commonly used project like Hibernate ORM - I definitely don't want NetBeans to try using compiled classes from a local copy.
+++ This bug was initially created as a clone of Bug #237528 +++
Compile of Save feature is used, even if the project of my Maven dependency is closed
Steps to Reproduce:
0) Enable compile on save (default from NB 7.4)
1) Have three open projects (one App & two dependencies - dependencyA, dependencyB)
2) Run App from IDE (compile on save is used, classes from dependencyA/target/classes & dependencyB/target/classes are used)
3) Close dependencyB project
4) Run App from IDE
Compile on save is used, classes from dependencyA/target/classes & dependencyB/target/classes are used
Only classes from dependencyA/target/classes are used, dependencyB is downloaded from Maven repository (either local or remote).
Imagine that you have many projects, in different Git repositories. You are actively developing only small subset of them. But sometimes you need to fix some library, that you aren't developing so often, so you clone its Git, open it, fix it and close it. The library then lives its own life, you aren't even pulling its changes from its Git. After some time, weird NoClassDefFound errors may occur, when running App, and they dissappear, when you pull the dependency changes and build it inside IDE.
Build Date & Hardware:
Product Version: NetBeans IDE 7.4 (Build 201310111528)
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
i was able to reproduce as described in the scenario above but only with 7.4 (maven 2.86.1).
After running an update (maven 2.86.3) the problem was gone and neither did it appear in 8.0 (1.1, maven 2.103.1) or in the current daily builds.
there seems to be more to the issue.
please check the version of the maven module in the builds where you are able to reproduce
what kind of maven projects are we talking about - plain java projects, or maybe a web app ?
any update on this?