ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vijay Aravamudhan <avij...@gmail.com>
Subject Re: best practice: How to insert unreferenced class files into a JAR
Date Thu, 22 May 2008 13:18:54 GMT
Since these dynamically loaded classes are part of a separate project, 
you are already on the correct path. Just jar those files separately and 
use that jar in the classpath of your project. If you want to go even 
further, use ivy to manage your dependencies.

Vijay

Amit Dor-Shifer wrote:
> Hi all.
> I'm using a framework of logging formatters. Those formatters are 
> assigned to a log according to configuration. This means those classes 
> are never imported in source code. I've came to notice this when a/m 
> files weren't appended to my JAR. They are located at the 'sourcepath' 
> of my project, but belong to a separate java project.
>
> I've resolved this issue by explicitly adding the directory containing 
> those files to the 'srcdir' attribute of my 'javac' task. 
> Nevertheless, I'm not content with this solution and I'm guessing 
> there's some sort of standard procedure to resolve such issues. Anyone 
> using java reflection might stumble on the same issue, right? What's 
> the correct way to have dynamically instantiated classes available at 
> runtime, in a deployed environment?
> Am I on the right path with this work-around?
> Thanks,
> Amit
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>

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


Mime
View raw message