According to
http://maven.apache.org/guides/mini/guide-configuring-plugins.html (at
the bottom), you can use setters for the Mojo parameters so your private
field can use a different naming convention.  However, when I tried to
do this, it didn't work.  Am I doing something wrong?  Here's my Mojo
class.
 
..David..
 
/**
 * My example Mojo (taken from the Maven Guide to Developing Java
Plugins).
 * 
 * @goal sayhi
 * @description My hello world plugin.
 */
public class GreetingMojo extends AbstractMojo
{
    /**
     * The greeting to display.
     * @parameter expression="Hello"
     */
    private String m_greeting;
    
    
    /**
     * Sets the greeting.
     * 
     * @param greeting  the greeting to use.
     */
    public void setGreeting(String greeting)
    {
        m_greeting = greeting;
    }
    
    
    /**
     * @see org.apache.maven.plugin.Mojo#execute()
     */
    public void execute() throws MojoExecutionException,
MojoFailureException
    {
        getLog().info(m_greeting + ", world!");
    }
}

Reply via email to