You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by John Fallows <jo...@gmail.com> on 2005/07/15 07:41:27 UTC

[m2] plugin parameter value configuration for non primitive types?

What syntax is supported for M2 Plugin parameters of non-primitive types?

For example, java.util.Collection (and subclasses), java.util.Map (and
subclasses), arrays, Properties and JavaBeans.

/**
 * Items to be processed, defaults to the empty set.
 *
 * @parameter
 */
private Set items = Collections.EMPTY_SET;

<configuration>
  <items>???</items>
</configuration>

Kind Regards,
John Fallows.

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


Re: [m2] plugin parameter value configuration for non primitive types?

Posted by John Fallows <jo...@gmail.com>.
On 7/25/05, Peter van de Hoef <pv...@springsite.com> wrote:
> I think the PlexusConfiguration type is also worth mentioning here.
> It enabled me to pass a piece of xml right through to the plugin:
> 
> import org.codehaus.plexus.configuration.PlexusConfiguration;
> ...
> class MyMojo [etc..]
> {
>         /**
>          * @parameter
>          */
>         private PlexusConfiguration anything;
> }
> 
> Then, in the pom:
> 
>    <plugin>
>      <groupId>org.apache.maven.plugins</groupId>
>      [etc...]
>      <configuration>
>        <anything>
>          <can go="here"/>
>          <nested>
>            <elements and="attributes"/>
>          </nested>
>        </anything>
>      </configuration>
>    </plugin>

Thanks Peter, this is certainly very useful for passing XML fragments.

Kind Regards,
John Fallows.

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


Re: [m2] plugin parameter value configuration for non primitive types?

Posted by Peter van de Hoef <pv...@springsite.com>.
I think the PlexusConfiguration type is also worth mentioning here.
It enabled me to pass a piece of xml right through to the plugin:

import org.codehaus.plexus.configuration.PlexusConfiguration;
...
class MyMojo [etc..]
{
	/**
	 * @parameter
	 */
	private PlexusConfiguration anything;
}

Then, in the pom:

   <plugin>
     <groupId>org.apache.maven.plugins</groupId>
     [etc...]
     <configuration>
       <anything>
         <can go="here"/>
         <nested>
           <elements and="attributes"/>
         </nested>
       </anything>
     </configuration>
   </plugin>

Kenney Westerhof wrote:
> On Fri, 15 Jul 2005, John Fallows wrote:
> 
> 
>>What syntax is supported for M2 Plugin parameters of non-primitive types?
>>
>>For example, java.util.Collection (and subclasses), java.util.Map (and
>>subclasses), arrays, Properties and JavaBeans.
> 
> 
> Collections / arrays:
> 
>   <items>
>     <whatever implementation="java.lang.String">value</whatever>
> 
>     <whatever2 implementation="your.complex.Object">
>       <fieldname>value</fieldname>
>       <field2name>value2</field2name>
>     </whatever2>
> 
>     <!-- this seems to be broken right now:  -->
>     <complete.class.Name>....</complete.class.Name>
> 
>     <!-- java.lang.* : -->
>     <integer>1</integer>
>     <string>stringvalue</string>
> 
>   </items>
> 
> Map:
> 
>    <items>
>      <the_key>the value</the_key>
>      <another_key>another value</another_key>
>      ...
>    </items>
> 
> 
> 
> Properties:
> 
>   <items>
>     <whatever>
>       <name>the key</name>
>       <value>the value</value>
>     </whatever>
>     ..
>   </items>
> 
> JavaBeans:
> 
>   when 'items' maps to a field that is a JavaBean, it is treated
>   the same as the top-level 'configuration' tag, that is mapped
>   to the component instance.
> 
> 
>>/**
>> * Items to be processed, defaults to the empty set.
>> *
>> * @parameter
>> */
>>private Set items = Collections.EMPTY_SET;
>>
>><configuration>
>>  <items>???</items>
>></configuration>
>>
>>Kind Regards,
>>John Fallows.
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 
> 
> --
> Kenney Westerhof
> http://www.neonics.com
> GPG public key: http://www.gods.nl/~forge/kenneyw.key
> 
> ---------------------------------------------------------------------
> 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: [m2] plugin parameter value configuration for non primitive types?

Posted by John Fallows <jo...@gmail.com>.
Thanks Kenney, this is very helpful. :-)

Would you mind posting a message to this email thread that contains a
link to the APT documentation after is available on maven site?

Kind Regards,
John Fallows.

On 7/15/05, Kenney Westerhof <fo...@neonics.com> wrote:
> On Fri, 15 Jul 2005, John Fallows wrote:
> 
> > What syntax is supported for M2 Plugin parameters of non-primitive types?
> >
> > For example, java.util.Collection (and subclasses), java.util.Map (and
> > subclasses), arrays, Properties and JavaBeans.
> 
> Collections / arrays:
> 
>   <items>
>     <whatever implementation="java.lang.String">value</whatever>
> 
>     <whatever2 implementation="your.complex.Object">
>       <fieldname>value</fieldname>
>       <field2name>value2</field2name>
>     </whatever2>
> 
>     <!-- this seems to be broken right now:  -->
>     <complete.class.Name>....</complete.class.Name>
> 
>     <!-- java.lang.* : -->
>     <integer>1</integer>
>     <string>stringvalue</string>
> 
>   </items>
> 
> Map:
> 
>    <items>
>      <the_key>the value</the_key>
>      <another_key>another value</another_key>
>      ...
>    </items>
> 
> 
> 
> Properties:
> 
>   <items>
>     <whatever>
>       <name>the key</name>
>       <value>the value</value>
>     </whatever>
>     ..
>   </items>
> 
> JavaBeans:
> 
>   when 'items' maps to a field that is a JavaBean, it is treated
>   the same as the top-level 'configuration' tag, that is mapped
>   to the component instance.
> 
> >
> > /**
> >  * Items to be processed, defaults to the empty set.
> >  *
> >  * @parameter
> >  */
> > private Set items = Collections.EMPTY_SET;
> >
> > <configuration>
> >   <items>???</items>
> > </configuration>
> >
> > Kind Regards,
> > John Fallows.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> 
> --
> Kenney Westerhof
> http://www.neonics.com
> GPG public key: http://www.gods.nl/~forge/kenneyw.key
>

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


RE: [m1.0.2] support for AspectWerkz 2.0

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

Someone would need to provide a patch to update the aspectwerkz plugin.

-Vincent

> -----Original Message-----
> From: Marc Candle [mailto:mcandle@jahia.com]
> Sent: vendredi 15 juillet 2005 10:37
> To: 'Maven Users List'
> Subject: RE: [m1.0.2] support for AspectWerkz 2.0
> 
> Hi,
> 
> Does anyone have any tips on running AspectWerkz 2.0
> (http://aspectwerkz.codehaus.org/) with Maven 1.0.2 ?
> 
> There's the "Maven AspectWerkz plugin"
> (http://maven.apache.org/reference/plugins/aspectwerkz/index.html) but
> it's
> current incarnation -version 1.2- support only AspectWerkz 0.9.
> 
> I only found this related post:
> http://mail-archives.apache.org/mod_mbox/maven-
> users/200504.mbox/%3C425F2D27
> .7020402@commonjava.org%3E
> 
> Cheers
> 
> Mark


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


RE: [m1.0.2] support for AspectWerkz 2.0

Posted by Marc Candle <mc...@jahia.com>.
Hi,

Does anyone have any tips on running AspectWerkz 2.0
(http://aspectwerkz.codehaus.org/) with Maven 1.0.2 ?

There's the "Maven AspectWerkz plugin"
(http://maven.apache.org/reference/plugins/aspectwerkz/index.html) but it's
current incarnation -version 1.2- support only AspectWerkz 0.9.

I only found this related post: 
http://mail-archives.apache.org/mod_mbox/maven-users/200504.mbox/%3C425F2D27
.7020402@commonjava.org%3E

Cheers

Mark





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


Re: [m2] plugin parameter value configuration for non primitive types?

Posted by Emmanuel Venisse <em...@venisse.net>.

Kenney Westerhof wrote:
> On Fri, 15 Jul 2005, Emmanuel Venisse wrote:
> 
> 
>>Kenney,
>>
>>Can you create an apt doc that explain this?
> 
> 
> Sure, where do you want me to put it? It should go in plexus somewhere,
> but then the m2 site has to have a reference to that page.

For the moment, put it in maven-site.

Emmanuel

> 
> 
>>Emmanuel
>>
>>
>>Kenney Westerhof wrote:
>>
>>>On Fri, 15 Jul 2005, John Fallows wrote:
>>>
>>>
>>>
>>>>What syntax is supported for M2 Plugin parameters of non-primitive types?
>>>>
>>>>For example, java.util.Collection (and subclasses), java.util.Map (and
>>>>subclasses), arrays, Properties and JavaBeans.
>>>
>>>
>>>Collections / arrays:
>>>
>>>  <items>
>>>    <whatever implementation="java.lang.String">value</whatever>
>>>
>>>    <whatever2 implementation="your.complex.Object">
>>>      <fieldname>value</fieldname>
>>>      <field2name>value2</field2name>
>>>    </whatever2>
>>>
>>>    <!-- this seems to be broken right now:  -->
>>>    <complete.class.Name>....</complete.class.Name>
>>>
>>>    <!-- java.lang.* : -->
>>>    <integer>1</integer>
>>>    <string>stringvalue</string>
>>>
>>>  </items>
>>>
>>>Map:
>>>
>>>   <items>
>>>     <the_key>the value</the_key>
>>>     <another_key>another value</another_key>
>>>     ...
>>>   </items>
>>>
>>>
>>>
>>>Properties:
>>>
>>>  <items>
>>>    <whatever>
>>>      <name>the key</name>
>>>      <value>the value</value>
>>>    </whatever>
>>>    ..
>>>  </items>
>>>
>>>JavaBeans:
>>>
>>>  when 'items' maps to a field that is a JavaBean, it is treated
>>>  the same as the top-level 'configuration' tag, that is mapped
>>>  to the component instance.
>>>
>>>
>>>
>>>>/**
>>>>* Items to be processed, defaults to the empty set.
>>>>*
>>>>* @parameter
>>>>*/
>>>>private Set items = Collections.EMPTY_SET;
>>>>
>>>><configuration>
>>>> <items>???</items>
>>>></configuration>
>>>>
>>>>Kind Regards,
>>>>John Fallows.
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>>>
>>>
>>>--
>>>Kenney Westerhof
>>>http://www.neonics.com
>>>GPG public key: http://www.gods.nl/~forge/kenneyw.key
>>>
>>>---------------------------------------------------------------------
>>>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
>>
> 
> 
> --
> Kenney Westerhof
> http://www.neonics.com
> GPG public key: http://www.gods.nl/~forge/kenneyw.key
> 
> ---------------------------------------------------------------------
> 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: [m2] plugin parameter value configuration for non primitive types?

Posted by Kenney Westerhof <fo...@neonics.com>.
On Fri, 15 Jul 2005, Emmanuel Venisse wrote:

> Kenney,
>
> Can you create an apt doc that explain this?

Sure, where do you want me to put it? It should go in plexus somewhere,
but then the m2 site has to have a reference to that page.

>
> Emmanuel
>
>
> Kenney Westerhof wrote:
> > On Fri, 15 Jul 2005, John Fallows wrote:
> >
> >
> >>What syntax is supported for M2 Plugin parameters of non-primitive types?
> >>
> >>For example, java.util.Collection (and subclasses), java.util.Map (and
> >>subclasses), arrays, Properties and JavaBeans.
> >
> >
> > Collections / arrays:
> >
> >   <items>
> >     <whatever implementation="java.lang.String">value</whatever>
> >
> >     <whatever2 implementation="your.complex.Object">
> >       <fieldname>value</fieldname>
> >       <field2name>value2</field2name>
> >     </whatever2>
> >
> >     <!-- this seems to be broken right now:  -->
> >     <complete.class.Name>....</complete.class.Name>
> >
> >     <!-- java.lang.* : -->
> >     <integer>1</integer>
> >     <string>stringvalue</string>
> >
> >   </items>
> >
> > Map:
> >
> >    <items>
> >      <the_key>the value</the_key>
> >      <another_key>another value</another_key>
> >      ...
> >    </items>
> >
> >
> >
> > Properties:
> >
> >   <items>
> >     <whatever>
> >       <name>the key</name>
> >       <value>the value</value>
> >     </whatever>
> >     ..
> >   </items>
> >
> > JavaBeans:
> >
> >   when 'items' maps to a field that is a JavaBean, it is treated
> >   the same as the top-level 'configuration' tag, that is mapped
> >   to the component instance.
> >
> >
> >>/**
> >> * Items to be processed, defaults to the empty set.
> >> *
> >> * @parameter
> >> */
> >>private Set items = Collections.EMPTY_SET;
> >>
> >><configuration>
> >>  <items>???</items>
> >></configuration>
> >>
> >>Kind Regards,
> >>John Fallows.
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
> >
> > --
> > Kenney Westerhof
> > http://www.neonics.com
> > GPG public key: http://www.gods.nl/~forge/kenneyw.key
> >
> > ---------------------------------------------------------------------
> > 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
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

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


Re: [m2] plugin parameter value configuration for non primitive types?

Posted by Emmanuel Venisse <em...@venisse.net>.
Kenney,

Can you create an apt doc that explain this?

Emmanuel


Kenney Westerhof wrote:
> On Fri, 15 Jul 2005, John Fallows wrote:
> 
> 
>>What syntax is supported for M2 Plugin parameters of non-primitive types?
>>
>>For example, java.util.Collection (and subclasses), java.util.Map (and
>>subclasses), arrays, Properties and JavaBeans.
> 
> 
> Collections / arrays:
> 
>   <items>
>     <whatever implementation="java.lang.String">value</whatever>
> 
>     <whatever2 implementation="your.complex.Object">
>       <fieldname>value</fieldname>
>       <field2name>value2</field2name>
>     </whatever2>
> 
>     <!-- this seems to be broken right now:  -->
>     <complete.class.Name>....</complete.class.Name>
> 
>     <!-- java.lang.* : -->
>     <integer>1</integer>
>     <string>stringvalue</string>
> 
>   </items>
> 
> Map:
> 
>    <items>
>      <the_key>the value</the_key>
>      <another_key>another value</another_key>
>      ...
>    </items>
> 
> 
> 
> Properties:
> 
>   <items>
>     <whatever>
>       <name>the key</name>
>       <value>the value</value>
>     </whatever>
>     ..
>   </items>
> 
> JavaBeans:
> 
>   when 'items' maps to a field that is a JavaBean, it is treated
>   the same as the top-level 'configuration' tag, that is mapped
>   to the component instance.
> 
> 
>>/**
>> * Items to be processed, defaults to the empty set.
>> *
>> * @parameter
>> */
>>private Set items = Collections.EMPTY_SET;
>>
>><configuration>
>>  <items>???</items>
>></configuration>
>>
>>Kind Regards,
>>John Fallows.
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 
> 
> --
> Kenney Westerhof
> http://www.neonics.com
> GPG public key: http://www.gods.nl/~forge/kenneyw.key
> 
> ---------------------------------------------------------------------
> 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: [m2] plugin parameter value configuration for non primitive types?

Posted by Kenney Westerhof <fo...@neonics.com>.
On Fri, 15 Jul 2005, John Fallows wrote:

> What syntax is supported for M2 Plugin parameters of non-primitive types?
>
> For example, java.util.Collection (and subclasses), java.util.Map (and
> subclasses), arrays, Properties and JavaBeans.

Collections / arrays:

  <items>
    <whatever implementation="java.lang.String">value</whatever>

    <whatever2 implementation="your.complex.Object">
      <fieldname>value</fieldname>
      <field2name>value2</field2name>
    </whatever2>

    <!-- this seems to be broken right now:  -->
    <complete.class.Name>....</complete.class.Name>

    <!-- java.lang.* : -->
    <integer>1</integer>
    <string>stringvalue</string>

  </items>

Map:

   <items>
     <the_key>the value</the_key>
     <another_key>another value</another_key>
     ...
   </items>



Properties:

  <items>
    <whatever>
      <name>the key</name>
      <value>the value</value>
    </whatever>
    ..
  </items>

JavaBeans:

  when 'items' maps to a field that is a JavaBean, it is treated
  the same as the top-level 'configuration' tag, that is mapped
  to the component instance.

>
> /**
>  * Items to be processed, defaults to the empty set.
>  *
>  * @parameter
>  */
> private Set items = Collections.EMPTY_SET;
>
> <configuration>
>   <items>???</items>
> </configuration>
>
> Kind Regards,
> John Fallows.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

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