title: log4j, maven jar plugin, and properties file
body: <p>I'm creating a jar with the maven-jar-plugin. I can't for the life of me get this jar to read a log4j properties file which is in the same directory as my jar file. My steps are:</p>
  
  <ol>
  <li>mvn package</li>
  <li>copy log4j.properties to target dir</li>
  <li>java -Dlog4j.configuration = log4j.properties -cp . -jar Myjar</li>
  </ol>
  
  <p>I've tried multiple variations of this. It seems like this should be an easy thing to do.</p>
  
  <p>FWIW here's the relevant part of my POM:</p>
  
  <pre><code>        &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                  &lt;archive&gt;
                      &lt;manifest&gt;
                          &lt;mainClass&gt;loadtester.TestClient&lt;/mainClass&gt;
                          &lt;packageName&gt;loadtester&lt;/packageName&gt;
                          &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                          &lt;classpathPrefix&gt;dependency&lt;/classpathPrefix&gt;
                      &lt;/manifest&gt;
                  &lt;/archive&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;copy-dependencies&lt;/id&gt;
                      &lt;phase&gt;process-resources&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;copy-dependencies&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  </code></pre>