0

我正在使用我刚刚下载并在系统变量中配置的 mvn 3.1.0,因此我只需启动一个 cmd 并键入以下内容:

mvn --version

C:\Users\CGITS-02\workspace>mvn --version
Apache Maven 3.1.0 (893ca28a1da9d5f51ac03827af98bb730128f9f2; 2013-06-28 07:45:32+0530)
Maven home: C:\Program Files\Apache Software Foundation\apache-maven-3.1.0
Java version: 1.7.0_21, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_21\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"

mvn archetype:create -DgroupId=com.mmm -DartifactId=ui

C:\Users\CGITS-02\workspace>mvn archetype:create -DgroupId=com.mmm -DartifactId=ui
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-archetype-plugin:2.2:create (default-cli) @ standalone-pom ---
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven/2.0.8/ma
ven-2.0.8.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven/2.0.8/mav
en-2.0.8.pom (12 KB at 7.9 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/6
/maven-parent-6.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/6/
maven-parent-6.pom (20 KB at 24.6 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-project/
2.0.8/maven-project-2.0.8.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-project/2
.0.8/maven-project-2.0.8.pom (3 KB at 5.1 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-settings
/2.0.8/maven-settings-2.0.8.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-settings/
2.0.8/maven-settings-2.0.8.pom (3 KB at 3.9 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-cont
ainer-default/1.0-alpha-9-stable-1/plexus-container-default-1.0-alpha-9-stable-1
.pom
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-conta
iner-default/1.0-alpha-9-stable-1/plexus-container-default-1.0-alpha-9-stable-1.
pom (4 KB at 6.9 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-cont
ainers/1.0.3/plexus-containers-1.0.3.pom
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-conta
iners/1.0.3/plexus-containers-1.0.3.pom (492 B at 1.0 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/1.0.
4/plexus-1.0.4.pom
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/1.0.4
/plexus-1.0.4.pom (6 KB at 10.5 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/classworlds/classworlds/1.1-alp
ha-2/classworlds-1.1-alpha-2.pom
Downloaded: http://repo.maven.apache.org/maven2/classworlds/classworlds/1.1-alph
a-2/classworlds-1.1-alpha-2.pom (4 KB at 5.3 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-profile/
2.0.8/maven-profile-2.0.8.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-profile/2
.0.8/maven-profile-2.0.8.pom (2 KB at 3.3 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact
-manager/2.0.8/maven-artifact-manager-2.0.8.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact-
manager/2.0.8/maven-artifact-manager-2.0.8.pom (3 KB at 4.9 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-reposito
ry-metadata/2.0.8/maven-repository-metadata-2.0.8.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-repositor
y-metadata/2.0.8/maven-repository-metadata-2.0.8.pom (2 KB at 3.7 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact
/2.0.8/maven-artifact-2.0.8.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact/
2.0.8/maven-artifact-2.0.8.pom (2 KB at 2.8 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-r
egistry/2.0.8/maven-plugin-registry-2.0.8.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-re
gistry/2.0.8/maven-plugin-registry-2.0.8.pom (2 KB at 3.8 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-i
nvoker/2.0.11/maven-invoker-2.0.11.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-in
voker/2.0.11/maven-invoker-2.0.11.pom (5 KB at 8.9 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-s
hared-components/12/maven-shared-components-12.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-sh
ared-components/12/maven-shared-components-12.pom (10 KB at 16.7 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/1
3/maven-parent-13.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/13
/maven-parent-13.pom (23 KB at 27.9 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-velo
city/1.1.8/plexus-velocity-1.1.8.pom
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-veloc
ity/1.1.8/plexus-velocity-1.1.8.pom (2 KB at 3.6 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-comp
onents/1.1.15/plexus-components-1.1.15.pom
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compo
nents/1.1.15/plexus-components-1.1.15.pom (3 KB at 5.3 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/2.0.
3/plexus-2.0.3.pom
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/2.0.3
/plexus-2.0.3.pom (16 KB at 25.7 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/commons-collections/commons-col
lections/3.2.1/commons-collections-3.2.1.pom
Downloaded: http://repo.maven.apache.org/maven2/commons-collections/commons-coll
ections/3.2.1/commons-collections-3.2.1.pom (13 KB at 22.4 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/commons/commons-pare
nt/9/commons-parent-9.pom
19/22 KB

然后它突然停止了,之后我不知道如何解决这个问题?

4

2 回答 2

0

尝试这个

mvn archetype:generate -DgroupId=com.mmm -DartifactId=ui
于 2013-08-22T06:59:03.240 回答
0

您可以尝试使用archetype:generate,因为archetype:create它已经折旧,但您仍然可以使用它,您必须确保您使用的是支持的正确原型插件版本create

archetype:create 是旧的和已弃用的形式,需要在启动时定义所有属性。

archetype:generate 是更新和更舒适的方式。archetype:generate 知道列出原型的那些目录,并且可以询问您缺少的属性/变量。

archetype:generate 您也可以参考这里的 Maven 规范。

于 2013-08-22T07:45:27.487 回答