ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Priest <Robert.Pri...@bentley.com>
Subject RE: Entire source compiling EVERY time
Date Mon, 03 Jun 2002 14:37:37 GMT
Thanks Jon and Dominique.

I've got it now - srcdir has to point to the root of package tree.
Jon did point that out in his message. Didn't catch that the first time.

Thanks for your patience :)



-----Original Message-----
From: Dominique Devienne [mailto:DDevienne@lgc.com]
Sent: Friday, May 31, 2002 6:29 PM
To: 'Ant Users List'
Subject: RE: Entire source compiling EVERY time


It's the same problem as before it looks like... try:

<javac srcdir="${WEB_SOURCE}/patches/tomcat/${env.DMS_TOMCAT_VERSION}"
       destdir="${WEB_OUT}" 
       includes="org/apache/ajp/tomcat4/Ajp13Principal.java"
       listfiles="yes" />

<javac srcdir="${WEB_SOURCE}/patches/cocoon/${env.DMS_COCOON_VERSION}"
       destdir="${WEB_OUT}"
       includes="org/apache/cocoon/Utils.java"
       listfiles="yes" />

--DD

-----Original Message-----
From: Robert Priest [mailto:Robert.Priest@bentley.com] 
Sent: Friday, May 31, 2002 5:15 PM
To: 'Ant Users List'
Subject: RE: Entire source compiling EVERY time

Okay, i one more about this topic. The solution you gave me worked for most
of my compiles. but I have two in particular that always seem to get
compiled. This time I am only including the file that I want to compile.

Does anyone know why these gets compiled everytime?
I should say that these files are modifications of files that are included
in jars in my classpath.
Is it an issue with those items there? Specifying this WEB_OUT dir in the
classpath before the jars
that have older versions of them.

Here are the lines:

<javac srcdir="${WEB_SOURCE}" destdir="${WEB_OUT}"
 
includes="patches/tomcat/${env.DMS_TOMCAT_VERSION}/org/apache/ajp/tomcat4/Aj
p13Principal.java"
     listfiles="yes"
     />

<javac srcdir="${WEB_SOURCE}" destdir="${WEB_OUT}"
 
includes="patches/cocoon/${env.DMS_COCOON_VERSION}/org/apache/cocoon/Utils.j
ava"
     listfiles="yes"
     />


-----Original Message-----
From: Robert Priest 
Sent: Wednesday, May 22, 2002 2:56 PM
To: 'Ant Users List'
Subject: RE: Entire source compiling EVERY time


Thanks Jon. I think I understand now.But I have another question (more about
style I guess):

I have a file under "com\projectwise\web\client\base" called
PWClientStarter.java. That is still getting compiled everytime.
Now I changed my target to look like:

<target name="com" depends="prepare">
    <javac srcdir="${WEB_SOURCE}" destdir="${WEB_OUT}"
     includes="com\**"
     excludes="com\projectwise\web\client\pwviewer\**"
     listfiles="yes"
     />
   </target>

which works fine for everything except this one particular file. 
Now that one file does not have a "package" line. 
Is that what causes it to be compiled everytime? 

I was able to rectify it by doing a:

 <target name="com" depends="prepare">
    <javac srcdir="${WEB_SOURCE}" destdir="${WEB_OUT}"
     includes="com\**"
 
excludes="com\projectwise\web\client\pwviewer\**,com\projectwise\web\client\
base\PWClientStarter.java"
     listfiles="yes"
     />
     <javac srcdir="${WEB_SOURCE}\com\projectwise\web\client\base"
destdir="${WEB_OUT}"
     includes="PWClientStarter.java"
     listfiles="yes"
     />
   </target>


Is that the most elegant way of doing this, or is there a better way?



-----Original Message-----
From: Jon Skeet [mailto:jon.skeet@peramon.com]
Sent: Wednesday, May 22, 2002 1:40 PM
To: Ant Users List
Subject: RE: Entire source compiling EVERY time


> Here is my what my target looks like:
> 
>  <target name="compile" depends="prepare">
>     <javac srcdir="${WEB_SOURCE}\com\projectwise\web\common"
> destdir="${WEB_OUT}" />
>     <javac srcdir="${WEB_SOURCE}\com\projectwise\web\server"
> destdir="${WEB_OUT}" />
>     <javac srcdir="${WEB_SOURCE}\com\projectwise\web\client"
> destdir="${WEB_OUT}" 
>      excludes="pwviewer\**"
>      />
>    </target>

That's your problem - you should be using:

<javac srcdir="${WEB_SOURCE}" destdir="${WEB_OUT}" />

and using a filter to get only those directories if that's all you want -
otherwise javac thinks that the srcdir value is the *root* of your package
tree.

Jon

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message