Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Developers List »

Ant picks class files from current directory rather than provided
jar in classpath

krats

2010-02-19

Replies: Find Java Web Hosting

Author LoginPost Reply

I have the following folder structure

src___f1
   | |__ f1.java
   |
   |__f2
      |_f2.java
   
lib__f1.jar


I built a jar out of f1.java and placed it in lib\f1.jar. Now my javac task
for f2 is as below

<target name="f2">
<javac debug="true" source="${source}" target="${target}"
includes="f2/**">
  <src path="src"/>
 <classpath>
  <pathelement path="lib/f1.jar"/>
 </classpath>
 </javac>
</target>

When I run the task I would expect it to use f1.jar instead of recompiling
f1 but instead I see that it creates f1.class file at src\f1 which implies
it is recompiling f1.java (I deleted f1.class when I created f1.jar )

Thx
Karthikr



--
Sent from the Ant - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@(protected)
For additional commands, e-mail: dev-help@(protected)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.