2016-03-31 20 views
2

oluştururken Cant arketip istenen bulmak: Ben Wildfly arketip wildfly-javaee7-webapp-archetype kullanmaya çalışıyorumaşağıdaki komutu kullanarak, ben terminalde yeni Maven projesi oluşturmak çalışıyorum yeni Maven projesi

mvn archetype:generate -DgroupId=com.my.domain -DartifactId=myproject -DarchetypeArtifactId=wildfly-javaee7-webapp-archetype -DinteractiveMode=false 

. arketip http://mvnrepository.com/artifact/org.wildfly.archetype tarafından sağlanan çünkü Maven, doğru değildir https://repo.maven.apache.org de arketip indirmeye çalışıyor demektir ki,

aşağıdaki hatayı alıyorum ...

[INFO] Generating project in Batch mode 
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/archetypes/wildfly-javaee7-webapp-archetype/1.0/wildfly-javaee7-webapp-archetype-1.0.jar 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 17.860 s 
[INFO] Finished at: 2016-03-31T14:35:27+02:00 
[INFO] Final Memory: 16M/188M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.apache.maven.archetypes:wildfly-javaee7-webapp-archetype:1.0) -> [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/MojoFailureException 

....

Kaynağı nasıl değiştirebilirim veya ek kaynakları nasıl ekleyebilirim? Yoksa farklı bir şeyi mi özlüyorum?

+0

pom hangi depoları içermiyor -DarchetypeVersion=8.1.0.Final için sürüm azaltma deneyin kabul edilen yanıt aşağıdaki sorunları yaşıyorsa? –

cevap

2

archetypeGroupId'u tanımlamanız gerekir, aksi halde varsayılan olarak varsayılan Mavisi varsayılan grupların groupId'si olur. Ayrıca, archetypeVersion'u tanımlamanız gerekir.

Bu durumda, archetypeGroupId=org.wildfly.archetype ve archetypeVersion=8.2.0.Final (for example) olması gerekir.

mvn archetype:generate -DgroupId=com.my.domain -DartifactId=myproject -DarchetypeGroupId=org.wildfly.archetype -DarchetypeArtifactId=wildfly-javaee7-webapp-archetype -DarchetypeVersion=8.2.0.Final -DinteractiveMode=false 
bir yan not olarak

, repo.maven.apache.org ve mvnrepository.com hem Maven Orta ve aynı eserler içerir:

Böylece olmalıdır.

+0

Sorunumu çözdüm! Çok teşekkür ederim! :) – John

İlgili konular