Hi everybody,
How can I preserve the directory structure and store class files? This is what I want:
+source
| build.xml
| +com
| +bge
| +eCare
| +staff
| someClass.java
| +ejb
| Staff.java
| StaffEJB.java
| StaffHome.java
+build
| +com
| +bge
| +eCare
| +staff
| SomeClass.class
| +ejb
| Staff.class
| StaffEJB.class
| StaffHome.class
Ideally, I want to compile all java files, moving the whole directory structure as a java files.
<property name="build" value="../build" />
<property name="source" value="./com/bge/eCare/staff" />
...
<target name="compile" depends="prepare">
<javac srcdir="${source}" destdir="${build}" debug="on">
<classpath refid="class.path" />
</javac>
</target>
When I use above portion to compile, instead I get this:
+build
| +com
| +bge
| +eCare
| +staff
| +ejb
| SomeClass.class
| Staff.class
| StaffEJB.class
| StaffHome.class
javac task look directories recursively when it is looking for a source file. But when it's generating class file, it just puts everything in one directory. The funny part(I think) is that it chooses "ejb" folder as the destination. Not "staff" folder. I deleted "build" directly manually, but still comes out like this.
Hmm... Why???
How can I redirect generated class files in a way I specified?
If you have any idea, please let me know.
Thanks in advance.
Shin Hashitani
[ March 03, 2002: Message edited by: Shin Hashitani ]
How can I preserve the directory structure and store class files? This is what I want:
+source
| build.xml
| +com
| +bge
| +eCare
| +staff
| someClass.java
| +ejb
| Staff.java
| StaffEJB.java
| StaffHome.java
+build
| +com
| +bge
| +eCare
| +staff
| SomeClass.class
| +ejb
| Staff.class
| StaffEJB.class
| StaffHome.class
Ideally, I want to compile all java files, moving the whole directory structure as a java files.
<property name="build" value="../build" />
<property name="source" value="./com/bge/eCare/staff" />
...
<target name="compile" depends="prepare">
<javac srcdir="${source}" destdir="${build}" debug="on">
<classpath refid="class.path" />
</javac>
</target>
When I use above portion to compile, instead I get this:
+build
| +com
| +bge
| +eCare
| +staff
| +ejb
| SomeClass.class
| Staff.class
| StaffEJB.class
| StaffHome.class
javac task look directories recursively when it is looking for a source file. But when it's generating class file, it just puts everything in one directory. The funny part(I think) is that it chooses "ejb" folder as the destination. Not "staff" folder. I deleted "build" directly manually, but still comes out like this.
Hmm... Why???
How can I redirect generated class files in a way I specified?
If you have any idea, please let me know.
Thanks in advance.
Shin Hashitani
[ March 03, 2002: Message edited by: Shin Hashitani ]