title: How can I deploy only the pom file to my snapshot repository in Maven?
body: <p>I would like to be able to deploy only the POM artifact (file) without the main artifact (JAR, WAR, etc), when running <code>mvn deploy</code> and version is a SNAPSHOT version.</p>
  
  <p><strong>Why?</strong></p>
  
  <p>We several developers working on multiple Maven projects. We have a Hudson server with a job per Maven project and version (e.g. foo-1.2, foo-1.3). Each job builds the project and deploys it to a Nexus server (upon success). Maven projects under development are marked as such by using -SNAPSHOT postfix in the version. For example: 1.2-SNAPSHOT, 1.3-SNAPSHOT.</p>
  
  <p>Here's a sample scenario how a developer work is damaged due to this architecture.</p>
  
  <p>Assume two Maven projects: foo-core and foo-webapp, both at version 1.2-SNAPSHOT.</p>
  
  <ul>
  <li>Developer A is working on foo-core, made several changes and compiled it.</li>
  <li>Developer A continues to work, but on foo-webapp.</li>
  <li>Developer B started working and changing foo-core. It commits his work and pushes it to the SCM.</li>
  <li>Hudson is triggered by SCM; Builds foo-core and deploys it to the snapshot repository in Nexus.</li>
  <li>Developer A is running <code>mvn install</code> on foo-webapp. Maven is checking with Nexus, and finds that there is a newer version of foo-core in Nexus. It downloads it (filled with developer B changes) and than it fails compilation, since the changes made by developer A are not in the jar located in the local repository. The download overrides the file installed there by developer A.</li>
  </ul>
  
  <p><strong>Existing Solutions</strong></p>
  
  <p>I looked into maven-deploy-plugin, but this plugin deploys all artifacts attached to the project. If they had a way to configure which artifacts to deploy, it would have been great.</p>
  
  <p><strong>Question</strong>: Is there any way to solve this without resorting to writing my own deploy plugin, based on maven-deploy-plugin?</p>