ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <jakarta-...@ehatchersolutions.com>
Subject Re: Xdoclet drowning in log4j DEBUG messages
Date Mon, 11 Nov 2002 14:29:17 GMT
Kell Sønnichsen wrote:
> <target name="xdoclet">
>   <taskdef
>      name="ejbdoclet"
>      classname="xdoclet.ejb.EjbDocletTask"
>      classpathref="compile.class.path"
>   />
>   <ejbdoclet
>     sourcepath="${ejb.src}"
>     destdir="${xdoclet.src}"
>     excludedtags="@version,@author"
>     ejbspec="2.0"
>     classpathref="compile.class.path"
>   >
>     <packageSubstitution packages="ejb" substituteWith="interfaces"/>
>     ...
>   </ejbdoclet>
> </target>

 From the above it is clear you are using XDoclet < 1.2, so I'd first 
recomment you upgrade to XDoclet 1.2beta1 (or beta2, which will be out 
soon, if not already).

> I don't know whether it is a xdoclet problem or an ant problem but I
> have tried to find a way to tell log4j where to find it's configuration
> file. And _that_ is an ant problem. How do I deliver a property file
> through the layers ant -> xdoclet -> log4j ?

Its not an Ant problem.  I believe Log4j will get its configuration from 
the classpath or from a log4j.configuration system property (I could be 
wrong on this, but its something along these lines).  Logging is always 
a bit of a pain in my experience so its fiddly to get configured 
properly, but in no way is this an Ant problem.

You can set ANT_OPTS to be "-Dlog4j.configuration=<path to 
log4j.properties>" perhaps to make this better?  Or just simply remove 
log4j.jar from your Ant operating classpath (why do you need it there 
anyway?)

> Alternatively, does anybody know how to make xdoclet/log4j shut up in
> another way than specifying it in an log4j.properties file?
> 
> We are using:
> - Linux 2.4 (debian)
> - Ant 1.5
> - Xdoclet 1.2.0b1 (but also 1.1.2 had the problem)

I do not believe you're using 1.2.0b1 otherwise the above Ant syntax 
(the classpath on ejbdoclet) would fail since that is no longer 
supported.  At least that is my understanding of the changes that were 
made.  Could you double-check which XDoclet you're using?

	Erik


--
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