Skip to content
golbi edited this page Jan 27, 2014 · 6 revisions

Maven

Typically CANL is build using Maven without any magic: mvn compile & test & install work as usual.

Deploying is configured to push artefacts to Maven Central repository via Sonatype infrastructure.

OS-specific packages

It is possible to build RPMs and deb files with CANL library included. So far this was tested against:

  • RPM: SL5, SL6, several recent Fedora versions, Centos 5 Centos 6
  • deb: Debian 6

Other distros as SUSE will require minor modifications of building logic. Note that there are 2/3 dependencies of the library: BouncyCastle and Apache Commons IO. Commons-IO in version 1.4 is available in all tested distributions. BC is sometimes problematic - CANL 1.x requires version 1.46, CANL 2.x requires version 1.48. Currently SL5/Centos5 doesn't include BC 1.46 and it was repackaged in the EMI repository. SL6/Centos6 does contain 1.46 so no problem with CANL 1.x there. CANL 2.x BC dependency in version 1.48 is not available in the distributions, therefore this version as of now is available only in Maven central repository. As the 1.x branch contains vast majority of features backported, and all bugfixes it shouldn't be problematic to stay with it for some time.

To build RPM/deb you must run the command on an appropriate OS. So assuming you are on Centos 6 you will build packages for Centos 6, which will work for compatible SL6 but not for SL5 or Centos 5 (old RPM version).

There is a couple of tools that you need to have installed prior to building distribution packages. You will need:

  • git client (obvious - to get sources)
  • svn client
  • full JDK 6 or 7
  • maven 2 (latest update) or 3
  • ant
  • OS-sepcific package building packages.

Command:

mvn package -Ppackman -Dpackage.release=1 -DindexJars=true

To build Javadoc package:

mvn package -Ppackman -Dpackage.release=1 -DindexJars=true -Dpackage.config.dir=src/main/package-javadoc -DskipTests

Use a proper package release number.

More switches and advanced options (including info on porting to new distributions): Packman

Clone this wiki locally