activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Nodet <>
Subject Re: [IDE malarkey] dealing with log4j in your IDE versus Maven
Date Thu, 09 Mar 2006 12:13:11 GMT
In ServiceMix, i solved the problem by specifying another log4j 
configuration that is used in maven only.

Just add the following lines in the

and magically, maven tests will be run using and 
the IDE will use default


James Strachan wrote:

> This might be completely obvious to everyone - but I just thought I'd  
> explain what I've just started doing with my IDE and I wished I'd  
> done this a long long time ago...
> So ActiveMQ uses on the classpath (usually in  
> $module/src/test/resources/). By default the logging level is INFO  
> and it goes to a log file so that when you run the maven build it  
> doesn't fill the screen with lots of garbage. (Incidentally some  
> tests are timing sensitive, so setting logging level to DEBUG will  
> often cause some tests to fail as debug logging slows things down so  
> much)
> However when running stuff in your IDE - e.g. working on a specific  
> test case or program, you often want output to the console so you see  
> it nicely in your IDE. Often you want debug too.
> So for the longest time I've been hacking, say, the activemq-core/src/ 
> test/resources/ file for IDE use to enable stdout /  
> DEBUG; then having to remember to switch it back when doing  
> subversion commits etc.
> I'm sure somewhere there's a great log4j plugin to eclipse that  
> actually works well (I've tried a few plugins for IDEs over the years  
> and never managed to get them to work well); but as a quick hack I  
> created a new project called IDE which just contains stuff to put on  
> the classpath when running stuff in your IDE; so added a  
> for IDE use. Then I added this as the first  
> dependency in the ActiveMQ project and voila - no more hack-revert of  
> the in the maven build; I can keep the 2 separate.
> Totally trivial and obvious - and I'm sure some ecilpse plugin  
> somewhere solves this better - but its well worth doing something  
> like this if you hack on the ActiveMQ code a fair bit.
> James
> -------

View raw message