Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on p

Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project zxsd-app: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]


发布本地项目到远程nexus私服抛了异常,这个提示意思是本项目不知道发不到哪个仓库,需要指明,项目是发布到哪个仓库id的


修改maven的settings.xml你要发布到哪个仓库,需要这个仓库的权限,snapshot,这个是吧快照的war或者jar上传到snapshot仓库,releases把稳定版本的war或jar上传到releases仓库


Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on p_第1张图片


    4.0.0
    com.zxsd
    zxsd-app
    1.0.0-SNAPSHOT
    pom
        
    
         
            releases  
            Nexus Release Repository  
            http://192.168.1.122:8081/nexus/content/repositories/releases/  
       
 
         
            snapshots  
            Nexus Snapshot Repository  
            http://192.168.1.122:8081/nexus/content/repositories/snapshots/  
       

    


这个是你要上传项目的pom配置,version后缀为SNAPSHOT是需要上传到snapshots库的

            snapshots  
            Nexus Snapshot Repository  
            http://192.168.1.122:8081/nexus/content/repositories/snapshots/ 
这段就是控制上传到私有库的代码


Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on p_第2张图片


eclipse上传 该项目 上传成功

Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on p_第3张图片

你可能感兴趣的:(maven)