title: Inject Maven parameter into Java class
body: <p>I would like to inject settings.xml profile parameters into Java class. I tried to use maven-annotation-plugin but values came as null. I wonder if this is because this plugin is designed for Mojo</p>
  
  <p>Setting.xml snippet</p>
  
  <pre class="lang-xml prettyprint-override"><code>  &lt;profiles&gt;
      &lt;profile&gt;
        &lt;id&gt;APP_NAME&lt;/id&gt;
        &lt;properties&gt;
          &lt;test.email&gt;USER_EMAIL&lt;/test.email&gt;
          &lt;test.password&gt;USER_PASSWORD&lt;/test.password&gt;
        &lt;/properties&gt;
      &lt;/profile&gt;
    &lt;/profiles&gt;
  </code></pre>
  
  <p>In class</p>
  
  <pre><code>@Parameter(defaultValue = "test.email", readonly = true)
  private String userEmail;
  
  @Parameter(defaultValue = "test.password", readonly = true)
  private String userPassword;
  </code></pre>