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 30490 - Ignoring 3rd party jar in install dir
Summary: Ignoring 3rd party jar in install dir
Status: VERIFIED FIXED
Alias: None
Product: usersguide
Classification: Unclassified
Component: Ant (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: John Jullion-ceccarelli
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-29 19:02 UTC by Jim Mack
Modified: 2005-07-15 07:44 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Mack 2003-01-29 19:02:23 UTC
Running JDK 1.4.1_01, Windows 2000, and 
recently upgrade to 3.4.1, overwrote 3.4. An 
Ant task started failing.

It is looking for netcomponents.jar, which is 
in D:\NetBeans\3.4\modules\patches\org-apache-
tools-ant-module (install directory). The ant 
script has not changed and worked under 3.4. 

I was able to workaround the problem by moving 
netcomponents.jar to userdir, F:\netbeans\3.4
\modules\patches\org-apache-tools-ant-module 
and the Ant script worked as expected. 

I can reproduce the results by moving 
netcomponents.jar between the install and user 
directories.
Comment 1 Jim Mack 2003-01-29 19:03:57 UTC
Ant task failed with the following message:

java.lang.NoClassDefFoundError: 
com/oroinc/net/ftp/FTPClient
    at 
org.apache.tools.ant.taskdefs.optional.net.FTP.
execute(FTP.java:917)
    at org.apache.tools.ant.Task.perform
(Task.java:319)
    at org.apache.tools.ant.Target.execute
(Target.java:309)
    at org.apache.tools.ant.Target.performTasks
(Target.java:336)
    at 
org.apache.tools.ant.Project.executeTarget
(Project.java:1306)
    at 
org.apache.tools.ant.taskdefs.Ant.execute
(Ant.java:371)
    at 
org.apache.tools.ant.taskdefs.CallTarget.execut
e(CallTarget.java:143)
    at org.apache.tools.ant.Task.perform
(Task.java:319)
    at org.apache.tools.ant.Target.execute
(Target.java:309)
    at org.apache.tools.ant.Target.performTasks
(Target.java:336)
    at 
org.apache.tools.ant.Project.executeTarget
(Project.java:1306)
    at 
org.apache.tools.ant.taskdefs.Ant.execute
(Ant.java:371)
    at 
org.apache.tools.ant.taskdefs.CallTarget.execut
e(CallTarget.java:143)
    at org.apache.tools.ant.Task.perform
(Task.java:319)
    at org.apache.tools.ant.Target.execute
(Target.java:309)
    at org.apache.tools.ant.Target.performTasks
(Target.java:336)
    at 
org.apache.tools.ant.Project.executeTarget
(Project.java:1306)
    at 
org.apache.tools.ant.Project.executeTargets
(Project.java:1250)
    at 
org.apache.tools.ant.module.run.TargetExecutor.
run(TargetExecutor.java:294)
    at 
org.netbeans.core.execution.RunClassThread.run
(RunClassThread.java:119)
BUILD FAILED
Comment 2 Jesse Glick 2003-01-29 19:52:12 UTC
patches/org-apache-tools-ant-module/*.jar must always be located
relative to the ant.jar (NB Ant module) that you are actually using -
which may be either in your install or user dir, depending on whether
you got the Ant module in your NB distro or from Auto Update.
Comment 3 Jim Mack 2003-01-29 23:13:22 UTC
I reopened this and changed the subcomponent 
to documentation because this "feature" is not 
clearly documented. The faq has no mention of 
it and the online help is wrong. Please update 
both.

From IDE Core Help ->Building With Ant-
>Optional Ant Tasks
<snip>
"The Ant integration module includes Ant's 
optional.jar file. These tasks are mostly 
optional because they require special 
libraries not shipped with Ant (and generally 
not shipped with the IDE either). If you need 
some of these tasks, download the extra 
libraries and place the JAR files in the 
modules/patches/org-apache-tools-ant-module/ 
directory of your IDE install directory."
</snip>


Very misleading, from IDE Core Help->Building 
With Ant->Using Custom Ant Tasks->Ant 
Classpath and Custom Tasks

<snip>
"If you cannot declare a classpath in your 
build script, or you are using third-party 
build scripts which you cannot alter, you can 
add the tasks to your 
install_directory/modules/patches/org-apache-
tools-ant-module/ directory. Then choose 
Tools   Options, expand the Building node, and 
select Ant Settings. Then click the ellipsis 
(...) button in the Properties setting and 
delete build.sysclasspath=ignore. All of the 
libraries in this directory are picked up by 
Ant when you run a build script."
</snip>

Comment 4 David Konecny 2003-01-30 10:05:16 UTC
I admit I did not know about this either. Jesse, is it intentional? I
thought that user_dir and install_dir works like layers - everything
from i_d is available in u_d, but u_d can override things from i_d.
Comment 5 Jesse Glick 2003-01-30 18:02:05 UTC
It is intentional - things like Class-Path: ext/foo.jar and
patches/foo.jar do *not* behave at all like layers and the system/ dir
(which is what you were thinking of). In fact you can have extensions
and patches to a module which is not present in either the install or
user dir (just installed in some other random location).

As I mentioned on nbusers recently, the use of
modules/patches/org-apache-tools-ant-module/*.jar can be considered a
short-term workaround for a serious design flaw in Ant 1.x; this is
*not* intended usage for NB modules generally. patches/ dirs are
supposed to be used for hot fixes and development-time testing, not
for end users.
Comment 6 David Konecny 2003-01-31 11:01:35 UTC
OK. I'm assigning the issue to John to update the Help files with this
information. I will do the same on FAQ page.
Comment 7 John Jullion-ceccarelli 2003-02-06 11:41:53 UTC
I added a note to both Optional Ant Tasks and Ant Classpath and Custom
Tasks. Please verify that it's correct or reopen if it's wrong.
Comment 8 Marian Mirilovic 2005-07-15 07:44:04 UTC
closed