title: How to override maven property in command line?
body: <p>I have the following plain pom running by Maven 3.0.4.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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.example&lt;/groupId&gt;
      &lt;artifactId&gt;test&lt;/artifactId&gt;
      &lt;version&gt;1.0&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>I am trying to override default settings in command line like this:</p>
  
  <pre><code>mvn -Dproject.build.finalName=build clean package
  </code></pre>
  
  <p>But this this is ignored, and I get <code>test-1.0.jar</code>. I've tried to change another properties, like outputDirectory, directory, artifactId, but also failed.</p>
  
  <p>What is the proper way to do this thing?</p>