在代码中包含了字体库文件 如图:
当含有非java文件打包时会,打包失败 报错
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.3.2.RELEASE:repackage (default) on project wms-weighing: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.3.2.RELEASE:repackage failed: Unable to rename 'D:ideaWorkOnewms-weighingtargetwms-weighing-0.0.1-SNAPSHOT.war' to 'D:ideaWorkOnewms-weighingtargetwms-weighing-0.0.1-SNAPSHOT.war.original' -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException尝试:
删除 SIMKAI.TTF该文件后打包 ,成功了但是 war包中没有该字体库调用时 会导致中文无法加载,每次手动将字体库加入war中比较麻烦
解决办法:需要在pom.xml配置文件中build节点的resources下增加一个resource,指定directory为src/main/java目录,然后配置include包含***.TTF
/src/main/java/com/weighbridge/util 为文件存放目录,可参考图一。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)