I figured it out. It appears that in order to get the -Dparam=value to work, you *must* specify the @Parameter annotation's "property" element. Is this expected behavior?
If so, the javadocs at http://maven.apache.org/plugin-tools/maven-plugin-annotations/apidocs/org/apache/maven/plugins/annotations/Parameter.html are a little misleading and/or incomplete. -- Robert Patrick <HYPERLINK "mailto:[email protected]"[email protected]> VP, FMW Architects Team: The A-Team Oracle Corporation Office: +1.940.725.0011 1148 Triple Crown Court Fax: +1.940.725.0012 Bartonville, TX 76226, USA Mobile: +1.469.556.9450 A-Team Chronicles Blog: http://www.ateam-oracle.com/ HYPERLINK "http://www.amazon.com/Professional-Oracle-WebLogic-Server-Patrick/dp/0470484306/"Professional Oracle WebLogic Server by Robert Patrick, Gregory Nyberg, and Philip Aston with Josh Bregman and Paul Done Book Home Page: HYPERLINK "http://www.wrox.com/WileyCDA/WroxTitle/Professional-Oracle-WebLogic-Server.productCd-0470484306.html"http://www.wrox.com/ Kindle Version: HYPERLINK "http://www.amazon.com/Professional-Oracle-WebLogic-Server-ebook/dp/B004HD69J2/"http://www.amazon.com/ From: Robert Patrick Sent: Friday, September 20, 2013 1:03 AM To: [email protected] Subject: Stupid Question about plugin annotations It appears that the behavior for Maven plugins change depending on whether they use Javadoc-style annotations or Java annotations. With a plugin that uses Javadoc annotations, I can execute a plugin goal directly from the command-line and use -Dparam=value to pass in the configuration parameters (e.g., mvn rpatrick:my-plugin:1.0:my-goal -Dfoo=bar) and I see that the injection is happening properly so that the foo variable in the plugin has the value "bar" when executing. If I switch the plugin using the exact same code to use Java annotations, the injection is failing and foo is always null when the plugin executes.what am I missing? Sorry for the noise, Robert -- Robert Patrick <HYPERLINK "mailto:[email protected]"[email protected]> VP, FMW Architects Team: The A-Team Oracle Corporation Office: +1.940.725.0011 1148 Triple Crown Court Fax: +1.940.725.0012 Bartonville, TX 76226, USA Mobile: +1.469.556.9450 A-Team Chronicles Blog: http://www.ateam-oracle.com/ HYPERLINK "http://www.amazon.com/Professional-Oracle-WebLogic-Server-Patrick/dp/0470484306/"Professional Oracle WebLogic Server by Robert Patrick, Gregory Nyberg, and Philip Aston with Josh Bregman and Paul Done Book Home Page: HYPERLINK "http://www.wrox.com/WileyCDA/WroxTitle/Professional-Oracle-WebLogic-Server.productCd-0470484306.html"http://www.wrox.com/ Kindle Version: HYPERLINK "http://www.amazon.com/Professional-Oracle-WebLogic-Server-ebook/dp/B004HD69J2/"http://www.amazon.com/
