• 将本地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> 

    
    
    
    
    

  • 相关阅读:
    .Net Core AOP之IResultFilter
    .Net Core AOP之IExceptionFilter
    Linux部署.Net Core应用
    .Net Core Aop之IActionFilter
    计算虚拟化技术
    正则表达式通配符 ? 和 * 的区别
    linux中rar文件的压缩、解压
    linux 系统中 双引号“”和单引号‘’转义的区别
    linux 中find命令的用法
    ubuntu中出现:passwd: unrecognized option 'stdin'
  • 原文地址:https://www.cnblogs.com/ldxsuanfa/p/10818675.html
  • Copyright © 2020-2023  润新知