title: How use maven profile propertied in project config.properties
body: <p>I'd use different environments to run testng tests. In pom.xml I specified my profiles like:</p>
  
  <pre><code>&lt;profiles&gt;
      &lt;profile&gt;
          &lt;id&gt;local&lt;/id&gt;
          &lt;properties&gt;
              &lt;browser.name&gt;firefox&lt;/browser.name&gt;
              &lt;site.url&gt;my_url1&lt;/site.url&gt;
          &lt;/properties&gt;
      &lt;/profile&gt;
      &lt;profile&gt;
          &lt;id&gt;remote&lt;/id&gt;
          &lt;properties&gt;
              &lt;browser.name&gt;chrome&lt;/browser.name&gt;
              &lt;site.url&gt;my_url2&lt;/site.url&gt;
          &lt;/properties&gt;
      &lt;/profile&gt;
  &lt;/profiles&gt;
  </code></pre>
  
  <p>In config.properties I set following:</p>
  
  <pre><code>browser=${browser.name}
  siteUrl=${site.url}
  </code></pre>
  
  <p>In java code I read properties like:</p>
  
  <pre><code>    public static String getProp(String name) {
      Properties properties = new Properties();
      try {
          properties.load(PropertyReader.class.getResourceAsStream("/config.properties"));
      } catch (IOException e) {}
      String value = "";
      if (name != null) {
          value = properties.getProperty(name);
      }
      return value;
  }
  </code></pre>
  
  <p>When I try to run tests using <code>mvn test -Plocal</code> I got errors because properties are not read correctly and browser is equal "${browser.name}" instead of "firefox". How could I fix this?</p>