title: How to read Maven properties from JUnit test?
body: <p>I'm using Maven 3.0.3 with JUnit 4.8.1.  In my JUnit test, how do I read the project.artifactId defined in my Maven pom.xml file?  In my pom, I have</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/xsd/maven-4.0.0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
  &lt;groupId&gt;com.myco.pplus2&lt;/groupId&gt;
  &lt;artifactId&gt;pplus2&lt;/artifactId&gt;
  </code></pre>
  
  <p>But this isn't working within my JUnit test to gete the artifact id ...</p>
  
  <pre><code>@Before
  public void setUp() { 
      ...        
      System.out.println( "artifactId:" + System.getProperty("project.build.sourceEncoding") ); 
  }   // setUp
  </code></pre>
  
  <p>The above outputs "artifactId:null".  Anyway, appreciate any help, - Dave</p>