ant, packages, and classpaths.

From: Abbasi Dhilawala (abbasi_4_at_yahoo.com)
Date: 06/29/04


Date: 29 Jun 2004 14:33:57 -0700

I have an application that i need to compile using ant. my ant script
for doing it is

<property name="TOP" value="C:/Eprocess/EJB" />
<property name="LIB" value="C:/Eprocess/lib" />
<property name="JBOSS_HOME" value="C:/jboss-workflow" />
<property name="SOURCE" value="${TOP}/com/tietronix/workflow" />

<property name="JBOSSLIB"
value="${JBOSS_HOME}/server/default/lib/jboss-j2ee.jar" />
<property name="JBOSSLIB2"
value="${JBOSS_HOME}/server/default/lib/javax.servlet.jar" />
<property name="JBOSSLIB3"
value="${JBOSS_HOME}/server/default/lib/jbosssx.jar" />
<property name="JBOSSLIB4"
value="${JBOSS_HOME}/server/default/lib/mail.jar" />
<property name="JBOSSLIB5"
value="${JBOSS_HOME}/server/default/lib/activation.jar" />
<property name="ROWSET" value="${LIB}/rowset.jar" />
<property name="JUNIT" value="${LIB}/junit.jar" />
<property name="LDAPJAR" value="${LIB}/ldapjdk.jar" />
<property name="JDOM" value="${LIB}/jdom.jar" />

<target name="compile">

 <javac srcdir="${SOURCE}/beans" source="1.4">
          <classpath>
            <pathelement location="${TOP}" />
            <pathelement location="${JBOSSLIB}" />
            <pathelement location="${JBOSSLIB2}" />
            <pathelement location="${ROWSET}" />
            <pathelement location="${JDOM}" />
            <pathelement location="${SOURCE}" />
          </classpath>
         </javac>
</target>

my problem is that java files under the beans directory are dependent
on another package com.tietronix.workflow.engine. but this folder does
not have nay class files in it. just the source files. when i use
javac to compile the bean source files it automatically compiles the
engine files also. but for some reason ant does not and throws me an
error saying that the class wasnt found. any ideas



Relevant Pages

  • Re: why filed updates by elipse cannot be detected by ant
    ... compile, the ant does not compile the updated files. ... Because eclipse by default compiles java source files imediately after ... Therefore the class files are up to date if you run ant afterwords. ...
    (comp.lang.java.programmer)
  • Re: speeding up javac
    ... For various reasons using ANT ... it wouldn't be difficult to write a Java program that ... I already did this to some extent when it selects what to compile (I ... ANT doesn't do anything as clever as scan imports; ...
    (comp.lang.java.programmer)
  • Ant Help
    ... Java source files to compile. ... Only Java files that have no ... How can we make Ant to compile only the source file in that have ...
    (comp.lang.java.programmer)
  • Re: applet build
    ... build classes without using a tool like Ant, or is it; ... build the damm tool and run it. ... with the main method and compile this. ... I can't find any binaries. ...
    (comp.lang.java.programmer)
  • Ant/Javac: building as many files as possible?
    ... This is not necessarily an Ant question, nor a standard sun Javac. ... that does not compile, sometimes it happens. ... compile fails, the whole thing fails. ...
    (comp.lang.java.developer)