mvn archetype:制作Web应用程序时生成错误

时间:2015-07-02 14:50:48

标签: maven

我正在安装Maven,但在说mvn archetype时终端遇到了问题:生成,因为我遇到了一个错误说,

[INFO] Using following parameters for creating project from Archetype: webapp-j2ee14:1.3 
[INFO] ---------------------------------------------------------------------------- 
[INFO] Parameter: groupId, Value: org.koushik.javabrains 
[INFO] Parameter: artifactId, Value: mywebapp 
[INFO] Parameter: version, Value: 1.0-SNAPSHOT 
[INFO] Parameter: package, Value: org.koushik.javabrains 
[INFO] Parameter: packageInPathFormat, Value: org/koushik/javabrains  
[INFO] Parameter: package, Value: org.koushik.javabrains 
[INFO] Parameter: version, Value: 1.0-SNAPSHOT 
[INFO] Parameter: groupId, Value: org.koushik.javabrains 
[INFO] Parameter: artifactId, Value: mywebapp 
[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 7:47.706s 
[INFO] Finished at: Thu Jul 02 09:49:10 CDT 2015 
[INFO] Final Memory: 17M/309M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.3:generate (default-cli) on project MavenTestApp: org.apache.maven.archetype.exception.InvalidPackaging: Unable to add module to the current project as it is not of packaging type 'pom' -> [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, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException" 

我正在关注youtube上有关频道javabrains的教程(特别是对于Maven,这里是链接," https://www.youtube.com/watch?v=mpNnbBmh5J4&list=PL92E89440B7BFD0F6&index=6"

1 个答案:

答案 0 :(得分:2)

您可能在具有现有pom的文件夹中执行此操作,原型正在尝试将新项目添加为当前文件夹pom的模块,但模块只能在pom.xml中添加“pom”类型的包“