Skip to content

Maven Build

Patrick Corless edited this page Jun 24, 2022 · 2 revisions

Maven can be used to build the ICEpdf core, viewer and example modules. This build does not build the distribution package, the Gradle build can be used for this if desired. The reactor build order of the maven project looks as follows:

------------------------------------------------------
 Reactor Build Order:

 ICEpdf :: Core :: Core Swing/AWT
 ICEpdf :: Core
 ICEpdf :: Viewer : Swing/AWT Viewer RI
 ICEpdf :: Viewer
 ICEpdf :: Examples :: Annotation :: Callback
 ICEpdf :: Examples :: Annotation :: Creation
 ICEpdf :: Examples :: Annotation
 ICEpdf :: Examples :: Capture :: Listener
 ICEpdf :: Examples :: Capture :: PNG
 ICEpdf :: Examples :: Capture :: Portfolio
 ICEpdf :: Examples :: Capture :: TIFF
 ICEpdf :: Examples :: Capture :: Watermark
 ICEpdf :: Examples :: Capture
 ICEpdf :: Examples :: Component Swing/AWT
 ICEpdf :: Examples :: Extraction :: Images
 ICEpdf :: Examples :: Extraction :: Metadata
 ICEpdf :: Examples :: Extraction :: Text
 ICEpdf :: Examples :: Extraction
 ICEpdf :: Examples :: JavaFx
 ICEpdf :: Examples :: Loading Events
 ICEpdf :: Examples :: Print Services
 ICEpdf :: Examples :: Search :: Highlight
 ICEpdf :: Examples :: Search :: Headless
 ICEpdf :: Examples :: Search
 ICEpdf :: Examples :: Signatures
 ICEpdf :: Examples :: SVG Capture
 ICEpdf :: Examples
 ICEpdf

From the reactor summary above it can be see then the three main modules are core, viewer and examples. Each can be build individually if desired.

# core module
~$ mvn -pl :icepdf-core package

# viewer module, -am insures dependencies are build 
~$ mvn -pl :icepdf-viewer -am package

# examples module, -am insures dependencies are build 
~$ mvn -pl :png-capture -am package
# or with full group id. 
~$ mvn -pl org.icepdf.os.examples:png-capture -am package

And of course the whole project hierarchy can be built with:

# or with full group id. 
~$ mvn package

Versioning and Publishing

When working with ICEpdf source it common to install compiled core and viewer jars into a local repository. The maven command for install is a as follows:

# Install icepdf-core.jar in local repository
~$ mvn -pl :icepdf-core install
# Install icepdf-viwer.jar in local repository
~$ mvn -pl :icepdf-viewer install

Version information is store in the root projects pom.xml and can be updated as needed before installing the jars into a local repository