Search code examples
mavenmaven-2maven-pluginm2eclipsem2e

Deploy Artifact to Nexus from Eclipse


Is it possible to run mvn deploy from Eclipse using M2E? I have the distributionManagement section in my pom.xml and the server configured in my settings.xml, but I can't for the life of me see where I can fire of that specific goal.


Solution

  • If the distributionManagement section of your pom is setup properly and pointing to your Nexus, you just need to run the Maven

    deploy 
    

    goal.

    Assuming that you installed the m2eclipse Maven Eclipse plugin, right click your project or your pom, Run As>Maven build and enter the goal "deploy" on the goals line.

    If you did not install a Maven Eclipse plugin, add an External Tools configuration pointing to your Maven install for its "Location" and your project dir for its "working directory", with "deploy" as its argument.