Re: Accessing profiles via system properties etc.

2011-09-17 Thread Mirko Friedenhagen
I just implemented the solution with the system property for the
location of the logfile
(https://github.com/mfriedenhagen/sardine/commit/74f2736bce4bb7d599ab9cf003135b1212c77ea6).
Still interested in better solutions, though :-).

Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/
https://bitbucket.org/mfriedenhagen/



On Sat, Sep 17, 2011 at 21:16, Mirko Friedenhagen
 wrote:
> 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:
>
>       
>        
>            org.slf4j
>            slf4j-api
>            1.6.1
>        
>
>        
>            lilith
>            
>                ·
>                    de.huxhorn.lilith·
>
> de.huxhorn.lilith.logback.appender.multiplex-classic·
>                    0.9.41·
>                    test·
>                
>            
>        
>
> And in my logback-test.xml I have:
>
>    
>         class="de.huxhorn.lilith.logback.appender.ClassicMultiplexSocketAppender">
>            true  
>            1
>            true
>            localhost
>        
>    
>
> 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  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" 
>>> 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



Re: Accessing profiles via system properties etc.

2011-09-17 Thread Mirko Friedenhagen
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:

   

org.slf4j
slf4j-api
1.6.1



lilith

·
de.huxhorn.lilith·

de.huxhorn.lilith.logback.appender.multiplex-classic·
0.9.41·
test·




And in my logback-test.xml I have:



true  
1
true
localhost



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



RE: Accessing profiles via system properties etc.

2011-09-17 Thread Martin Gainty

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

Re: Accessing profiles via system properties etc.

2011-09-17 Thread Anders Hammar
I would guess no.

/Anders

On Sat, Sep 17, 2011 at 16:04, Mirko Friedenhagen
 wrote:
> Really no one? I would appreciate a negative answer as well ;-) .
>
> On Sep 14, 2011 10:11 PM, "Mirko Friedenhagen" 
> 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



Re: Accessing profiles via system properties etc.

2011-09-17 Thread Mirko Friedenhagen
Really no one? I would appreciate a negative answer as well ;-) .

On Sep 14, 2011 10:11 PM, "Mirko Friedenhagen" 
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/