【问题标题】:How to debug "The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exist or no valid version could be found"?如何调试“插件'org.apache.maven.plugins:maven-archetype-plugin'不存在或找不到有效版本”?
【发布时间】:2015-11-24 08:45:56
【问题描述】:

这就是我想要做的。我已经安装了 Maven。设置路径到 Maven 的 bin 文件夹。

C:\Workspace\Eaxample>mvn archetype:generate -DgroupId=com.mkyong -DartifactId=N
umberGenerator
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] org.apache.maven.plugins: checking for updates from central
[WARNING] repository metadata for: 'org.apache.maven.plugins' could not be retri
eved from repository: central due to an error: Error transferring file: Connecti
on timed out: connect
[INFO] Repository 'central' will be blacklisted
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exi
st or no valid version could be found
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21 seconds
[INFO] Finished at: Tue Nov 24 14:04:15 IST 2015
[INFO] Final Memory: 5M/122M

【问题讨论】:

    标签: maven maven-plugin


    【解决方案1】:
    You forget archetypeArtifactId :
    
    Do this :
    mvn archetype:generate -DgroupId={project-packaging} 
       -DartifactId={project-name} 
       -DarchetypeArtifactId=maven-archetype-quickstart 
       -DinteractiveMode=false
    

    http://www.mkyong.com/maven/how-to-create-a-java-project-with-maven/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-04-15
      • 1970-01-01
      • 2021-04-11
      • 2016-10-05
      • 2013-09-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多