mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=org.conan.myhadoop.mr
-DartifactId=myHadoop -DpackageName=org.conan.myhadoop.mr -Dversion=1.0-SNAPSHOT -DinteractiveMode
cmd输出卡死在Generating project in Interactive mode不动了
,-X 打开debug模式重试了一次:
mvn archetype:generate -X -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=org.conan.myhadoop.mr
-DartifactId=myHadoop -DpackageName=org.conan.myhadoop.mr -Dversion=1.0-SNAPSHOT -DinteractiveMode
原来是卡在这里了:
[DEBUG] -- end configuration --
[INFO] Generating project in Interactive mode
[DEBUG] Searching for remote catalog: http://repo1.maven.org/maven2/archetype-catalog.xml
加个参数 -DarchetypeCatalog=internal 让它不要从远程服务器上取catalog:
mvn archetype:generate -X -DarchetypeCatalog=internal -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=org.conan.myhadoop.mr
-DartifactId=myHadoop -DpackageName=org.conan.myhadoop.mr -Dversion=1.0-SNAPSHOT -DinteractiveMode