I am trying to modify my plugin to accept multiple parameters as a String
array or an ArrayList. In my mojo I have configured the following:

/**
     * An array of names of servers to deploy the target onto. the
deployment.
     *
     * @parameter 
     */
    private String[] serverName;

with getters and setters to support the type.  In my pom.xml I have the
following configured for the parameters in the plugin

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-sample-plugin</artifactId>
    <configuration>
        <serverName>myserver</serverName>
    </configuration>
</plugin>

When I run the plugin I get the following error message:


    (found static expression: 'myserver' which may act as a default value).


Cause: Cannot assign configuration entry 'serverName' to 'class
[Ljava.lang.String;' from 'myserver, which is of type class java.lang.String

I read the documentation on handling multiple parameters but did not seem to
understand the hints that were given.  Can anyone suggest what I am doing
wrong.  I am sure it is somewhere in my definition of the parameter in the
pom.xml.  Also any hints as to how to handle a List as well would be
appreciated.

Thanks




Scott D. Ryan
Chief Technology Officer
Soaring Eagle LLC.
9742 S. Whitecliff Place
Highlands Ranch, Co. 80129
(303) 263-3044
 [EMAIL PROTECTED] 
www.soaringeagleco.com   



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to