They are two packages within the same source folder. So does that mean, I
cant create a jar for one package and make the other package use it?
antoinell wrote:
>
> krats wrote:
>> I have the following folder structure
>>
>> src___f1
>> | |__ f1.java
>> |
>> |__f2
>> |_f2.java
>>
>> lib__f1.jar
>>
> are f1 and f2 two packages ? or source folders ?
>
> it looks like they are two different packages.
>
> if they are just two different packages then you should compile them in
> one go,
> it they are different source folders, you should do :
>
> <javac srcdir="src/f1" .... />
> <javac srcdir="src/f2"" ..../>
>
> to explicit, a source folder is a root of a package hierarchy, so a
> directory holding usually as children "com" or "org" depending upon the
> type of project.
>
> Regards,
>
> Antoine
>>
>> 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
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
--
View this message in context:
http://old.nabble.com/Ant-picks-class-files-from-current-directory-rather-than-provided-jar-in-classpath-tp27658759p27660870.html
Sent from the Ant - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]