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.

Bug 166655 - Junit Jars not resolved correctly for maven test sources?
Summary: Junit Jars not resolved correctly for maven test sources?
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
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
Exception Reporter:


Attachments

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
http://hg.netbeans.org/main/rev/f35701a0c492

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 http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/f35701a0c492
User: Milos Kleint <mkleint@netbeans.org>
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
v.
Comment 6 pgebauer 2009-07-09 17:24:45 UTC
The fix has been ported into the release67_fixes repository.
http://hg.netbeans.org/release67_fixes/rev/cff1da2a8a06