Maven Repository Specification

This page specifies how to install Java libraries in Maven compatible way which makes it possible to use Maven for Debian packaging: [wiki:Java/MavenBuilder ?MavenBuilder].

Status

The specification is not completed yet. After completion it needs to be discussed in the mailing list.

Motivation: advantages of using Maven

Maven has advantages for the upstream developers that won't be repeated here. That is the reason why more and more projects are switching to Maven as their primary build tool. Detailed information about maven can be found at [http://maven.apache.org Maven's homepage ] and in the book [http://books.sonatype.com/maven-book/ Maven: The Definitive Guide].

Maven maintains a model of a project in a file pom.xml: the developer can assign attributes to a project such as:

Most of those attributes can directly be used for Debian packaging but the most interesting ones are the dependencies.

Imagine a project 'a' that depends on 2 other projects 'b' and 'c' where 'b' itself depends on 'd', 'e', 'f' and 'c' depends on 'f', 'g', 'h'.

a ---> b ---> d
   |      |
   |      |-> e
   |      |
   |       -> f
   |
    -> c ---> f
          |
          |-> g
          |
           -> h

In a later upstream version 'c' adds another depends 'i' and that means that we have to change all reverse depends of 'c' including 'a' (like adding i.jar to DEB_JARS in debian/rules). But Maven will do this automatically for us and we do not have to touch reverse depends of any package when the dependencies change.

Problems with upstream's repository (central)

Alternatives

JPackage

Ubuntu

Targets

Specification


CategoryJava