title: How can I make maven lookup properties from a file
body: <p>I am trying to make maven load my properties from a file like ~/home/user/file.prop.  Can someone please tell me how to change the following pom to support if the local profile was called how to get them from a file</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;org.uftwf&lt;/groupId&gt;
      &lt;artifactId&gt;MavenJbossWebDemo&lt;/artifactId&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;Maven and JBoss WebDemo Webapp&lt;/name&gt;
      &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
  
      &lt;properties&gt;
          &lt;java-version&gt;1.7&lt;/java-version&gt;
      &lt;/properties&gt;
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;id&gt;dev&lt;/id&gt;
              &lt;properties&gt;
                  &lt;deploy.jboss.host&gt;10.52.17.21&lt;/deploy.jboss.host&gt;
                  &lt;deploy.jboss.user&gt;admin&lt;/deploy.jboss.user&gt;
                  &lt;deploy.jboss.password&gt;redhat&lt;/deploy.jboss.password&gt;
              &lt;/properties&gt;
          &lt;/profile&gt;
  
          &lt;profile&gt;
              &lt;id&gt;local&lt;/id&gt;
              &lt;activation&gt;
                  &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
              &lt;/activation&gt;
              &lt;properties&gt;
                  &lt;deploy.jboss.host&gt;127.0.0.1&lt;/deploy.jboss.host&gt;
                  &lt;deploy.jboss.user&gt;xxx&lt;/deploy.jboss.user&gt;
                  &lt;deploy.jboss.password&gt;xxx&lt;/deploy.jboss.password&gt;
              &lt;/properties&gt;
          &lt;/profile&gt;
      &lt;/profiles&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;3.8.1&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;build&gt;
          &lt;finalName&gt;MavenJbossWebDemo&lt;/finalName&gt;
  
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.jboss.as.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;jboss-as-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;7.2.Final&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;hostname&gt;${deploy.jboss.host}&lt;/hostname&gt;
                      &lt;port&gt;${deploy.jboss.port}&lt;/port&gt;
                      &lt;username&gt;${deploy.jboss.user}&lt;/username&gt;
                      &lt;password&gt;${deploy.jboss.password}&lt;/password&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;deploy-jar&lt;/id&gt;
                          &lt;phase&gt;install&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;deploy&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>