您好我想为jenkins编写插件并需要maven。 所以我安装maven并在cmd(Windows 7)中使用此命令检查安装:
mvn --version
输出就是这个
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06;
Maven home: C:\Program Files\maven
Java version: 1.8.0_60, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_60\jre
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "dos"
所以maven正确安装了。 但是当我尝试使用此命令创建项目时:
mvn archetype:create -DgroupId=com.itcuties -DartifactId=test
我得到了这个建筑失败
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 0.084 s
[INFO] Finished at: 2015-11-10T14:20:49+01:00
[INFO] Final Memory: 4M/15M
[INFO]
------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM
in this directory (C:\Users\meyers). Please verify you invoked Maven from the correct directory. -> [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,
read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN
/MissingProject
Exception
我阅读了文档,但没有用。 我在本教程中配置了maven
https://www.youtube.com/watch?v=FWstBgxcoXw
答案 0 :(得分:0)
mvn archetype:create -DgroupId=com.itcuties -DartifactId=test
需要pom.xml