maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gisbert Amm <...@webde-ag.de>
Subject Re: How to check if a command line option is set from within a Maven plugin
Date Mon, 18 Oct 2004 15:12:07 GMT
Sorry for the delay; I had to work on other things in the meantime.

I finally solved my problem by myself since I knew from your message 
that it should definitely work.

What I found out ist the following:

I tried to check ${!empty(systemScope['some.variable'])}

which always returned false (the variable is - or seems to be - empty), 
even if the variable was set. This was distracting me.

When I first save the value of the variable in the systemScope to a 
local variable

<j:set var="myvar" value="${systemScope['some.variable']}"/>

and then check if this local variable is not empty

${!empty(myvar)}

I get the right result ("true" if the variable is set).

Thanks for your support.

Gisbert



Brett Porter wrote:
> ${systemScope} should definitely work.
> 
> Do you have a small test case that reproduces it?
> 
> 
> On Thu, 14 Oct 2004 08:51:17 +0200, Gisbert Amm <gia@webde-ag.de> wrote:
> 
>>system property (-D)
>>
>>
>>
>>Brett Porter wrote:
>>
>>>do you mean maven option (-o, -X, etc) or system property (-D)?
>>>
>>>
>>>On Wed, 13 Oct 2004 18:10:59 +0200, Gisbert Amm <gia@webde-ag.de> wrote:
>>>
>>>
>>>>Hi,
>>>>
>>>>I need to check from within a Maven plugin if a certain command line
>>>>option is set or not. How do I do that? In systemScope I do not see
>>>>these variables and I cannot find out where it might be written down.
>>>>
>>>>Any help would be highly appreciated.
>>>>
>>>>Regards,
>>>>Gisbert Amm
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>For additional commands, e-mail: users-help@maven.apache.org
>>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message