zoukankan      html  css  js  c++  java
  • 将本地jar包手动复制到Maven库中,在其它电脑上用Maven打包时出错

    版权声明:本文为博主原创文章,未经博主同意不得转载。 https://blog.csdn.net/UP19910522/article/details/31396107

    背景交代:在做图片水印时候引入了两个包文件。这两个包是JDK自带的私有包,不能用Maven库里下载,因此笔者手动将rt和jce两个工具jar文件复制到本地的Maven库中。例如以下图


    import com.sun.image.codec.jpeg.JPEGCodec;
    import com.sun.image.codec.jpeg.JPEGImageEncoder;
    然后在pom配置文件中写上以下的配置

    将jce和rt拷到例如以下路径(rt相似)


    然后项目在其它电脑上用Maven打包时候报错例如以下:

    Failed to execute goal on project : Could not resolve dependencies for project cs2c.nkscloudweb:nkscloudweb3:war:3.0: The following artifacts could not be resolved: maven-plugins:maven-cobertura-plugin:plugin:1.3, maven-plugins:maven-findbugs-plugin:plugin:1.3.1: Could not find artifact maven-plugins:maven-cobertura-plugin:plugin:1.3 in nexus (http://10.1.81.221:8081/nexus/content/groups/public) -> [Help 

    最后的解决方法是:在他的计算机上配置例如以下路径:

    <dependency>
                <groupId>rt</groupId>
                <artifactId>rt</artifactId>
                <version>1.0</version>
    <systemPath>D:maven
    epositories
    t
    t1.0
    t-1.0.jar</systemPath>
     </dependency> 

    
    
    
    
    

查看全文
  • 相关阅读:
    HDU2149-Public Sale
    分页和多条件查询功能
    hdu 4691 最长的共同前缀 后缀数组 +lcp+rmq
    BZOJ 2588 Count on a tree (COT) 是持久的段树
    windows 设置脚本IP
    hdu 4912 Paths on the tree(树链拆分+贪婪)
    分散式-ubuntu12.04安装hadoop1.2.1
    struts详细解释拦截器
    Codeforces 459E Pashmak and Graph(dp+贪婪)
    C#中的数据格式转换 (未完待更新)
  • 原文地址:https://www.cnblogs.com/ldxsuanfa/p/10818675.html
  • Copyright © 2011-2022 走看看