Samstag, August 01, 2009

The State of Maven in Debian

Plain Java and its JDKs cannot define dependencies for libraries or executables yet. There is nothing similar to the static/dynamic linker and dpkg-shlibdeps/dh_makeshlibs we know from the world of ELF binaries. This might change with Java 7 implementing JSR 294 but for now Apache Maven is a build tool that does solve this problem and Maven is widely used in the Java world.

We have the maven2 package in Debian for about 2 years now and the current upstream version 2.2.0 in the experimental distribution. But this is not enough to build Debian packages. The most important missing piece is the maven-repo-helper which has been written by Ludovic Claude. It is waiting for about 3 weeks in the NEW queue and that is why several Java packages are in experimental now. Maven-repo-helper implements the Maven Repository Specification as simple to use debhelper scripts. Please read the documentation to get an impression how to use it.

The package maven-debian-helper can be used to actually build packages where upstream is using Maven as its build tool. There is an initial version of maven-debian-helper in Debian based on ant's cdbs snippet but it needs to be updated to use maven-repo-helper to make sure it follows exactly the same repository specification. Shipping 2 packages (maven-repo-helper and maven-debian-helper) is necessary because maven-repo-helper will be used by many package - even ones that use ant instead of maven. Maven-debian-helper on the other side will only be used by maven based packages.

The next steps are

  • wait for getting maven-repo-helper, libstax-java, netbeans-cvsclient, and several packages matching maven* and plexus* accepted into the archive
  • move packages that Build-Depends: maven-repo-helper from experimental to unstable
  • upload a fixed version of maven-debian-helper
  • provide debhelper like tools in maven-debian-helper to avoid forcing everyone into cdbs
  • use maven-debian-helper for building Maven based packages
  • improve documentation
Thanks to everyone who helped getting Maven into Debian so far!

Keine Kommentare: