您现在的位置: 爱51代码网 >> 主页设计 >> 文章正文
maven如何加自定义的包

[ERROR] Failed to execute goal on project system_datacenter: Could not resolve dependencies for project com.harmony.civilaffairs:system_datacenter:war:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.harmony.hap:hap-mybatis:jar:1.0, com.harmony.hap:attachment-mybatis:jar:1.0, com.harmony.apportal:harmony-common:jar:2.3, com.harmony.apportal:harmony-client:jar:2.3: Failure to find com.harmony.hap:hap-mybatis:jar:1.0 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project system_datacenter: Could not resolve dependencies for project com.harmony.civilaffairs:system_datacenter:war:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.harmony.hap:hap-mybatis:jar:1.0, com.harmony.hap:attachment-mybatis:jar:1.0, com.harmony.apportal:harmony-common:jar:2.3, com.harmony.apportal:harmony-client:jar:2.3: Failure to find com.harmony.hap:hap-mybatis:jar:1.0 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
    at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:210)
    at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:117)
    at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:258)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:201)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
myeclipse8.6 maven 3.0.4
1 找到缺少的包
2 去找相关的人
3 deploy 到maven 私服上
4 package 最简单的方法就是你在你的 maven本地仓库中 新建一个文件夹 将你自定义的包放到里面 就可以在配置文件中引用了
也可以直接指定到你自己的那个包地址上

<dependency>
<groupId></groupId>
<artifactId></artifactId>
<version></version>
<scope>system</scope>
<systemPath></systemPath>
</dependency>
我的解决方案是在Prefernces-->Maven-->user Settings 里面点击Update settings
然后就好了。因为默认你配置settings.xml指向你的类库的时候,可能是没有加载进来吧,所以需要update一下。 你可以试试看这种方法行不行。
如果不行那可能就是jar包不全了

  • 上一篇文章:

  • 下一篇文章: 没有了
  • 最新文章 热点文章 相关文章
    maven如何加自定义的包
    redhat 2.6 (santigo 5.6) vsftp
    shell如何实现自动填写操作执行下
    linux shell 文件配置sh:color:
    shell script语法一定要加path吗
    SecureCRT如何访问虚拟机vmWare中
    C#如何读取WINDOWS的放大系数
    cximge的图如何存入数据库并提取
    DBGRID控件显示查询结果文本类型
    TChart控件如何把表中右边的系列
    redhat 2.6 (santigo 5.6) vsftp
    shell如何实现自动填写操作执行下
    linux shell 文件配置sh:color:
    shell script语法一定要加path吗
    SecureCRT如何访问虚拟机vmWare中
    C#如何读取WINDOWS的放大系数
    cximge的图如何存入数据库并提取
    DBGRID控件显示查询结果文本类型
    TChart控件如何把表中右边的系列
    fastreport提示没有找到fr_class
    Dispatcher initialization 
    java怎么随机生成24字节Byte
    spring如何动态注解任务调度
    highcharts服务器怎么自动端
    java如何读取web.xml里面的c
    java如何循环可以可以获取到
    Myeclipse 总是去请求一个错
    Java NIO终端关闭后服务器如
    java自动把其中的List<Role>
    web.xml配置问题:"web-app" 
     



    设为首页 | 加入收藏 | 网站地图 | 友情链接 |