You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Bailey, Darragh" <db...@hp.com> on 2010/07/08 19:17:23 UTC

RE: [SOLVED] Including external class files in a compile?

> -----Original Message-----
> From: Bailey, Darragh 
> Sent: 08 July 2010 15:52
> To: Ant Users List
> Subject: Including external class files in a compile?
> 
> 
> Have a component that needs classes from another component 
> that currently only builds a war.
> 
> I know that these should really be split out into a separate 
> jar, but that's not going to happen straight away. Instead 
> for the moment I want to be able to pick up these class files 
> and include them in another war.
> 
> Previously when I wanted to do that with some jar files at 
> build time, I used the WhichResource task to locate the 
> correct jar based on the classes it provides, and then add it 
> to the compile classpath. 
> 
> That doesn't seem to work too well for classes as the 
> whichresource task will attempt to unzip the files to look 
> inside and discards the ones that can't be unzipped, which 
> basically results in it ignoreing any class files.
> 
> 
> What's the best way to have Ant pick up these external class 
> files and make them available on the classpath when compiling 
> the current project?


Didn't think until recently to try using a dirset collector instead of a fileset. WhichResource had no problems doing what I was looking for once I switched to that.

--
Regards,
Darragh Bailey

Systems Software Engineer
Hewlett Packard Galway Ltd.

Postal Address:    Hewlett Packard Galway Limited, Ballybrit Business Park, Galway
Registered Office: Hewlett Packard Galway Limited, 63-74 Sir John Rogerson's Quay Dublin 2
Registered Number: 361933 


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