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 59244 - Warn user when adding folder with JAR files
Summary: Warn user when adding folder with JAR files
Status: NEW
Alias: None
Product: projects
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 4.x
Hardware: All All
: P1 blocker with 1 vote (vote)
Assignee: Tomas Zezula
URL: http://www.netbeans.org/servlets/Read...
Keywords: UI
Depends on:
Blocks: 59245 59246
  Show dependency tree
 
Reported: 2005-05-25 15:13 UTC by zikmund
Modified: 2011-08-31 14:05 UTC (History)
1 user (show)

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 zikmund 2005-05-25 15:13:25 UTC
4.1 FCS

1) Create a library in library manager with a folder containing JAR files
  (do not add JAR files, but their parent directory)
2) JAR files are not used for CC/compilation in Java/Web projects - it confuses
users, see nbusers feedback: 
http://www.netbeans.org/servlets/ReadMsg?list=nbusers&msgNo=53631

SOLUTION: When adding a folder, check it. If it contains JAR files, warn the
user that he/she should add JAR files directly.

Notice: I think that checking only files directly in the directory will be good
enough.
Comment 1 zikmund 2005-05-25 15:22:31 UTC
See similar Java project issue 59245 and Web project issue 59246 - there should
be same warning in project's Properties | Libraries | Add JAR/Folder.
Comment 2 lordpixel 2006-02-07 21:05:28 UTC
The issue is real, but the solution given is completely incorrect.

The right answer is support adding folders of JAR files to the classpath.
Currently the IDE makes a real mess out of this. Consider the following entirely
plausible setup:

some/path/repository/
    ant/ant/
          ant-1.6.jar
    apache/commons-cli/
          commons-cli-1.0.jar
    jboss/hibernate
          <a dozen or so JAR files>

... and so on for 20-30 more 3rd party libraries...

Adding these to the classpath in the IDE for a project or a library in the
library manager is extremely hard. One is forced to navigate one by one into
each folder (all 30 of them in the example above) and control-click each and
every JAR.

Contrast Ant - which solved this problem years ago:

<include path="some/path/repository/**/*.jar"/>

If the user adds a folder full of JAR files to the classpath, we should make it
work. It should mean **/*.jar. It should *not* expand the folder out to be what
it contains at the time it is added  - it should be live, updating as the user
adds and removes items from the foler.