Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.4
-
Labels:None
-
Environment:maven-1.0rc2, maven-pdf-plugin 2.1
-
Number of attachments :
Description
Problems with the insertion of PNG image files.
JIMI/JAI libraries needed for handling them.
How I've solved it:
I created 3 new properties in my project.properties. Each of
them just pointing to its respective library location.
maven.pdf.jimi.jar=$
{maven.repo.local}/jimi/jars/jimi-1.0.jarmaven.pdf.jaicore.jar=${maven.repo.local}
/jai/jars/jai_core-1.1.2.jar
maven.pdf.jaicodec.jar=$
/jai/jars/jai_codec-1.1.2.jar
After that I've inserted the following lines to the plugin.jelly
script file:
<pathelement location="$
{pom.getPluginContext('maven-pdf-plugin').getVariable('maven.pdf.jimi.jar')}"/>
<pathelement location="$
"/>
<pathelement location="$
"/>
An alternative that does not need the additional properties:
<pathelement location="$
{pom.getContext().getMavenRepoLocal()}/jimi/jars/jimi.jar"/><pathelement location="${pom.getContext().getMavenRepoLocal()}
/jai/jars/jai_core.jar"/>
{pom.getContext().getMavenRepoLocal()}<pathelement location="$
/jai/jars/jai_codec.jar"/>
(not sure about the naming conventions, the three jars should also be added at http://maven.apache.org/reference/standard-sun-jar-names.html)
ie, the jars get automatically picked up if they are present in the local repository.