![](/img/trans.png)
[英]Create a Java REST Application JAR without using Gradle/Maven?
[英]How to create jar file without java classes but with fonts using maven
我从一些 Tibco 设计工具创建了 jar 文件: 现在我想创建相同的 jar 文件,但使用 maven。 所以我有 fonts 和那个属性文件并创建了新的 maven 模块,我想知道应该使用什么插件来实现所附图片中的结构。 Let's say that I have those fonts in
/src/main/resources
folder together with jasperreports_extension.properties
in my new maven module and in second option I have those fonts in some external folder like /home/user/fonts
also together with jasperreports_extension.properties
目前我正在使用那些 fonts 将它们嵌入到碧玉报告中,如果这个 jar 位于运行应用程序的类路径上,则可以完成。
它正在使用以下方法,但出于审计原因,我需要删除所有系统范围的依赖项。
<dependency>
<groupId>de.justiz.basecomponent</groupId>
<artifactId>bc-traderegulation-fonts</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/resources/reps/fonts.jar</systemPath>
</dependency>
问候
src/main/resources
是要放在类路径中的资源,它们“按原样”复制到 jar 文件中(除非您可能要求过滤文件,这意味着“请扩展变量”)。
因此,如果您将文件放在src/main/resources/fonts
中,即使项目中没有任何 Java 文件,您也应该得到我认为您要求的内容,作为正常编译的一部分。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.