与问题将GeoLite2数据库添加到jar时会损坏一样,我从WAR文件中获得了错误,具体步骤如下:
mvn package将GeoLite2-City.mmdb从src/main/resources/GeoLite2-City.mmdb复制到WEB-INF/classes/GeoLite2-City.mmdb下的war文件mvn package中修改了GeoLite2-City.mmdb我尝试了插件maven-resources-plugin作为https://stackoverflow.com/a/34454312/1086907,但是GeoLite2-City.mmdb仍然被mvn package更改
如何解决这个问题?
发布于 2018-04-20 07:57:47
maven-war-plugin实际上也可以过滤该文件。
就像对于maven-resources-plugin,一样,可以将mmdb文件扩展名添加为不需要过滤的附加扩展
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>mmdb</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin> https://stackoverflow.com/questions/49915573
复制相似问题