当我跑步时
mvn archetype:generate
原型按预期列出,我被问到要使用哪种原型以及原型的哪个版本,但之后(看似)下载Maven只会挂起,直到我用Ctrl + C中断。
1627: remote -> us.fatehi:schemacrawler-archetype-plugin-dbconnector (-)
1628: remote -> us.fatehi:schemacrawler-archetype-plugin-lint (-)
1629: local -> org.glassfish.javaeetutorial.firstcup:dukes-age-archetype (dukes-age-archetype)
1630: local -> org.glassfish.javaeetutorial.firstcup:firstcup-war-archetype (The web front-end for the First Cup Tutorial example.)
1578
Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): 810: Choose org.wildfly.swarm:archetype version:
1: 1.0.0.Alpha6
2: 1.0.0.Alpha7
3: 1.0.0.Alpha8
3
Choose a number: 3: Downloading: http://repo.maven.apache.org/maven2/org/wildfly/swarm/archetype/1.0.0.Alpha8/archetype-1.0.0.Alpha8.jar
Downloaded: http://repo.maven.apache.org/maven2/org/wildfly/swarm/archetype/1.0.0.Alpha8/archetype-1.0.0.Alpha8.jar (3 KB at 16.6 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/wildfly/swarm/archetype/1.0.0.Alpha8/archetype-1.0.0.Alpha8.pom
Downloaded: http://repo.maven.apache.org/maven2/org/wildfly/swarm/archetype/1.0.0.Alpha8/archetype-1.0.0.Alpha8.pom (2 KB at 37.2 KB/sec)
我在不同网络上的两台计算机上遇到同样的问题,我说这对我的网络来说并不是一个问题,而是配置问题或Maven的一些深奥问题。
我的系统看起来像这样:
System #1:
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.8.0_91, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.2.0-27-generic", arch: "amd64", family: "unix"
System #2:
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.8.0_91, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-91-generic", arch: "amd64", family: "unix"
有趣的是运行它
mvn archetype:generate -DgroupId=org.meh -DartifactId=test -Dpackage=org.meh.test -DarchetypeGroupId=org.wildfly.swarm -DarchetypeArtifactId=archetype -DarchetypeVersion=1.0.0.Alpha8 -DinteractiveMode=false
但我需要交互模式才能在我的系统上运行,而且我真的不知道如何继续对其进行故障排除。
顺便说一句,使用Maven为我现有的项目进行常规构建工作正常。