Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

[error]Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy

I've created Maven-project in Intellij Idea and with trying to deploy of application, i've got an error. Help me to solve this problem, please.

 [INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project Er-Fly: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
like image 726
user2285891 Avatar asked Apr 16 '13 09:04

user2285891


1 Answers

Make sure that you have the repository element in the distributionManegement defined:

<distributionManagement>
    <repository>
        <id>central</id>
        <name>plugins-releases</name>
        <url>http://serverip:8081/artifactory/plugins-release-local</url>
    </repository>
    <snapshotRepository>
        <id>snapshots</id>
        <name>plugins-snapshot</name>
        <url>http://serverip:8081/artifactory/plugins-snapshot-local</url>
    </snapshotRepository>
</distributionManagement>

Also check that the username in your in maven .m2/settings.yml file has permission to PUT (upload) files to the artifactory.

like image 154
Rocologo Avatar answered Oct 28 '22 07:10

Rocologo