Well, I will try. I use slf4j for logging. I normally log using logback to stderrr. When de.huxhorn.lilith.logback.appender.multiplex-classic is available, I want to log to Lilith (http://lilith.huxhorn.de/), a graphical logviewer.
I think the relevant parts are: <!-- logging --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.1</version> </dependency> <profile> <id>lilith</id> <dependencies> <dependency>· <groupId>de.huxhorn.lilith</groupId>· <artifactId>de.huxhorn.lilith.logback.appender.multiplex-classic</artifactId>· <version>0.9.41</version>· <scope>test</scope>· </dependency> </dependencies> </profile> And in my logback-test.xml I have: <if condition='property("maven.profile").contains("lilith")'> <appender name="multiplex" class="de.huxhorn.lilith.logback.appender.ClassicMultiplexSocketAppender"> <Compressing>true</Compressing> <!-- will automatically use correct default port --> <!-- Default port for compressed is 10000 and uncompressed 10001 --> <ReconnectionDelay>10000</ReconnectionDelay> <IncludeCallerData>true</IncludeCallerData> <RemoteHosts>localhost</RemoteHosts> </appender> </if> I think I could workaround this by specify a system property -Dlogback.configurationFile=src/test/resources/logback-with-lilith.xml in the surefire plugin but just wanted to know if there is an easier way to do this. Regards Mirko -- http://illegalstateexception.blogspot.com/ https://github.com/mfriedenhagen/ https://bitbucket.org/mfriedenhagen/ On Sat, Sep 17, 2011 at 16:20, Martin Gainty <mgai...@hotmail.com> wrote: > > Mirko- > > Profiles allow or restrict what is visible to the project hierarchy ... > *usually* based on current environment conditions > For example developing in Scandanavia you may allow greater access to > properties than you would say when you are running demonstrations in the US > > can you provide an brief example of the profiles you are implementing in a > comprehensive pom.xml so we may suggest an appropriate solution? > > Takk, > Martin > ______________________________________________ > do not alter or disrupt this transmission. > > >> Date: Sat, 17 Sep 2011 16:04:14 +0200 >> Subject: Re: Accessing profiles via system properties etc. >> From: mfriedenha...@gmail.com >> To: users@maven.apache.org >> >> Really no one? I would appreciate a negative answer as well ;-) . >> >> On Sep 14, 2011 10:11 PM, "Mirko Friedenhagen" <mfriedenha...@gmail.com> >> wrote: >> > >> > Hello, >> > >> > is there a possibility of accessing the activated Maven profile names >> during test runs programmatically or in configuration files? >> > >> > I want to activate logging to Lilith in a Maven profile. Adding the >> required dependency is no problem, but for adding the appended conditionally >> seems not to be possible. Are the activated profile names exposed? >> > >> > Regards Mirko >> > -- >> > Sent from my phone >> > http://illegalstateexception.blogspot.com >> > http://github.com/mfriedenhagen/ > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org