Maven builds - libclojure-maven-plugin-java et al

Wolodja Wentland debian at babilen5.org
Fri May 31 12:44:18 UTC 2013


Hi all,

as mentioned on IRC I am currently looking into packaging tools.reader [0]
which unfortunately needs to be AOT compiled as it contains :gen-class (see
[1]). I checked the other dependencies and tools.reader seems to be the *only*
leiningen dependency that requires AOT compilation.

This wouldn't be much of a problem if our Clojure related maven
infrastructure were actually in a good shape and if we could merely use
maven-debian-helper and rely on clojure-maven-plugin to do the right thing. 

Unfortunately it is not as easy which is due to a couple of reasons and we
have to decide how to deal with it. The build process for maven, the build
dependencies and, well, everything really is described in pom.xml [2] which is
not horribly complicated, but the most important points are:

    * It uses clojure-maven-plugin >= 1.3.13 for the build

      This plugin is packaged Debian, but is quite outdated and uses an
      arcance packaging helper that I am not familiar with called "silt"
      (cf. #710493 and #710495)

    * It declares a "parent pom" org.clojure/pom.contrib 0.1.2

The last point is where it is getting interesting - A parent pom is
essentially a way to include common configuration settings into your own pom
and org.clojure/pom.contrib [3] in particular defines the build settings used
by Clojure itself. As our build requirements differ from that of Clojure we
don't really want to use org.clojure/pom.contrib as is, but change it to our
liking. You can see the resulting pom.xml by running "mvn help:effective-pom"
in tools.reader. I am not sure how to deal with this situation and there are,
essentially two ways:

    1. We package/ship our own clojure-debian parent pom that is suited to our
       needs and patch tools.reader's pom to refer to that
    2. We simply patch tools.reader's pom with whatever is needed and suitable
       for our needs

I am currently leaning towards the second approach as this concerns only
tools.reader and our "parent pom" wouldn't be used by anything else. Assuming
we manage to decide on what to do we still have to figure out what is needed
during the build. In summary (and so far):

    * maven-compiler-plugin 3.1 but only 2.0.2 is packaged in Debian (#710499)
    * maven-release-plugin that we don't need/want
    * Dependency declaration on Clojure1.4 (at this time) -- Not sure if we
      have to do something along the lines of their local-clojure-jar in order
      to get "our" clojure.jar in there.
    * I think we don't need anything in the sonatype-oss-release profile, but
      lets check this
    * maven-compiler-plugin seems to be configured to use Java 1.5 (cf. line
      126/127) we probably want to built with/against default-jdk and
      therefore OpenJDK 6 at the moment. Not sure if we have to hardcode that
      or if we can substitute that intelligently so that we don't have to
      change this whenever default-jdk changes. Maybe we don't even have to
      configure this, but I don't know maven-compiler-plugin well enough

I am probably missing something, but this should summarise the current
situation. If you want to play/look into this you can look into running
"mh_make" (from maven-debian-helper) just like dh_make.

[0] https://github.com/clojure/tools.reader
[1] https://github.com/clojure/tools.reader/blob/master/src/main/clojure/clojure/tools/reader/impl/ExceptionInfo.clj
[2] https://github.com/clojure/tools.reader/blob/master/pom.xml
[3] https://github.com/clojure/build.poms/blob/30db0e3389c85d5db41fe3c7f062cdd6a9d0bf5d/pom.xml
-- 
Wolodja <debian at babilen5.org>

4096R/CAF14EFC
081C B7CD FF04 2BA9 94EA  36B2 8B7F 7D30 CAF1 4EFC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-clojure-maintainers/attachments/20130531/6343c2e0/attachment.pgp>


More information about the Pkg-clojure-maintainers mailing list