2013-05-21 3 views
0

maven을 사용하여 새 Java 프로젝트를 만드는 동안 오류가 발생했습니다. envrionmnet 변수를 모두 설정하고 이제 maven cammand를 사용하여 프로젝트를 만들겠습니다. 이 명령을 사용할 때 빌드 오류가 발생했습니다.명령 줄을 사용하여 Java 프로젝트를 생성하는 동안 Maven 오류가 발생했습니다.

mvn archetype:generate -DgroupId=com.tutorial.test -DartifactId=hellowrld 
-DarchetypeArtifactId=maven-archetype-webapp 

도와주세요. 내가 놓친 게 있니?

이 전체 출력

[INFO] Scanning for projects...             
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.4.1: 
Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: 
Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1 
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3.1/maven-install-plugin-2.3.1.pom 
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-install-plugin:2.3.1: 
Plugin org.apache.maven.plugins:maven-install-plugin:2.3.1 or one of its dependencies could not be resolved: 
Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.3.1 
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.pom 
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-deploy-plugin:2.7: Plugin org.apache.maven.plugins:maven-deploy-plugin:2.7 or one of its dependencies could not be resolved: 
Failed to read artifact descriptor for org.apache.maven.plugins:maven-deploy-plugin:jar:2.7      
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-site-plugin/3.0/maven-site-plugin-3.0.pom          
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-site-plugin:3.0: Plugin org.apache.maven.plugins:maven-site-plugin:3.0 or one of its dependencies could not be resolved: 
Failed to read artifact descriptor for org.apache.maven.plugins:maven-site-plugin:jar:3.0        
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.pom 
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-antrun-plugin:1.3: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or one of its dependencies could not be resolved: 
Failed to read artifact descriptor for org.apache.maven.plugins:maven-antrun-plugin:jar:1.3      
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom     
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5: Plugin org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5 or one of its dependencies could not be resolved: 
Failed to read artifact descriptor for org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-beta-5                   
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/2.1/maven-dependency-plugin-2.1.pom 
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-dependency-plugin:2.1: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.1 or one of its dependencies could not be resolved: 
Failed to read artifact descriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:2.1   
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-release-plugin/2.0/maven-release-plugin-2.0.pom         
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-release-plugin:2.0: Plugin org.apache.maven.plugins:maven-release-plugin:2.0 or one of its dependencies could not be resolved: 
Failed to read artifact descriptor for org.apache.maven.plugins:maven-release-plugin:jar:2.0     
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml 
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml 
[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org 
[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org 
[WARNING] Failure to transfer org.apache.maven.plugins/maven-metadata.xml from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. 
Original error: Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org               
[WARNING] Failure to transfer org.codehaus.mojo/maven-metadata.xml from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. 
Original error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org 
[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ [INFO] Total time: 12.696s 
[INFO] Finished at: Tue May 21 05:33:14 ACT 2013        [INFO] Final Memory: 2M/127M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] No plugin found for prefix 'archetype' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\waqas.ali\.m2\repository), central (http://repo.maven.apache.org/maven2)] -> [Help 1] 
+4

처음에는 ** 생성 ** 대신 ** 생성 **을 사용하는 것을 볼 수 있습니다. 또한 오류 메시지가없는 것을 추측하기는 어렵습니다. – khmarbaise

+0

나는 generate를 사용했지만 동일한 오류가 발생했습니다. 명령 프롬프트를 사용 중이고 해당 오류를 복사하는 방법을 모름 –

+0

어떤 오류가 있습니까? output..complete 출력을 보여주십시오! – khmarbaise

답변

0

내가 프록시 뒤에있는 생각이다,

mvn -DproxySet=true -DproxyHost=myproxy.com -DproxyPort=3128 archetype:generate

는 희망이 도움이 아래의 명령을 사용하십시오.

+0

작동하지 않음 –

0

이 명령은 WS 용 Spring 프로젝트를 생성하는 데 사용되었으며 성공적으로 작성되었습니다.

mvn archetype:create -DarchetypeGroupId=org.springframework.ws -DarchetypeArtifactId=spring-ws-archetype -DarchetypeVesrion=1.0.0 -DgroupId=com.mytutorial -DartifactId=simpleWeb2 

희망이 도움이 될 것입니다.

관련 문제