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 148762 - Warn about project which mixes primary sources and tests
Summary: Warn about project which mixes primary sources and tests
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Eclipse project importer (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@projects
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-30 16:00 UTC by Jesse Glick
Modified: 2016-07-07 08:38 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2008-09-30 16:00:46 UTC
If an Eclipse project has both regular sources and unit tests in the same root, we cannot import it well:

1. Importing as a regular source root means tests will be uncompilable unless junit.jar is added to CP, cannot be run as
tests in any case, and may be incorrectly packaged into the final app.

2. Importing as a test root means you cannot run any main classes, make a normal JAR, etc.

If the project is detected as containing unit tests in all source roots, we should perhaps abort the import with a
message asking the user to refactor the project in Eclipse to use separate source roots.
Comment 1 Jesse Glick 2009-06-09 20:42:50 UTC
You can now run main classes from a test root. You would still not be able to make a JAR from it though.
Comment 2 Martin Balin 2016-07-07 08:38:03 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss