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.
I have a few projects that are setup and build with maven. One of these (my serverframework) contains a test framework and some test packages that are used by the other projects. The test stuff is located in the src\test\java.. folder and is not included in the normal serverframework.jar, but in the serverframework-test.jar. My other project has a normal dependency to the serverframework, as well as a dependency to the serverframework-test.jar as the testframework herein is used in this project as well. <dependency> <groupId>xx</groupId> <artifactId>serverframework</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>xx</groupId> <artifactId>serverframework</artifactId> <version>${project.version}</version> <type>test-jar</type> <scope>test</scope> </dependency> This work just fine when compiling and running tests on the projects that has dependencies to the serverframework. The problem is that in the java editor all references in the refering project to the classes in the testframework in the serverframework is marked as errors. This can be explained by the editor using the maven artifact from the first dependency. However, as this is a class in the test packages, i would suppose that the editor used the <scope>test</scope> artiface, which is containing the classes refered. I think this issue has been introduced within the last couple of weeks (i see it now in 201210020001, and have also seen it in 201209260001 and 201209220001. Before that i did not get these errors.
http://hg.netbeans.org/core-main/rev/250830750095 after a rewrite we handled all GAV artifacts in local repo equally. Now only the main artifact is considered for main sources mapping and the "tests" classifier artifact for test source roots. Other classifiers are ignored and served from local repository only
Integrated into 'main-golden', will be available in build *201210070002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/250830750095 User: Milos Kleint <mkleint@netbeans.org> Log: #219453 dependency's "tests" classifier needs proper handling (redirect to test rather than main sources of the project in question. Other artifacts with classifier are to be left unconnected and only content from local repository is used.
*** Bug 221320 has been marked as a duplicate of this bug. ***
*** Bug 221125 has been marked as a duplicate of this bug. ***