title: How do I set the defaultValue of a @Parameter in a Maven plugin as the result of a method?
body: <p>I'm working on a custom maven plugin for creating a custom packaging type.
  I've got it working and can build the zip file in the format I need.
  However, I've noticed that some configuration elements and variables depend on the name of the zip file.  </p>
  
  <p>The zip file has a special manifest file as part of it's format.  I want the parameter <strong>componentName</strong> to be a proper <code>@Parameter</code> so that other properties can depend on it via <code>${componentName}</code>.  </p>
  
  <p>I'd like to get the component name dynamically rather than forcing my users to specify it in another place.  The manifest file can sometimes contain it.  If not, there is usually another file in <code>${project.basedir}</code> that will have the same name as the component.</p>
  
  <p>I have a <code>private static final string getComponentName(File baseDir)</code> defined to calculate the component name when one isn't supplied.</p>
  
  <p>However </p>
  
  <pre><code>@Parameter(property = "componentName",
             defaultValue = getComponentName("${project.basedir}"))
  protected String componentName;
  </code></pre>
  
  <p>does not compile with a <code>ParseException: syntax error @[34,46] in file ...</code></p>
  
  <p>Is there a way to configure this to what I want? If so, how?</p>