title: How to deploy the sources file with the jar using deploy:deploy-file
body: <p>I have the following plugins for creating a <code>-sources.jar</code> and deploying a specific named jar to a repository. </p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-source-plugin&lt;/artifactId&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;id&gt;attach-sources&lt;/id&gt;
              &lt;goals&gt;
                  &lt;goal&gt;jar&lt;/goal&gt;
              &lt;/goals&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  &lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-deploy-plugin&lt;/artifactId&gt;
      &lt;version&gt;2.5&lt;/version&gt;
      &lt;configuration&gt;
          &lt;version&gt;${project.version}-r${buildNumber}&lt;/version&gt;
          &lt;classifier&gt;${env}&lt;/classifier&gt;
          &lt;packaging&gt;jar&lt;/packaging&gt;
          &lt;file&gt;${project.build.directory}/${project.build.finalName}.jar&lt;/file&gt;
          &lt;url&gt;${artifactory.url}/libs-release-local&lt;/url&gt;
          &lt;repositoryId&gt;artifactory.digiterre.com&lt;/repositoryId&gt;
          &lt;pomFile&gt;${project.basedir}/pom.xml&lt;/pomFile&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>I wish to deploy the <code>*-sources.jar</code> at the same time. I have tried adding a second file entry and even a second deploy plugin. I seem to get one or other file deployed. </p>
  
  <p>Is it possible to deploy both in one pass using <code>deploy:deploy-file</code> or will I have to set up a second team city build just to deploy the sources?</p>