You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Daniel Wotziak <da...@gmx.de> on 2001/10/22 18:11:40 UTC
javac-tag is not ignored by ant
Hello,
I have written the following ant-script:
...
<target name="compile">
<mkdir dir="${mySession.class.dir}"/>
<echo message="Compiling the ejb-source files from ${mySession.src.dir}"/>
<echo message="Compiling the ejb-source files to ${mySession.class.dir}"/>
<javac srcdir="${mySession.src.dir}" destdir="${mySession.class.dir}">
<classpath path="${java.classpath}"/>
<include name="${mySession.src.dir}/mySession.java"/>
<include name="${mySession.src.dir}/mySessionBean.java"/>
<include name="${mySession.src.dir}/mySessionHome.java"/>
</javac>
<echo message="Compiling finished."/>
</target>
...
The output is as follows (debug-mode):
...
Complete build sequence is [compile]
compile:
[echo] Compiling the ejb-source files from
E:\java/src/com/cryptis/jboss/se
ssionejb
[echo] Compiling the ejb-source files to
E:\java/class/com/cryptis/jboss/se
ssionejb
FileSet: Setup file scanner in dir E:\java\src\com\cryptis\jboss\sessionejb
with
patternSet{ includes:
[E:\java/src/com/cryptis/jboss/sessionejb/mySession.java,
E:\java/src/com/cryptis/jboss/sessionejb/mySessionBean.java,
E:\java/src/com/cr
yptis/jboss/sessionejb/mySessionHome.java] excludes: [] }
[echo] Compiling finished.
BUILD SUCCESSFUL
...
I want to compile all .java-files in the directory
e:\java\src\com\cryptis\jboss\sessionejb
to the directory e:\java\class\com\cryptis\jboss\sessionejb
The echo-messages are written to the screen but the src-files haven't been
compiled.
I am using ant1.4 with win2000 and jdk1.3.
Thanks for your help in advance.
Greetings
Daniel
Re: javac-tag is not ignored by ant
Posted by Don Taylor <do...@yahoo.com>.
try
<include name="mySession.java"/>
<include name="mySessionBean.java"/>
<include name="mySessionHome.java"/>
in your javac task. I believe the include names are relative to the
source directory.
-- don
--- Daniel Wotziak <da...@gmx.de> wrote:
> Hello,
>
> I have written the following ant-script:
>
> ...
> <target name="compile">
> <mkdir dir="${mySession.class.dir}"/>
>
> <echo message="Compiling the ejb-source files from
> ${mySession.src.dir}"/>
> <echo message="Compiling the ejb-source files to
> ${mySession.class.dir}"/>
>
> <javac srcdir="${mySession.src.dir}"
> destdir="${mySession.class.dir}">
> <classpath path="${java.classpath}"/>
> <include name="${mySession.src.dir}/mySession.java"/>
> <include name="${mySession.src.dir}/mySessionBean.java"/>
> <include name="${mySession.src.dir}/mySessionHome.java"/>
> </javac>
>
> <echo message="Compiling finished."/>
>
> </target>
> ...
>
>
> The output is as follows (debug-mode):
>
> ...
> Complete build sequence is [compile]
>
> compile:
> [echo] Compiling the ejb-source files from
> E:\java/src/com/cryptis/jboss/se
> ssionejb
> [echo] Compiling the ejb-source files to
> E:\java/class/com/cryptis/jboss/se
> ssionejb
> FileSet: Setup file scanner in dir
> E:\java\src\com\cryptis\jboss\sessionejb
> with
> patternSet{ includes:
> [E:\java/src/com/cryptis/jboss/sessionejb/mySession.java,
> E:\java/src/com/cryptis/jboss/sessionejb/mySessionBean.java,
> E:\java/src/com/cr
> yptis/jboss/sessionejb/mySessionHome.java] excludes: [] }
> [echo] Compiling finished.
>
> BUILD SUCCESSFUL
> ...
>
>
> I want to compile all .java-files in the directory
> e:\java\src\com\cryptis\jboss\sessionejb
> to the directory e:\java\class\com\cryptis\jboss\sessionejb
>
> The echo-messages are written to the screen but the src-files haven't
> been
> compiled.
> I am using ant1.4 with win2000 and jdk1.3.
>
> Thanks for your help in advance.
>
> Greetings
>
> Daniel
>
>
__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com