Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 166655 - Junit Jars not resolved correctly for maven test sources?
Junit Jars not resolved correctly for maven test sources?
Product: projects
Classification: Unclassified
Component: Maven
All All
: P3 (vote)
: 6.x
Assigned To: Milos Kleint
Depends on:
  Show dependency treegraph
Reported: 2009-06-05 23:25 UTC by thomas_s
Modified: 2009-07-20 14:47 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description thomas_s 2009-06-05 23:25:51 UTC
Hope, the summary isn't missleading, as it isn't entirely clear, that it is the test classpath, it might as well be a
problem with the parser.

What I did:
Installed the OS independent Version of NB 6.5, 6.7Beta, 67.rc1

Checked Out Apache Commons Collections from Head
Opend it from Netbeans as a maven project (yes, there _is_ a pom.xml)

While the project actually builds OK, the IDE flags all invokations of assertEquals() as 'unknown' in the source.
Comment 1 Milos Kleint 2009-06-08 12:08:59 UTC
confirmed, still not sure about why it happens, could be related to the location of test sources in src/test..
Comment 2 Milos Kleint 2009-06-08 12:18:42 UTC
more likely to be caused by the resource definition in parent pom that sets the resource root at ${basedir}. it will be
added on source path for sources and the test sources have that one prepended (thus the sources are compiled with wrong
packages). We should have include/exclude patterns on the classpath's resources, but we don't take them into
consideration now.

Comment 3 Milos Kleint 2009-06-09 08:51:30 UTC

it seems the java subsystem has problems dealing with overlapping source roots, unfortunately there's no other way than
remove such resource root (${basedir}) from the SourceForBinary query results. Hopefully won't break other stuff...
Comment 4 Quality Engineering 2009-06-11 08:47:58 UTC
Integrated into 'main-golden', will be available in build *200906110201* on (upload may still be in progress)
User: Milos Kleint <>
Log: #166655 check that the resource root doesn't contain any other source roots, in case it does, skip it to prevent complation errors down the road
Comment 5 Jaroslav Pospisil 2009-07-02 13:47:30 UTC
Comment 6 pgebauer 2009-07-09 17:24:45 UTC
The fix has been ported into the release67_fixes repository.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo