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.
[ BUILD # : 6.0 Beta 2 ] [ JDK VERSION : 1.6.0_03 ] This seems to be an issue specifically with Java 6 since its not an issue when running netbeans with Java 5. I have a project A that depends on project B. B uses some external libraries and includes them with a jar reference. For this case let's use javamail's mail.jar I have the projects not excluding .java files because of a different project that uses these libraries needs the .java files available. When project A tried to build, it fails printing out errors about missing java mail libraries. If you build B by itself, it build fine. If you build A twice, the second time it builds fine. This makes no sense. No code changed, why builds fine the 2nd time and not the first? I will attach a set of 2 projects I through together that illustrate this example. Trying to build JavaLibrary1 by itself works fine. Clean & build JavaLibrary2 and it fails the first time. Then build JavaLibrary2 again and it builds fine. This is a big nuisance for us.
Created attachment 51806 [details] 2 java libraries that shows the problem
Sorry, my attached project does not compile correctly the 2nd time but my actual project does but you can see the problem with this still. Open up JavaLibrary1, add "**/*.java" to the excludes. Clean & Build JavaLibrary2, it builds perfect. Open up JavaLibrary1, remove "**/*.java" from the exludes. Clean & Build JavaLibrary2, build error. Why would including .java files mess up the build?
I tested your attached projects with a current dev build. (There have been various changes in Java SE project build scripts recently, including after beta 2, so test with nightlies please.) JL2 compilation fails because it is missing commons-logging.jar. When I add that to the JL2 classpath, it is fine. See issue #47507. *** This issue has been marked as a duplicate of 47507 ***
I downloaded 20071024 same issue. Even created a new set of test projects. Did you follow my steps? I do not believe this is the same issue as #47507. The projects build fine. Then I modify JL1's packaging to only have: "**/*.form" (removing the **/*.java potion). Clean & Build again and it fails. Put back **/*.java, Clean & Build works fine. remove it again, fails etc. I do not think that JL2 should need to have common-loggings as a compile dependency, only JL1. Obviously runtime is a different story. Please closely consider that this whole bug is about including the .java files, with them excluded everything is fine. If you still think this is related to the other bug then I'll understand.
Please start over and provide _exact_ steps to reproduce - all required files in a single new ZIP, exact actions taken to the level of menu items selected. When I tried to open your projects as attached, (1) I needed to first add commons-logging.jar to the classpath of JL1 to resolve a broken reference (this should not happen if you bundle it inside the project as NB should then be referring to it with a relative path); (2) building JL2 without making any configuration changes failed, saying that the .java files inside jl1.jar were uncompilable (I have never seen such an error message from javac before but apparently it is possible) due to missing commons-logging.jar, which was resolved when I added c-l.jar to JL2's classpath as well. Due to issue #47507, the presence of c-l.jar in JL1's classpath does not imply that it is accessible during compilation of JL2 - it needs to be explicitly added, to either the compile-time or runtime CP, if it is wanted. When you include *.java in jl1.jar javac run on jl2/src apparently tries to compile these sources also (this is not NB's doing) and it fails when c-l.jar is unavailable. So you need to provide more detailed instructions to see what actually you are talking about.
closing as invalid, no information provided by the reporter since October. please reopen with the relevant information attached. Thanks.