Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / September 2006

Tip: Looking for answers? Try searching our database.

[ant] Adding exactly one directory to the classpath

Thread view: 
pintman - 01 Sep 2006 09:03 GMT
Hey,

I have some problem adding exactly one directory to the java classpath
using ant. I tried the following lines but got no only the directory
specified but all subdirectories as well.

<path id="project.class.path">
 <fileset dir="${lib.src}" includes="**/*.jar"/>
 <dirset dir="${main.dst}" />
 <dirset dir="${tests.dst}" />
</path>

How is it possible to add exactly one directory to the classpath?

Thanks for any kinds of help!

Greetings,
Marco.
pintman - 01 Sep 2006 09:39 GMT
> I have some problem adding exactly one directory to the java classpath
> using ant. I tried the following lines but got no only the directory
[quoted text clipped - 7 lines]
>
> How is it possible to add exactly one directory to the classpath?

I tried the following exclusion pattern and it did the job. :)

<dirset dir="${main.dst}" excludes="*" />
<dirset dir="${tests.dst}" excludes="*" />

Greetings,
Marco.
pintman - 01 Sep 2006 09:46 GMT
> I tried the following exclusion pattern and it did the job. :)
>
> <dirset dir="${main.dst}" excludes="*" />
> <dirset dir="${tests.dst}" excludes="*" />

Sorry, what I ment was the following pattern. :)

<dirset dir="${main.dst}" excludes="*/**" />
<dirset dir="${tests.dst}" excludes="*/**" />

Greetings,
Marco.
Jacques-Olivier Haenni - 01 Sep 2006 09:46 GMT
Hi,

What about <pathelement path="${main.dst}"/> instead of the <dirset.../> ?

I haven't tested it so I cannot ensure it works as is.

Hope this helps,

Jacques-Olivier

>  
>> I have some problem adding exactly one directory to the java classpath
[quoted text clipped - 17 lines]
> Greetings,
> Marco.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.