2013-04-16 7 views
6

Ich habe Maven-Projekt in Intellij Idee erstellt und mit dem Versuch, die Anwendung zu implementieren, habe ich eine Error. Hilf mir, dieses Problem zu lösen, bitte.[Fehler] Fehler beim Ausführen des Ziels org.apache.maven.plugins: maven-deploy-plugin: 2.7: deploy

[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 
+0

Führen Sie den Befehl mit der Option -X aus, wie in der Ausgabe empfohlen. Dies spuckt den gesamten StackTrace aus, was es einfacher macht, das Problem zu lösen. –

+0

Welchen Befehl führen Sie aus? Es sieht so aus, als würden Sie Artefakte in ein Remote-Repository verschieben (Distributionsmanagement). Wie es scheint, ist @Rocologo die richtige Antwort. – SylvesterAbreu

Antwort

-2

Der Fehler ist hier: repository element was not specified in the POM. Siehe http://maven.apache.org/pom.html#Repositories, um das Element hinzuzufügen.

<project xmlns="http://maven.apache.org/POM/4.0.0" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
         https://maven.apache.org/xsd/maven-4.0.0.xsd"> 
    ... 
    <repositories> 
    <repository> 
     <releases> 
     <enabled>false</enabled> 
     <updatePolicy>always</updatePolicy> 
     <checksumPolicy>warn</checksumPolicy> 
     </releases> 
     <snapshots> 
     <enabled>true</enabled> 
     <updatePolicy>never</updatePolicy> 
     <checksumPolicy>fail</checksumPolicy> 
     </snapshots> 
     <id>codehausSnapshots</id> 
     <name>Codehaus Snapshots</name> 
     <url>http://snapshots.maven.codehaus.org/maven2</url> 
     <layout>default</layout> 
    </repository> 
    </repositories> 
    <pluginRepositories> 
    ... 
    </pluginRepositories> 
    ... 
</project> 
0

Stellen Sie sicher, dass Sie die definiert Repository Element im distributionManegement haben:

<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> 

Überprüfen Sie auch, dass der Benutzername in Ihrem in Maven .m2/settings.yml Erlaubnis muss PUT (upload) Dateien in das Artefakt.

Verwandte Themen