I'm trying to generate a jasperReport, but I receive this:
net.sf.jasperreports.engine.util.JRFontNotFoundException: Font 'Times New Roman' is not available to the JVM. See the Javadoc for more details.
After searching on the net, I found that I need to add a jar to the classpath with the font. So, I create a jar file with the ttf files and now I want to add this as a dependency to my pom file.
So: I installed the file :
mvn install:install-file -Dfile=tf.jar -DgroupId=tf -DartifactId=tf -Dversion=1.0.0 -Dpackaging=jar
and in my pom, I added these lines:
<dependency>
<groupId>tf</groupId>
<artifactId>tf</artifactId>
<version>1.0.0</version>
</dependency>
but I receive this: Dependency 'tf:tf:1.0.0' not found less
I checked the repository folder and the jar file is there, in ... tf\tf\1.0.0\
What I'm doing wrong?
-
The syntax of the command used to install your 3rd party jar looks identical to the reference (I would just also generate a pom by adding
-DgeneratePom=true
), the snippet to declare the dependency in your pom looks fine. What you're doing seems ok.Could you provide the exact trace?
Aaron : After I add the -DgeneratePom=true, it worked. Thank you!Pascal Thivent : @Aaron Glad it's working (I don't think that not having a pom was blocking though).
0 comments:
Post a Comment