2013-04-16 10 views
6

Stworzyłem projekt Maven w Intellij Idea i próbując wdrożyć aplikację, mam błąd. Pomóż mi rozwiązać ten problem, proszę.[błąd] Nie udało się wykonać celu org.apache.maven.plugins: maven-deploy-plugin: 2.7: wdrożyć

[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

uruchom polecenie za pomocą przełącznika -X zgodnie z zaleceniami na wyjściu. To wypluje cały stacktrace, co ułatwi zrozumienie problemu. –

+0

Które polecenie używasz? Wygląda na to, że próbujesz przenosić artefakty do zdalnego repozytorium (zarządzanie dystrybucją). Wygląda na to, że odpowiedź @Rocologo jest poprawna. – SylvesterAbreu

Odpowiedz

-2

Błąd jest tutaj: repository element was not specified in the POM. Zobacz http://maven.apache.org/pom.html#Repositories, aby dodać element.

<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

Upewnij się, że masz repozytorium element w distributionManegement zdefiniowane:

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

Sprawdź też, że nazwa użytkownika w maven .m2 pliku w/settings.yml ma uprawnienia do PUT (upload) pliki do artefakala.

Powiązane problemy