zoukankan      html  css  js  c++  java
  • 解决:mvn archetype:create Abstract class or interface 'org.apache.maven.artifact.repository.ArtifactRepository' cannot be instantiated

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2
    .3:create (default-cli) on project standalone-pom: Unable to parse configuration
     of mojo org.apache.maven.plugins:maven-archetype-plugin:2.3:create for paramete
    r #: Abstract class or interface 'org.apache.maven.artifact.repository.ArtifactR
    epository' cannot be instantiated -> [Help 1]
    

      

    在stackoverflow找到解决方式如下

    mvn archetype:generate -DgroupId=org.sonatype.mavenbook.ch03 -DartifactId=simple -DpackageName=org.sonatype.mavenbook -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

    修改start命令为generate

    参考网址为http://stackoverflow.com/questions/29147329/unable-to-create-a-new-maven-hello-world-project

    原因分析:create is deprecated in maven 3.0.5 and beyond,在maven3.0.5以上版本舍弃了create,今后使用generate生成项目

    CMD创建工程的时候还卡在Generating project in Interactive mode不动了 
    解决方法是加个参数 -DarchetypeCatalog=internal 让它不要从远程服务器上取catalog

    出现要输入选择项 一路回车就好了。

  • 相关阅读:
    《入门经典》——6.25
    《入门经典》——6.24
    hdu4417
    poj2104(划分树模板)
    D. 实验室传染病
    poj2069
    poj1379
    hdu5950
    poj3417
    LCA——求解最近公共祖先
  • 原文地址:https://www.cnblogs.com/jifeng/p/4749888.html
Copyright © 2011-2022 走看看