You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Martin Porter <ma...@liberica.com> on 2003/02/13 15:29:02 UTC

Strange javac behaviour

Hi,

I am seeing something unexpected happen during my build process and I am not
sure
why. Below are the 2 ways I have tried of building this target and neither
works
as I require. What I require is to compile all classes under
"com/liberica/framework/ejb"
to the target directory (there are 12 files under that directory and its
sub-dirs).

    <target name="compile_framework_ejb">
        <javac destdir="${liberica.classesEJB}">
            <src path="${liberica.sourceDir}"/>
            <include name="com/liberica/framework/ejb/**"/>
            <classpath>
                <path refid="ext.libs.classpath"/>
                <pathelement path="${j2ee.server.core.jars}"/>
                <pathelement path="${j2ee.server.xml.jars}"/>
                <pathelement path="${giscrypto.classpath}"/>
            </classpath>
        </javac>
    </target>

    <target name="compile_framework_ejb">
        <javac srcdir="${liberica.sourceDir}"
            destdir="${liberica.classesReg}"
            includes="com/liberica/framework/ejb/**">
            <classpath>
                <path refid="ext.libs.classpath"/>
                <pathelement path="${j2ee.server.core.jars}"/>
                <pathelement path="${j2ee.server.xml.jars}"/>
                <pathelement path="${giscrypto.classpath}"/>
            </classpath>
        </javac>
    </target>

Even though Ant tells me it is copying 12 files it for some reason compiles
155 files
into the target directory which is basically com.liberica.framework.*. The
output
from ant is shown below:-

compile_framework_ejb:
    [javac] Compiling 12 source files to
E:\Liberica\Deployment\BuildZone\inventix14\classes\ejb

Am i missing something very obvious...? There are around 30 directories at
the 'com.liberica.framework'
level and i dont want to have to specifically exclude each one as if new
ones are added the build
will have to change each time which is non-sense !.

Any info appreciated...

Cheers
Martin