title: In maven multi-module project, how to package a single child-project?
body: <p>I'm working on a multimodule maven project. Some time ago, the project was partitioned into subprojects: </p>
  
  <ul>
  <li>"Common" JAR project</li>
  <li>"User" WAR project, depending on Common</li>
  <li>etc.</li>
  </ul>
  
  <p>It's the same project as described <a href="https://stackoverflow.com/questions/6158148/using-maven-how-to-properly-deploy-war-depending-on-j2ee-jpa-jar">here, in this question</a>. </p>
  
  <p>When I invoke <code>mvn package</code> at superproject level, command succeeds and resulting war can be deployed. But if I try to invoke <code>mvn package</code> at subproject level, command fails.</p>
  
  <pre><code>[ERROR] Failed to execute goal on project User: Could not resolve 
  dependencies for project xxx.xxx:User:war:0.0.1-SNAPSHOT: Failed 
  to collect dependencies for [xxx.xxx:Common:jar:0.0.1-SNAPSHOT (compile), ...
  </code></pre>
  
  <p>Apparently maven is trying to download my own project (Common) from remote repo...</p>
  
  <pre><code>Downloading: http://repository.jboss.org/maven2/xxx/xxx/Common/0.0.1-SNAPSHOT/maven-metadata.xml
  Downloading: http://download.java.net/maven/glassfish/xxx/xxx/Common/0.0.1-SNAPSHOT/maven-metadata.xml
  [WARNING] Could not transfer metadata xxx.xxx:Common:0.0.1-SNAPSHOT/maven-metadata.xml from/to jboss (http:/
  /repository.jboss.org/maven2): Access denied to: http://repository.jboss.org/maven2/xxx/xxx/common/0.0.1-SNA
  PSHOT/maven-metadata.xml
  </code></pre>
  
  <p><strong>What could possibly be wrong in my config?</strong></p>