我面临以下异常:
org.apache.maven.lifecycle.MissingProjectException:您指定的目标需要执行项目,但此目录中没有POM(C :)。请验证您是否从正确的目录中调用了Maven。
控制台日志:
[DEBUG] Reading global settings from C:\Program Files\apache-maven-3.2.5\conf\settings.xml
[DEBUG] Reading user settings from C:\Users\user_aaa\.m2\settings.xml
[DEBUG] Using local repository at C:\path\to\local\repo
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for C:\path\to\local\repo
[INFO] Scanning for projects...
[DEBUG] Extension realms for project org.apache.maven:standalone-pom:pom:1: (none)
[DEBUG] Looking up lifecyle mappings for packaging pom from ClassRealm[plexus.core, parent: null]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.078 s
[INFO] Finished at: 2017-09-12T17:05:08+08:00
[INFO] Final Memory: 5M/123M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\). Please verify you invoked Maven from the correct directory. -> [Help 1] org.apache.maven.lifecycle.MissingProjectException: The goal you specified requires a project to execute but there is no POM in this directory (C:\). Please verify you invoked Maven from the correct directory.
Maven版本信息:
C:\>mvn -X version
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-15T01:29:23+08:00)
Maven home: C:\Program Files\apache-maven-3.2.5
Java version: 1.8.0_144, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_144\jre
Default locale: en_US, platform encoding: MS950_HKSCS
OS name: "windows 8.1", version: "6.3", arch: "amd64", family: "dos"
我是否需要自己设置pom.xml
?怎么样和在哪里?我是否在Windows中正确安装了Maven?
答案 0 :(得分:2)
执行mvn命令的当前目录似乎不包含pom.xml 只需将当前目录更改为pom所在的位置,然后在那里执行mvn命令。
答案 1 :(得分:1)
查找In [109]: df.stack().reset_index() \
.rename(columns={'level_0':'Area','level_1':'variable',0:'value'})
Out[109]:
Area variable value
0 AU 1980 33.7
1 AU 1981 38.8
2 AU 1982 40.2
3 AU 1983 42.5
4 AU 1979 29.8
5 AU 1980 33.7
6 AU 1981 38.8
7 AU 1982 40.2
8 BE 1980 54.6
9 BE 1981 51.6
10 BE 1982 49.7
11 BE 1983 48.9
12 BE 1979 54.2
13 BE 1980 54.6
14 BE 1981 51.6
15 BE 1982 49.7
16 CA 1979 39.4
17 CA 1980 44.3
18 CA 1981 50.6
19 CA 1982 48.0
20 DK 1978 58.0
21 DK 1979 57.2
22 DK 1980 54.5
23 DK 1981 53.2
24 FI 1980 43.2
25 FI 1981 49.6
26 FI 1982 58.8
27 FI 1983 71.1
28 FI 1978 37.7
29 FI 1979 43.2
30 FI 1980 49.6
31 FI 1981 58.8
32 FR 1978 41.6
33 FR 1979 49.9
34 FR 1980 55.4
35 FR 1981 58.5
版本的命令是
maven
虽然mvn -X -version
是一个调试选项,但在这里是多余的。
如果你想执行一个项目。
我需要自己设置pom.xml吗?如何以及在哪里?
您可以在顶级目录的基于maven的项目中创建-X
。 first maven project sample 将在这里帮助你。