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

Summary: Junit Jars not resolved correctly for maven test sources?
Product: projects Reporter: thomas_s <thomas_s>
Component: MavenAssignee: Milos Kleint <mkleint>
Status: VERIFIED FIXED    
Severity: blocker CC: sustaining
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

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