• maven buid 导出项目依赖的jar包问题


    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:copy-dependencies (default-cli) on project net-scan: Execution default-cli of goal org.apache.maven.plugins:maven-dependency-plugin:2.8:copy-dependencies failed: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.8 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven:maven-artifact:jar:2.0.9, org.apache.maven:maven-plugin-api:jar:2.0.9, org.apache.maven:maven-project:jar:2.0.9, org.apache.maven:maven-settings:jar:2.0.9, org.apache.maven:maven-profile:jar:2.0.9, org.apache.maven:maven-plugin-registry:jar:2.0.9, org.apache.maven:maven-model:jar:2.0.9, org.apache.maven:maven-core:jar:2.0.9, org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.9, org.apache.maven:maven-error-diagnostics:jar:2.0.9, org.apache.maven:maven-plugin-descriptor:jar:2.0.9, org.apache.maven:maven-monitor:jar:2.0.9, org.apache.maven:maven-artifact-manager:jar:2.0.9, org.apache.maven:maven-repository-metadata:jar:2.0.9, org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-6: Cannot access repo2 (http://repo2.maven.org/maven2/) in offline mode and the artifact org.apache.maven:maven-artifact:jar:2.0.9 has not been downloaded from it before. -> [Help 1]
    1、第一步

    2、第二步

    2、第三步

    org.apache.maven.plugins:maven-jar-plugin:2.4:jar dependency:copy-dependencies

    dependency:copy-dependencies

    注: Myeclipse10以管理员身份运行。

    解决-Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable and mvn script match.

    1.添加M2_HOME的环境变量

    如:Z:EnvironmentJavaapache-maven-3.3.9

    2.Preference->Java->Installed JREs->Edit 选择一个jdk,
    修改Default VM arguments的值:
    -Dmaven.multiModuleProjectDirectory=$M2_HOME

  • 相关阅读:
    树上路径
    [HNOI2017]礼物
    Spoj 8372 Triple Sums
    [Swerc2014 C]Golf Bot
    【bzoj2194】快速傅立叶之二 FFT
    Linux下perl模块安装
    angularjs form表单验证
    Angularjs兼容IE
    input file限制上传文件类型
    angularjs判断页面数据是否渲染完成
  • 原文地址:https://www.cnblogs.com/skyblue/p/5854015.html
Copyright © 2020-2023  润新知