This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Occasionally, the Add Module Dependency dialog creates the dependency but, for whatever reason, leaves the <build-prerequisite/> and <compile-dependency/> tags out of the project.xml entry. The effect is that that dialog (of course I mean the one from right-clicking the project/Properties/Libraries/Add Dependency) is the only place that believes that there is a build dependency but the IDE will inexplicably disregard attempts to import classes, etc. I haven't been able to find exactly what conditions cause the bug but they must be fairly random since removing and readding the dependency almost always fixes the problem. I can't provide a decent repro for this reason but I'm hoping that it happens to others as often as it happens to me (about 40% of the time) and this isn't a surprise. I've just dealt with it in the 6.1 distribution but I have previously seen it in 6.0 and 6.0RC1. It happens regardless if the project dependency is from the platform or from my module suite.
reassign to project module for evaluation
I've discovered that the issue is with defining a module A but making none of its packages public and then declaring module B's dependency on A. This adds module A as a run-only dependency (the build-prerequisite and compile-dependency tags are omitted). Then, declaring module A's packages public does not establish the connection. Expected behavior (from where I sit) is that the build and compile dependency is always there (even if no public packages are exposed) or that the UI will distinguish between the types of dependency the way that it does with non-Netbeans-Platform Java projects.
The behavior is as designed; it is meaningless to have a compile dep on a module which does not expose any packages to you. It could be useful to specially mark the runtime-only deps (Java SE projects do not show them in Libraries at all and have a separate tab for them in Classpath).
+1 to show runtime deps somewhere, probably on separate tab in Properties > Libraries. Also for test deps. If time permits.