Bug 137111 - classpath collision for separate src / test directories
Summary: classpath collision for separate src / test directories
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-17 19:44 EDT by jieryn CLA
Modified: 2006-04-17 19:46 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jieryn CLA 2006-04-17 19:44:16 EDT
I prefer to keep my jUnit tests in a separate directory structure which mirrors the source directory layout exactly. I also prefer to keep the name of the jUnit testcase the same as the class name which it is testing. I find this layout to be extremely intuitive and easy to maintain; since each test is kept outside the product itself, I can easily package up a product w/out having to include my tests. By keeping a separate classpath for the src and test directories (in fact, the test is identical to the src except that it includes itself) I can maintain this logical split but keep all the benefits of having the tests inside the same package as their counterparts but without cluttering up my real src directory as well as allowing for the src and test filename to be duplicated without filesystem collisions.

Recent online discussion has validated that others also would prefer this hierarchy. Unfortunately, when both src and test directories are added into the classpath Eclipse correctly errors that the type [classname] is already defined.

Thank you for a great product!
Comment 1 jieryn CLA 2006-04-17 19:46:22 EDT
I should have added, that a minimal fix for this would also include the ability to configure what type of error/warn/ignore message should be posted into the Problem panel.