You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Charles Honton <ch...@honton.org> on 2016/05/14 04:54:10 UTC

Plugin embedded configuration property configuration (cross posted after no response in maven users)

I'm creating a new plugin where i would like the to have "embedded" configuration. 

public abstract class MyAbstractMojo extends AbstractMojo {

    @Parameter
    private Embedded embedded;

Where the ”embedded" configuration pojo has property injection with default values.

@Named
public class Embedded {
    
    @Parameter(property=“embedded.name", defaultValue= "default")
    private String name;

    @Parameter(property=“embedded.autoCreate", defaultValue= "false")
    private Boolean autoCreate;

I expect the configuration xml would look like:
    
      <plugin>
        <groupId>my-group/groupId>
        <artifactId>my-artifact</artifactId>
        <version>${my.version}</version>
         <configuration>
          <embedded>
            <autoCreate>true</autoCreate>
          </embedded>

I have been unsuccessful in getting the property injection or default values to work.  Should
this work?  What am I missing?

thanks,
chas