You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Carlos Sanchez <ap...@carlos.cousas.net> on 2004/05/15 17:46:37 UTC

plugin.jelly Using a tag attribute only if another attribute has a specified value

Hi all,

I have this in the plugin.jelly

      <ant:iajc
          fork="${maven.aspectj.fork}"
          maxmem="${maven.aspectj.maxmem}"
          [more parameters]>
          [LOTS of things here]
      </ant:iajc>

But i'd like to use maxmem only if "fork" is true (because the aspectj
compiler prints a warning)

Is there any way to achieve this without repeating the whole ant task?

<j:choose>
  <j:when ...>
      <ant:iajc
          fork="${maven.aspectj.fork}"
          [more parameters]>
          [LOTS of things here]
      </ant:iajc>
  </j:when>
  <j:otherwise>
      <ant:iajc
          fork="${maven.aspectj.fork}"
          maxmem="${maven.aspectj.maxmem}"
          [more parameters]>
          [LOTS of things here]
      </ant:iajc>
  </j:otherwise>
</j:choose>


Thanks,

Carlos Sanchez
A Coruña, Spain

Oness Project
http://oness.sourceforge.net



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


RE: plugin.jelly Using a tag attribute only if another attribute has a specified value

Posted by Carlos Sanchez <ap...@carlos.cousas.net>.
Ok, thank you. I've just taken a look to other plugins, but it seems not
enough.

So, by now you should have a new patch in Jira ;)


> -----Mensaje original-----
> De: Vincent Massol [mailto:vmassol@pivolis.com] 
> Enviado el: sábado, 15 de mayo de 2004 19:16
> Para: 'Maven Developers List'
> Asunto: RE: plugin.jelly Using a tag attribute only if 
> another attribute has a specified value
> 
> Hi Carlos,
> 
> Yes, it's possible using setProperty: For ex: 
> <ant:setProperty name="fork" value="${maven.compile.fork}" /> 
> 
> Check the java plugin for how to use that.
> 
> -Vincent
> 
> > -----Original Message-----
> > From: Carlos Sanchez [mailto:apache@carlos.cousas.net]
> > Sent: 15 May 2004 17:47
> > To: dev@maven.apache.org
> > Subject: plugin.jelly Using a tag attribute only if another 
> attribute
> has
> > a specified value
> > 
> > Hi all,
> > 
> > I have this in the plugin.jelly
> > 
> >       <ant:iajc
> >           fork="${maven.aspectj.fork}"
> >           maxmem="${maven.aspectj.maxmem}"
> >           [more parameters]>
> >           [LOTS of things here]
> >       </ant:iajc>
> > 
> > But i'd like to use maxmem only if "fork" is true (because 
> the aspectj 
> > compiler prints a warning)
> > 
> > Is there any way to achieve this without repeating the 
> whole ant task?
> > 
> > <j:choose>
> >   <j:when ...>
> >       <ant:iajc
> >           fork="${maven.aspectj.fork}"
> >           [more parameters]>
> >           [LOTS of things here]
> >       </ant:iajc>
> >   </j:when>
> >   <j:otherwise>
> >       <ant:iajc
> >           fork="${maven.aspectj.fork}"
> >           maxmem="${maven.aspectj.maxmem}"
> >           [more parameters]>
> >           [LOTS of things here]
> >       </ant:iajc>
> >   </j:otherwise>
> > </j:choose>
> > 
> > 
> > Thanks,
> > 
> > Carlos Sanchez
> > A Coruña, Spain
> > 
> > Oness Project
> > http://oness.sourceforge.net
> > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org For 
> > additional commands, e-mail: dev-help@maven.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org For 
> additional commands, e-mail: dev-help@maven.apache.org
> 
> 
> 



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


RE: plugin.jelly Using a tag attribute only if another attribute has a specified value

Posted by Vincent Massol <vm...@pivolis.com>.
Hi Carlos,

Yes, it's possible using setProperty: For ex: <ant:setProperty
name="fork" value="${maven.compile.fork}" /> 

Check the java plugin for how to use that.

-Vincent

> -----Original Message-----
> From: Carlos Sanchez [mailto:apache@carlos.cousas.net]
> Sent: 15 May 2004 17:47
> To: dev@maven.apache.org
> Subject: plugin.jelly Using a tag attribute only if another attribute
has
> a specified value
> 
> Hi all,
> 
> I have this in the plugin.jelly
> 
>       <ant:iajc
>           fork="${maven.aspectj.fork}"
>           maxmem="${maven.aspectj.maxmem}"
>           [more parameters]>
>           [LOTS of things here]
>       </ant:iajc>
> 
> But i'd like to use maxmem only if "fork" is true (because the aspectj
> compiler prints a warning)
> 
> Is there any way to achieve this without repeating the whole ant task?
> 
> <j:choose>
>   <j:when ...>
>       <ant:iajc
>           fork="${maven.aspectj.fork}"
>           [more parameters]>
>           [LOTS of things here]
>       </ant:iajc>
>   </j:when>
>   <j:otherwise>
>       <ant:iajc
>           fork="${maven.aspectj.fork}"
>           maxmem="${maven.aspectj.maxmem}"
>           [more parameters]>
>           [LOTS of things here]
>       </ant:iajc>
>   </j:otherwise>
> </j:choose>
> 
> 
> Thanks,
> 
> Carlos Sanchez
> A Coruña, Spain
> 
> Oness Project
> http://oness.sourceforge.net
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org




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