You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mark Donszelmann <Ma...@slac.stanford.edu> on 2005/02/18 04:57:37 UTC
echo gives me correct variable but unjar does not... where do I go wrong?
Hi
I have an x.properties file like this:
file=somedir/${specific}/myfile.jar
I load this properties file in maven like this:
<util:properties var="props" file="x.properties" />
I set "specific" like this:
<jelly:set scope="parent" var="specific" value="here" />
(not sure why I needed scope="parent" here, but otherwise the echo below did not work.
There seems to be no doc on the scopes one can set, or maybe I missed it).
When I then say:
<j:set var="name" value="${props.getProperty('file')}" />
<echo>${name}</echo>
it writes correctly:
[echo] somedir/here/myfile.jar
but when I say:
<ant:unjar src="${file}" ..... />
ant complains that it does not find file:
somedir/${specific}/myfile.jar
Any idea why?
Regards
Mark Donszelmann
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: echo gives me correct variable but unjar does not... where do I go wrong?
Posted by Mark Donszelmann <Ma...@slac.stanford.edu>.
Hi
in fact that is what I did, I miswrote my example, I used
<unjar jarfile="${name}" ... />
and it complains. So I am still stuck...
Regards
Mark
----- Original Message -----
From: "Brett Porter" <br...@gmail.com>
To: "Maven Users List" <us...@maven.apache.org>
Sent: Thursday, February 17, 2005 8:42 PM
Subject: Re: echo gives me correct variable but unjar does not... where do I go wrong?
> just like you were in echo, unless I am missing something:
>
> <j:set var="name" value="${prop.getProperty('file')}"/>
> <unjar jarfile="${name}" ... />
>
>
> On Thu, 17 Feb 2005 20:18:38 -0800, Mark Donszelmann
> <Ma...@slac.stanford.edu> wrote:
> > Hi
> >
> > ----- Original Message -----
> > From: "Brett Porter" <brett.porter@gmail.com >
> > To: "Maven Users List" <users@maven.apache.org >
> > Sent: Thursday, February 17, 2005 8:09 PM
> > Subject: Re: echo gives me correct variable but unjar does not... where do I go wrong?
> >
> > > it isn't being evaulated because of the way you are pulling it back.
> > > Try using the value of ${name} in the unjar statement.
> >
> > thanks, but how exactly do I do that?
> >
> > Regards
> > Mark
> >
> > ---------------------------------------------------------------------
> > 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
Re: echo gives me correct variable but unjar does not... where do I go wrong?
Posted by Brett Porter <br...@gmail.com>.
just like you were in echo, unless I am missing something:
<j:set var="name" value="${prop.getProperty('file')}"/>
<unjar jarfile="${name}" ... />
On Thu, 17 Feb 2005 20:18:38 -0800, Mark Donszelmann
<Ma...@slac.stanford.edu> wrote:
> Hi
>
> ----- Original Message -----
> From: "Brett Porter" <brett.porter@gmail.com >
> To: "Maven Users List" <users@maven.apache.org >
> Sent: Thursday, February 17, 2005 8:09 PM
> Subject: Re: echo gives me correct variable but unjar does not... where do I go wrong?
>
> > it isn't being evaulated because of the way you are pulling it back.
> > Try using the value of ${name} in the unjar statement.
>
> thanks, but how exactly do I do that?
>
> Regards
> Mark
>
> ---------------------------------------------------------------------
> 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
Re: echo gives me correct variable but unjar does not... where do I go wrong?
Posted by Mark Donszelmann <Ma...@slac.stanford.edu>.
Hi
----- Original Message -----
From: "Brett Porter" <br...@gmail.com>
To: "Maven Users List" <us...@maven.apache.org>
Sent: Thursday, February 17, 2005 8:09 PM
Subject: Re: echo gives me correct variable but unjar does not... where do I go wrong?
> it isn't being evaulated because of the way you are pulling it back.
> Try using the value of ${name} in the unjar statement.
thanks, but how exactly do I do that?
Regards
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: echo gives me correct variable but unjar does not... where do I go wrong?
Posted by Brett Porter <br...@gmail.com>.
it isn't being evaulated because of the way you are pulling it back.
Try using the value of ${name} in the unjar statement.
- Brett
On Thu, 17 Feb 2005 19:57:37 -0800, Mark Donszelmann
<Ma...@slac.stanford.edu> wrote:
> Hi
>
> I have an x.properties file like this:
>
> file=somedir/${specific}/myfile.jar
>
> I load this properties file in maven like this:
>
> <util:properties var="props" file="x.properties" />
>
> I set "specific" like this:
>
> <jelly:set scope="parent" var="specific" value="here" />
> (not sure why I needed scope="parent" here, but otherwise the echo below did not work.
> There seems to be no doc on the scopes one can set, or maybe I missed it).
>
> When I then say:
>
> <j:set var="name" value="${props.getProperty('file')}" />
> <echo>${name}</echo>
>
> it writes correctly:
>
> [echo] somedir/here/myfile.jar
>
> but when I say:
>
> <ant:unjar src="${file}" ..... />
>
> ant complains that it does not find file:
>
> somedir/${specific}/myfile.jar
>
> Any idea why?
>
> Regards
> Mark Donszelmann
>
> ---------------------------------------------------------------------
> 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