title: Publish custom maven artifact/package (*.jar) to Azure artifact as well as to Nexus using azure DevOps pipeline
body: <p>I want to push my custom artifact/package (*.jar) to the Azure artifact &amp; Nexus using maven with the help of Azure DevOps pipeline.
  I am using java &amp; building the package using maven.</p>
  <p>I can do it by the below scripts/commands in the Azure pipeline.</p>
  <pre><code> mvn deploy:deploy-file -DgroupId=&quot;com.mypkg&quot; `
  -DartifactId=&quot;my.artifact&quot; `
  -Dversion=&quot;1.0.0-SNAPSHOT&quot; `
  -Dpackaging=jar `
  -Dfile=&quot;my.artifact-1.0.0-SNAPSHOT.jar&quot; `
  -DgeneratePom=&quot;true&quot; `
  -DrepositoryId=&quot;$AZURE_FEED_ID&quot; `
  -Durl=&quot;$AZURE_FEED_URL&quot;;
  </code></pre>
  <p>I want to know if this can be done by a single &quot;- task: Maven@3&quot; without writing this task for both Nexus &amp; AZ artifacts.</p>
  <p>and what if we have more than one artifact (different groupID &amp; artifactID) to be deployed to both Nexus &amp; AZ artifact</p>