Building DavMail from source

Building DavMail is quite simple:

  • Make sure you have Java 8 or later installed and set as the current version by checking JAVA_HOME:
    • Unix/OSX:
      echo $JAVA_HOME
    • Windows:
      echo %JAVA_HOME%
  • Check if you already have Apache Ant installed:
    ant -version

    If you don't, download and unzip ant from ant.apache.org, add the ant/bin full path to the PATH environment variable.
  • Clone DavMail source with git:
    git clone https://github.com/mguessan/davmail.git

    or get DavMail source package from sourceforge and uncompress it:
    tar xvzf davmail-src-*.tgz

    or checkout subversion trunk:
    svn co https://svn.code.sf.net/p/davmail/code/trunk

    or get and uncompress tarball from https://sourceforge.net/p/davmail/code/HEAD/tree/trunk
  • Additional steps on Windows:
  • Go into the davmail root directory (which contains the build.xml file) and run:
    ant

Packages are then available under dist

Building a Flatpak package

The Flatpak manifest is maintained in a separate repository on Flathub, see github.com/flathub/org.davmail.DavMail. The published package is available from Flathub; the steps below are only needed to build it locally.

  • Install flatpak and flatpak-builder, and add the Flathub remote:
    flatpak remote-add --if-not-exists --user flathub https://flathub.org/repo/flathub.flatpakrepo
  • Clone the manifest repository:
    git clone https://github.com/flathub/org.davmail.DavMail.git
  • Go into the cloned directory and build, then install the result for the current user:
    flatpak-builder --force-clean --user --install-deps-from=flathub --repo=repo --install builddir org.davmail.DavMail.yaml
  • Run the locally built package:
    flatpak run org.davmail.DavMail

Generating DavMail website content

The source for the DavMail website is in the same version control system as the DavMail source.

To generate the HTML, have maven and the maven site plugin installed.

  • on .deb systems:
    sudo apt install maven libmaven-site-plugin-java
  • on .rpm systems:
    sudo dnf install maven libmaven-site-plugin-java
  • on other systems: Install maven and maven-site-plugin

Generating the actual HTML is done by these commands:

mvn site

ant fix-site

The HTML files are then available under target/site/