You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Dennis Lundberg (JIRA)" <ji...@codehaus.org> on 2008/02/20 01:04:28 UTC

[jira] Updated: (MPLUGIN-55) Maven (plexus?) doesn't recognize Mojo parameter setters defined in a base class

     [ http://jira.codehaus.org/browse/MPLUGIN-55?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg updated MPLUGIN-55:
-----------------------------------

    Description: 
Create a Mojo class that extends some base class that itself defines a parameter that uses a setter.  Here's an example:

{code}
public class Base extends AbstractMojo
{
   /**
   * @parameter property="parameter"
   */
   private String m_parameter;

   public void setParameter(String parameter)
   {
      m_parameter = parameter; 
   }
...
}
{code}

{code}
/**
* @goal mygoal
*/
public class MyMojo extends Base
{
 ...
}
{code}


Maven can build the plugin just fine, but when I attempt to execute the goal, I get an error: org.codehaus.plexus.component.configurator.ComponentConfigurationException: Cannot access method: com.example.MyMojo.setParameter( java.lang.Class ).

If I move the setter to the goal class, it works just fine.  Maven (plexus?) should be able to access the method from the base class.

  was:
Create a Mojo class that extends some base class that itself defines a parameter that uses a setter.  Here's an example:

public class Base extends AbstractMojo
{
   /**
   * @parameter property="parameter"
   */
   private String m_parameter;

   public void setParameter(String parameter)
   {
      m_parameter = parameter; 
   }
...
}

/**
* @goal mygoal
*/
public class MyMojo extends Base
{
 ...
}

Maven can build the plugin just fine, but when I attempt to execute the goal, I get an error: org.codehaus.plexus.component.configurator.ComponentConfigurationException: Cannot access method: com.example.MyMojo.setParameter( java.lang.Class ).

If I move the setter to the goal class, it works just fine.  Maven (plexus?) should be able to access the method from the base class.


> Maven (plexus?) doesn't recognize Mojo parameter setters defined in a base class
> --------------------------------------------------------------------------------
>
>                 Key: MPLUGIN-55
>                 URL: http://jira.codehaus.org/browse/MPLUGIN-55
>             Project: Maven 2.x Plugin Tools
>          Issue Type: Improvement
>            Reporter: David Jackman
>            Priority: Minor
>
> Create a Mojo class that extends some base class that itself defines a parameter that uses a setter.  Here's an example:
> {code}
> public class Base extends AbstractMojo
> {
>    /**
>    * @parameter property="parameter"
>    */
>    private String m_parameter;
>    public void setParameter(String parameter)
>    {
>       m_parameter = parameter; 
>    }
> ...
> }
> {code}
> {code}
> /**
> * @goal mygoal
> */
> public class MyMojo extends Base
> {
>  ...
> }
> {code}
> Maven can build the plugin just fine, but when I attempt to execute the goal, I get an error: org.codehaus.plexus.component.configurator.ComponentConfigurationException: Cannot access method: com.example.MyMojo.setParameter( java.lang.Class ).
> If I move the setter to the goal class, it works just fine.  Maven (plexus?) should be able to access the method from the base class.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira