Maven错误,如何修复“错误合并速度模板:(无此类文件或目录)”

时间:2019-07-31 12:03:09

标签: java maven ubuntu

我是Maven构建工具的新手,并且已将其安装在本地Ubuntu上 我训练的机器。

运行cmd之后,我试图构建一个示例项目(本地计算机),它向我显示错误。

mvn archetype:generate

     org.apache.maven.archetype.exception.ArchetypeGenerationFailure: Error
        merging velocity templates: /usr/local/apache/training/banking/pom.xml
   (No such file or directory)

我已经检查了堆栈溢出中的先前帖子,但未成功

Maven creating quickstart template

https://github.com/sakaiproject/sakai-wicket-maven-archetype/issues/5

1. XXXXX@krushna:~$ apt show maven

    Package: maven
    Version: 3.6.0-1
    Priority: optional
    Section: universe/java
    Origin: Ubuntu
    Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>

 2. XXXXx@krushna:~$ update-java-alternatives -l

    java-1.8.0-openjdk-amd64       1081       /usr/lib/jvm/java-1.8.0-openjdk-amd64

预期

maven has to build sample project (Build successful)

实际结果

Define value for property 'groupId': invenstor
Define value for property 'artifactId': banking
Define value for property 'version' 1.0-SNAPSHOT: : 0.1
Define value for property 'package' invenstor: : samplebank
Confirm properties configuration:
groupId: invenstor
artifactId: banking
version: 0.1
package: samplebank
 Y: : y
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: maven-archetype-quickstart:1.4
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: invenstor
[INFO] Parameter: artifactId, Value: banking
[INFO] Parameter: version, Value: 0.1
[INFO] Parameter: package, Value: samplebank
[INFO] Parameter: packageInPathFormat, Value: samplebank
[INFO] Parameter: package, Value: samplebank
[INFO] Parameter: version, Value: 0.1
[INFO] Parameter: groupId, Value: invenstor
[INFO] Parameter: artifactId, Value: banking
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:01 min
[INFO] Finished at: 2019-07-31T16:38:20+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project standalone-pom: org.apache.maven.archetype.exception.ArchetypeGenerationFailure: Error merging velocity templates: /usr/local/apache/training/banking/pom.xml (No such file or 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, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

0 个答案:

没有答案