Well, I will work on this more tomorrow. Have an early day coming up.
The plugin is close to complete. If i would just settle to say some
things have to be added after generation, then it could be done, but I am
stubborn. Maybe that is what I do for a 1.0 release, then work on getting
it better for 1.1. We'll see. I will have something to post tomorrow
regardless.
Dion, thanks for all the help...
Jim
On Sun, 29 Sep 2002, Jim Birchfield wrote:
> <j:forEach begin="0" end="${maven.jnlp.property.number}" step="1"
> indexVar="i">
> <j:set var="propname" value='maven.jnlp.property.name.${i}'/>
> <property name="${context.getVariable('${propname}')}" value="${propvalue}"/>
> <property name="${context.getVariable('maven.jnlp.property.name.0')}"
> value="${propvalue}"/>
> </j:forEach>
>
> The first property tag prints '<property name="" .../>
> The second works correctly. It looks like $context.getVariable does not
> interpolate a given variable, it takes it literal.
>
> Jim
>
> On Sun, 29 Sep 2002, Jim Birchfield wrote:
>
> > Working on that angle...still a few issues...here is What I have so
> > far...no luck:
> >
> > <j:forEach begin="0" end="${maven.jnlp.property.number}" step="1" indexVar="i">
> > <j:set var="propname" value='maven.jnlp.property.name.${i}'/>
> > <j:set var="propvalue"
>value="${context.getVariable('maven.jnlp.property.value.${i}')}"/>
> > <property name="${context.getVariable('maven.jnlp.property.name.${i}')}"
> > value="${propvalue}"/>
> > </j:forEach>
> >
> > ${propval} returns the literal 'maven.jnlp.property.value.1'
> >
> > Now the forEach works, but I cannot get the actual value from the
> > property...still working
> >
> > On Mon, 30 Sep 2002 [EMAIL PROTECTED] wrote:
> >
> > > <j:set var="name" value="value" />
> > > --
> > > dIon Gillard, Multitask Consulting
> > > Work: http://www.multitask.com.au
> > > Developers: http://adslgateway.multitask.com.au/developers
> > >
> > >
> > > Jim Birchfield <[EMAIL PROTECTED]> wrote on 30/09/2002 11:07:59 AM:
> > >
> > > > OK, I might have a solution just using Jelly, and no custom code. Is
> > > > there anyway to dynamically create a property? For instance, I have the
> > > > following:
> > > >
> > > > maven.jnlp.property.value.1=foo
> > > >
> > > > and I have a forEach with an index variable of i.
> > > >
> > > > I am trying to do something like: ${maven.jnlp.property.value.${i}}
> > > >
> > > > However, this won't work. Is there something built in like an 'eval'
> > > > statement?
> > > >
> > > > Jim
> > > >
> > > > On Sun, 29 Sep 2002, Jim Birchfield wrote:
> > > >
> > > > >
> > > > >
> > > > > On Mon, 30 Sep 2002 [EMAIL PROTECTED] wrote:
> > > > >
> > > > > > Jim Birchfield <[EMAIL PROTECTED]> wrote on 30/09/2002 09:37:18 AM:
> > > > > >
> > > > > > > Can I have something likke this?
> > > > > > >
> > > > > > > maven.jnlp.property=foo,bar
> > > > > > > maven.jnlp.property=foo.baz
> > > > > > > maven.jnlp.property=bar.baz
> > > > > >
> > > > > > Well, no, because properties are like variables - the name must be
> > > unique.
> > > > > > The above simply assigns three different values to the same property
> > > > > > 'maven.jnlp.property' in sequence.
> > > > >
> > > > > That's what I thought, but thought you had something in mind...;-)
> > > > >
> > > > > >
> > > > > > >
> > > > > > > then somehow do
> > > > > > > for allProperties {
> > > > > > > handle prop?
> > > > > > > }
> > > > > > >
> > > > > > > If possible, can you send me soemthing showing how to do this?
> > > > > >
> > > > > > How about you tell me what you're trying to do, and we try working
> > > out a
> > > > > > way of doing it.
> > > > >
> > > > > What I need to do is allow people to put a variable number of things
> > > in
> > > > > the properties file(or somewhere. The best (but ugly) solution I have
> > > is
> > > > > something like this:
> > > > >
> > > > > maven.jnlp.property.number=2
> > > > > maven.jnlp.property.name.1=foo
> > > > > maven.jnlp.property.value.1=bar
> > > > > maven.jnlp.property.name.2=bar
> > > > > maven.jnlp.property.value.2=baz
> > > > >
> > > > > Then write a Jelly tag that looks similar to:
> > > > >
> > > > > <jnlp:propertyIterator
> > > > > propertyName="maven.jnlp.property"/>
> > > > >
> > > > > And this tag looked up $propertyName.number, loops over
> > > $propertyName.name
> > > > > and $propertyName.value and printed out the appropriate tag.
> > > > >
> > > > > I remember doing some serious ugly stuff in properties files several
> > > years
> > > > > ago, hence my appreciation for XML based property files.
> > > > >
> > > > > Do you see a better approach for this?
> > > > >
> > > > > Jim
> > > > >
> > > > > >
> > > > > > > Thanks!
> > > > > > >
> > > > > > > Jim
> > > > > > --
> > > > > > dIon Gillard, Multitask Consulting
> > > > > > Work: http://www.multitask.com.au
> > > > > > Developers: http://adslgateway.multitask.com.au/developers
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > To unsubscribe, e-mail: <mailto:turbine-maven-user-
> > > > [EMAIL PROTECTED]>
> > > > > > For additional commands, e-mail: <mailto:turbine-maven-user-
> > > > [EMAIL PROTECTED]>
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > To unsubscribe, e-mail: <mailto:turbine-maven-user-
> > > > [EMAIL PROTECTED]>
> > > > > For additional commands, e-mail: <mailto:turbine-maven-user-
> > > > [EMAIL PROTECTED]>
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail: <mailto:turbine-maven-user-
> > > > [EMAIL PROTECTED]>
> > > > For additional commands, e-mail: <mailto:turbine-maven-user-
> > > > [EMAIL PROTECTED]>
> > > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
> >
> >
>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>