当使用maven-assembly-plugin或者maven-shade-plugin打包时,如果涉及到证书文件,一定设置过滤,否则证书文件会被做修改。报异常:

java.io.IOException: DER length more than 4 bytes: 111

  • maven-assembly-plugin:
    <fileSet> 
      <directory>/</directory> 
      <outputDirectory>/</outputDirectory> 
      <includes> 
        <include>**/*.*</include> 
      </includes> 
      <filtered>true</filtered>
    </fileSet>

     

  • maven-shade-plugin:

    <configuration>  
      <filters>  
        <filter>  
          <artifact>*:*</artifact>  
           <excludes>  
          <exclude>*</exclude>  
            </excludes>  
        </filter>  
      </filters>  
    </configuration>  

     

相关文章:

  • 2021-06-01
  • 2022-12-23
  • 2021-11-24
  • 2022-01-02
  • 2021-08-11
  • 2021-05-30
  • 2021-08-10
  • 2022-02-23
猜你喜欢
  • 2021-05-18
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
  • 2021-11-12
  • 2021-08-05
  • 2021-04-27
相关资源
相似解决方案