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 18962 - ANT module doesn't respect project classpath
Summary: ANT module doesn't respect project classpath
Status: RESOLVED FIXED
Alias: None
Product: usersguide
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: John Jullion-ceccarelli
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-12-31 03:49 UTC by _ gtzabari
Modified: 2002-02-22 16:21 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 _ gtzabari 2001-12-31 03:49:25 UTC
dev build 200112240100

I'm going to paste the original report off the newsgroup:

------begin---------
Gili wrote:

> Hi,
> 
> 	I downloaded openlimewire (off limewire.org) and 
> tried building the sources using the Ant script provided. The 
> problem I run into is that certain files won't compile, claiming 
> "com.sun.java.util.collections.*" is undefined when in fact this 
> package is mounted off FileSystems in the form of a JAR. 
> How come I can manually compile these files (going into 
> them one by one and hitting COMPILE) but Ant can't seem to 
> see mounted JARs?
> 
> Gili
> 
> 
> 

I see the same behavior.  The netbeans help doesn't match what the ide 
actually does.  I think you have to explicitly add something like this 
to the classpath of the javac element of the build script if you want 
the filesystems included:

<classpath>
     <pathelement path="${netbeans.filesystems.path}"/>
</classpath>
------end-------
Comment 1 Milan Kubec 2002-01-02 10:29:39 UTC
Yes, you are right, ant doesn't use repository classpath by default,
in other words if you need some jar files for compilation you should
include them all in javac task. Otherwise your project rely on some
arbitrary jar files on your system classpath. If you use
${netbeans.filesystems.path} please note that such script depends on IDE.
Comment 2 _ gtzabari 2002-01-02 11:52:27 UTC
Ok, but this issue is still valid right? :)
Comment 3 Milan Kubec 2002-01-02 12:39:23 UTC
I don't think so, it's the way how it works. I'd like Jesse to express
his opinion.
Comment 4 Jesse Glick 2002-01-04 16:47:54 UTC
AFAIK the module does what it is supposed to do here, so this would be
a documentation issue. Yes

<classpath>
<pathelement path="${netbeans.filesystems.path}"/>
</classpath>

is correct, if you in fact want to use the Filesystems mounts as part
of your Ant classpath (as Milan says this makes your script
nonportable outside the NB project, but if that is what you want, this
is how to do it). Does the online help not say to do that? I was under
the impression it did, but perhaps not.
Comment 5 Patrick Keegan 2002-01-04 17:02:12 UTC
John, could you please look at this?
Comment 6 John Jullion-ceccarelli 2002-01-10 21:02:12 UTC
Too late to add a new Help file to deal with this topic, I'll 
document it for 3.4.
Comment 7 John Jullion-ceccarelli 2002-02-22 16:21:28 UTC
Better ant classpath documentation in trunk.