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 / General / June 2006

Tip: Looking for answers? Try searching our database.

ant question

Thread view: 
chunji08@gmail.com - 15 Jun 2006 06:34 GMT
In ant build.xml file , is there a way  that I may  just give one java
file name, all its depends java files are also excluded from being
built ?

If possible, could you give an example to do it. ?
Aj-India - 15 Jun 2006 12:39 GMT
Hi,
I hope this is what u wanted. Suppose u have a folder consisting of
java files and u only want one of them say"A.java" to be compiled, u
can use the include attribute.

Cheers,

Ajit

<property name="src.dir" value="com"/>
<target name="Compile" depends="" description="Compile Java Files">
<javac srcdir="${src.dir}/java/src" destdir="${src.dir}/build/classes"
debug="${javac.debug}" optimize="${javac.optimize}" nowarn="on"
includes="**/A.java">

</javac>
</target>

> In ant build.xml file , is there a way  that I may  just give one java
> file name, all its depends java files are also excluded from being
> built ?
>
> If possible, could you give an example to do it. ?
Aj-India - 15 Jun 2006 12:49 GMT
Hi,
I hope this is what u wanted. Suppose u have a folder consisting of
java files and u only want one of them say"A.java" to be compiled, u
can use the include attribute.

Cheers

Aj

<property name="src.dir" value="com"/>
<target name="Compile" depends="" description="Compile Java Files">
<javac srcdir="${src.dir}/java/src" destdir="${src.dir}/build/classes"
debug="${javac.debug}" optimize="${javac.optimize}" nowarn="on"
includes="**/A.java">

</javac>
</target>

> In ant build.xml file , is there a way  that I may  just give one java
> file name, all its depends java files are also excluded from being
> built ?
>
> If possible, could you give an example to do it. ?
chunji08@gmail.com - 15 Jun 2006 19:38 GMT
> Hi,
> I hope this is what u wanted. Suppose u have a folder consisting of
[quoted text clipped - 13 lines]
> </javac>
> </target>

That would be a easy case.
But what happen for these java files that depends on A.java, but not in
the same dir as A.java ?
And the files that are in the same dir as A.java, but  not  depend on
A.java ?


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.