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 254172 - Add Project to Test Libraries should offer it's test dir
Summary: Add Project to Test Libraries should offer it's test dir
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-06 11:50 UTC by ulfzibis
Modified: 2015-08-06 13:25 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 ulfzibis 2015-08-06 11:50:11 UTC
[ JDK VERSION : 1.7.0_67 ]

STEPS:
   * Open dialog Test Libraries Properties
   * Add Project ...

ACTUAL:
   Only project's JAR is offered

EXPECTED:
   Additionally project's test folder should be offered
   It should create a reference like:
   file.reference.test-classes=${project.ABC}/test

WORKAROUND:
   Use Add Folder, but it creates a different reference like:
   file.reference.test-classes=../../foo/bar/ABC/test
Comment 1 ulfzibis 2015-08-06 11:51:26 UTC
Build 201508011000
Comment 2 Tomas Zezula 2015-08-06 12:12:20 UTC
The required changes:
1st) The projects AntArtifactProvider will need to provide both dist/<name>.jar but also build/test/classes.  - easy to do

2nd) Project build-impl.xml will need to be changed to build the dependent tests before its own tests. Probably the AntArtifact should be dist/<name>-tests.jar rather than build/test/classes as it's impossible to do timestamp check on the folder.

3rd) The AntArtifactChooser in Add Project will need some improvement, currently it will show just dist/<name>.jar and dist<name>-test.jar which may be not very informative to the user. At least tool tip should be added.
Comment 3 ulfzibis 2015-08-06 13:25:28 UTC
(In reply to Tomas Zezula from comment #2)
> 1st) The projects AntArtifactProvider will need to provide both
> dist/<name>.jar but also build/test/classes.  - easy to do
Better provide test because of bug 246374 comment 7

> 2nd) Project build-impl.xml will need to be changed to build the dependent
> tests before its own tests. Probably the AntArtifact should be
> dist/<name>-tests.jar rather than build/test/classes as it's impossible to
> do timestamp check on the folder.
I'm not sure if it's appropriate to add <name>-tests.jar to the dist folder by default - users may not always like to distribute the test binaries, maybe only by option.

> 3rd) The AntArtifactChooser in Add Project will need some improvement,
> currently it will show just dist/<name>.jar and dist<name>-test.jar which
> may be not very informative to the user. At least tool tip should be added.
I ever was fine with dist/<name>.jar, but instead dist/<name>-test.jar, just folder test should be offered.