Maven:资源二进制文件在构建之后更改文件大小 [英] Maven: resource binary changes file size after build

查看:177
本文介绍了Maven:资源二进制文件在构建之后更改文件大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用appengine-maven插件来构建我的Java Google App Engine项目。

I am using the appengine-maven-plugin to build my Java Google App Engine project.

我将.p12证书包含在WEB-INF子文件夹

I include .p12 certificates in a WEB-INF sub-folder

当我构建我的应用程序时,证书的文件大小增加了几KB。这使其无效。我已经看到.jks证书也发生了同样的情况。

When I build my application, the filesize of the certificate increases by a few KB. This renders it invalid. I have seen the same happen to .jks certificates too.

我已验证证书预先构建的有效性,并使用相同的方法来确认帖子的无效性-build certificate。

I have verified the validity of the certificate pre-build and used the same method to confirm the invalidity of the post-build certificate.

任何人都可以告诉我为什么文件大小在变化,为什么它不会简单地复制到WAR中?

Can anyone tell me why the file size is changing and why it is not simply copied to the WAR?

感谢您的帮助。

Thanks for your help.

推荐答案

另一个解决方案是在整个项目中禁用对.p12文件的过滤,以下配置:

Another solution is to disable filtering of .p12 files throughout your project by adding the following config:

<build>
  ...
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-resources-plugin</artifactId>                
      <configuration>
        <nonFilteredFileExtensions>
          <nonFilteredFileExtension>p12</nonFilteredFileExtension>
        </nonFilteredFileExtensions>
      </configuration>
    </plugin>
  </plugins>
</build>

这篇关于Maven:资源二进制文件在构建之后更改文件大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆