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.
Summary: | Ignoring 3rd party jar in install dir | ||
---|---|---|---|
Product: | usersguide | Reporter: | Jim Mack <jmack> |
Component: | Ant | Assignee: | John Jullion-ceccarelli <johnjullion> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 3.x | ||
Hardware: | PC | ||
OS: | Windows ME/2000 | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Jim Mack
2003-01-29 19:02:23 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 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. 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>
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. 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. OK. I'm assigning the issue to John to update the Help files with this information. I will do the same on FAQ page. 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. closed |