ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hawkins, Keith" <KHawk...@us.nomura.com>
Subject RE: javac
Date Mon, 10 Feb 2003 18:04:00 GMT

Stacy,

If you use the destdir attribute to the javac ant desk, you will get your
desired results.

<javac srcdir="${src.dir"} destdir="${build.dir.classes}" />

-Keith


-----Original Message-----
From: Yoshimitsu, Stacy D. [mailto:SYOSHIMITSU@northropgrumman.com]
Sent: Monday, February 10, 2003 12:57 PM
To: 'user@ant.apache.org'
Subject: javac


All,

Is it possible for Ant to compile all *.java in the ${src.dir} and place the
*.classes in the ${build.dir.classes}, but save the directory path?  For
example:


${src.dir} would contain the following directory structures:
--------------------------------------------------------------------------
src/
    com/a/
	 a2.java
	 a1.java
          b/
	b1.java
	b2.java
          c/cc
	    /cc1.java
	    cc2.java


After the compilation (javac), the ${build.dir.classes} directory will
contains the same directory structure as the src with the classes files in
it:
----------------------------------------------------------------------------
-
classes/
           com/a/
	         a2.class
	         a1.class
                b/
	       b1.class
	       b2.class
                  c/cc/
	    	cc1.class
	   	cc2.class
	

I'm new to Ant and was wondering if that's the way to go for writing the
build script.  If so, then how do we write that in a build script?  I bought
2 Ant books, but am still not able to figure out how to write it in the
build.xml.

Thanks,

Stacy 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
-----  This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. If
you receive this message in error, please delete it and all copies from your
system, destroy any hard copies and notify the sender. You must not,
directly or indirectly, use, disclose, distribute, print, or copy any part
of this message if you are not the intended recipient. Nomura Holding
America Inc., Nomura Securities International, Inc, and their respective
subsidiaries each reserve the right to monitor all e-mail communications
through its networks. Any views expressed in this message are those of the
individual sender, except where the message states otherwise and the sender
is authorized to state the views of such entity. Unless otherwise stated,
any pricing information in this message is indicative only, is subject to
change and does not constitute an offer to deal at any price quoted. Any
reference to the terms of executed transactions should be treated as
preliminary only and subject to our formal written confirmation.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message