I have Netbeans Maven project. I have created my own fonts jar file, because Jasper Reports does not supports Cp1257. I have installed my jar to local maven repo, dependency added via add dependency. While running in Netbeans I have no problems - the reports are created with font that is declared in dependency and exported to PDF correctly, but after creating executable jar with maven assembly plugin it looks like my dependency somehow disapears or becomes unreachable, because . I see my fonts file in dependencies list of Netbeans Maven project. If you need more code or smth please let me know I will add code needed. Thanks in advance.
jasperreports_extension.properties
net.sf.jasperreports.extension.registry.factory.fonts=net.sf.jasperreports.engine.fonts.SimpleFontExtensionsRegistryFactory`
net.sf.jasperreports.extension.simple.font.families.ireportfamily1463309406404=fonts/fontsfamily1463309406404.xml
fontsfamily1463309406404.xml
<?xml version="1.0" encoding="UTF-8"?>
<fontFamilies>
<fontFamily name="Times New Roman">
<normal><![CDATA[fonts/times.ttf]]></normal>
<bold><![CDATA[fonts/timesbd.ttf]]></bold>
<italic><![CDATA[fonts/timesbi.ttf]]></italic>
<boldItalic><![CDATA[fonts/timesi.ttf]]></boldItalic>
<pdfEncoding><![CDATA[Cp1257]]></pdfEncoding>
<pdfEmbedded><![CDATA[true]]></pdfEmbedded>
</fontFamily>
</fontFamilies>
CLASS
StyleBuilder plainStyle = DynamicReports.stl.style().setFontName("Times New Roman");
POM.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>MYAPPNAME</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<repositories>
</repositories>
<dependencies>
...
<dependency>
<groupId>my.fonts</groupId>
<artifactId>fonts2</artifactId>
<version>1.1</version>
<type>jar</type>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>forms.Login</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>create-my-bundle</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<name>MYAPPNAME</name>
</project>