title: Font not found by JasperReports when built with Maven
body: <p>I've had to add a non-standard font (called "Ovo") to a JasperReports project I'm working on and have followed all the directions (such as <a href="http://community.jaspersoft.com/questions/541641/font-not-available-jvm" rel="nofollow">here</a>) to export the font to a .jar from iReport and added it to my build path in Eclipse. This works fine when I compile the project with eclipse.</p>
  
  <p>Now I'm moving to production and have been compiling the project on the command line with Maven (v3.0.4) using the <em>mvn clean install</em> command, so eclipse is totally out of the build cycle. I've installed the font jar to my local maven repo and added it as a dependency in my pom (similar to as described <a href="http://grysz.com/2010/06/01/use-custom-fonts-in-jasperreports-pdf-exporter/" rel="nofollow">here</a>) but then I run the program and when the code that generates the document which uses that font executes I get a <a href="http://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/util/JRFontNotFoundException.html" rel="nofollow">JRFontNotFoundException</a>.</p>
  
  <p>I've checked my local repo and my pom and made sure that the jar is there and that the pom identies it properly. I've also checked my maven build path with <em>mvn dependency:build-classpath</em> and also looked at my <em>mvn install</em> output. The path to the font jar appears in both and there are no errors thrown.</p>
  
  <p>I'm out of ideas. Why doesn't this font jar work when the project is compiled with maven on the CLI but works no problem when I compile it in eclipse? (It is a maven project in eclipse too, so the .classpath pretty much just says 'use maven')</p>
  
  <p>Here is the command I used to install the jar in my local repo:</p>
  
  <pre><code>    mvn install:install-file -Dfile=jFreeChartFonts.jar -DgroupId=com.example -DartifactId=jFreeChartFont -Dversion=0.0.1 -Dpackaging=jar
  </code></pre>
  
  <p>And here is the dependency declaration in the pom.xml:</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;com.example&lt;/groupId&gt;
          &lt;artifactId&gt;jFreeChartFonts&lt;/artifactId&gt;
          &lt;version&gt;0.0.1&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>I've also tried setting the scope to runtime instead of compile, but this makes no difference.</p>