maven实战常见错误与解决方法
2016-03-18 15:47
381 查看
运行 mvn archetype:create -DgroupId=primary.simpleWeb \ -DartifactId=myWeb \ -DarchetypeArtifactId=maven-archetype-webapp \ -Dversion=1.0
错误:The goal you specified requires a project to execute but there is no POM in this directory (C:\Users\Administrator). Please verify you invoked Maven from the correct directory. -> [Help 1]
解决:上面的命令按照《maven权威指南》打的,原来上面的\只是用来做换行而已,需要去掉\。
然而,改掉\后仍然报错: Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:create (default-cli) on project standalone-pom: Unable to parse configuration of mojo org.apache.maven.plugins:maven-archetype-plugin:2.4:create for parameter #: Cannot create instance of interface org.apache.maven.artifact.repository.ArtifactRepository: org.apache.maven.artifact.repository.ArtifactRepository.() -> [Help 1]
解决:把上面的create改成generate即可,因为create是旧版的,现在已经没有了。
错误:The goal you specified requires a project to execute but there is no POM in this directory (C:\Users\Administrator). Please verify you invoked Maven from the correct directory. -> [Help 1]
解决:上面的命令按照《maven权威指南》打的,原来上面的\只是用来做换行而已,需要去掉\。
然而,改掉\后仍然报错: Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:create (default-cli) on project standalone-pom: Unable to parse configuration of mojo org.apache.maven.plugins:maven-archetype-plugin:2.4:create for parameter #: Cannot create instance of interface org.apache.maven.artifact.repository.ArtifactRepository: org.apache.maven.artifact.repository.ArtifactRepository.() -> [Help 1]
解决:把上面的create改成generate即可,因为create是旧版的,现在已经没有了。
相关文章推荐
- 访问Nginx发生SSL connection error的一种情况
- 星外虚拟主机访问被控出现Unspecified error解决方法
- IIS 错误 Server Application Error 详细解决方法
- On Error Resume Next 语句
- IIS运行错误 Server Application Error 错误代码 Error: 8004的解决方法
- Lua编程示例(一):select、debug、可变参数、table操作、error
- 收集整理的http/1.1 500 server error错误的解决方法
- SQL 2005 ERROR:3145 解决办法(备份集中的数据库备份与现有的数据库不同)
- VBScript中On Error语句用法小结
- 解决VC++编译报错error C2248的方案
- jQuery Uploadify 上传插件出现Http Error 302 错误的解决办法
- JQuery ajax中error返回错误及一直返回error的解答
- PHP函数之error_reporting(E_ALL ^ E_NOTICE)详细说明
- node.js使用npm 安装插件时提示install Error: ENOENT报错的解决方法
- PHP 5.3和PHP 5.4出现FastCGI Error解决方法
- 解决mysql ERROR 1017:Can't find file: '/xxx.frm' 错误
- MYSQL ERROR 1045 (28000): Access denied for user (using password: YES)问题的解决
- vs2012 error c4996: This function or variable may be unsafe
- php异常:Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE eval()'d code error
- ERROR/AndroidRuntime(17121)的问题解决