katjas/PDFrenderer — pull request #4 by denisfalqueto (2012-05-29 17:30:37+00:00)
Title: Add maven support

Maven is a project lifecicle management tool. It helps to compile, run tests and build artifacts.
But the main advantages are a neutral form of organizing a project and the dependency
declaration.

For PDFrenderer, the main advantage is the neutral form of organizing the project. It can now
be used with Netbeans, Eclipse, InteliJ or even command line without any significant difference.
Lots of files were moved to comply with maven standart project structure. The important file
to analyse is pom.xml.

As for the dependencies, there are two main dependencies in PDFrenderer: JPEG-CMYK support
and JBig2 support, both located on ${basedir}/stdclasses. Those dependencies don't behave
well in standard Maven, so were handled as following:

- JPEG: The classes are not contained in a jar file, so they were provided in the
build cycle at the generate-resources phase of the Maven lifecycle. This is not
ideal, but works in the end. Netbeans, for example, can't see those classes as
part of the project and always flags them as missing. But maven compiles all the
sources without any problems.

- JBig2: The jar file was added as an internal maven repository. This tries to
force maven to see ${basedir}/stdclasses/maven as a maven repository. Thus,
JBig2 was added as a propper project dependency.

Maybe in the future both dependencies can be handled more elegantly, if they
become accessible via Maven's Central repository.

Signed-off-by: Denis Falqueto