Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven: resource binary changes file size after build

Tags:

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

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

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.

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

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

Thanks for your help.

like image 403
sbsmith Avatar asked Oct 21 '13 16:10

sbsmith


1 Answers

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> 
like image 186
hrunar Avatar answered Sep 28 '22 05:09

hrunar