[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

maven-compiler-plugin being stripped from parent poms when using maven-debian-helper?


I have been debianising some of our maven packages to make deployment to
our servers easier (and because there is a small group of other people
who might find them useful). I used mh_make to generate the debian files
and then edited them.
We have a parent pom which specifies sensible defaults for various
things such as the java source version to use (1.6 rather than the
ancient defaults).
When I debianised it despite the maven-compiler-plugin not being listed
in debian/maven.ignoreRules the filtered pom file (available here:
https://launchpad.net/~ucam-cl-dtg/+archive/ucam/+packages when
launchpad finishes building) does not contain the maven-compiler-plugin
This causes dependent packages like libucamwebauth-java
( https://github.com/ucam-cl-dtg/ucam-webauth/tree/debian ) to be build
with -source 1.3 which fails rather badly:

/auto/homes/drt24/git/web/raven/webauth/src/main/java/uk/ac/cam/ucs/webauth/WebauthResponse.java:[345,5] annotations are not supported in -source 1.3
(use -source 5 or higher to enable annotations)

The seemingly obvious solution to this would be to use
debian/maven.properties and specify:
maven.compile.source = 1.5
maven.compile.target = 1.5
with the properties cribbed from:

However this has no effect and I still get complaints due to -source 1.3
being used.

What am I doing wrong? Does the maven-compiler-plugin have to be
stripped out of poms? If so is there a way of preserving the source and
target information in such a way that it correctly inherits to child
poms? Is there something I am missing about the way properties are
specified in maven.properties or am I using the wrong ones?

Minor point noticed along the way and probably a bug:
In the generated maven.rules I needed to do
-s/org.apache.tomcat/javax.servlet/ servlet-api jar s/.*/2.5/ * *
+javax.servlet servlet-api jar s/.*/2.5/ * *

As otherwise things failed with javax.servlet:servlet-api:jar:debian not
being found.

mh_make is great.

Thank you,


Version information:
Distributor ID:	Ubuntu
Description:	Ubuntu 12.04.1 LTS
Release:	12.04
Codename:	precise
Linux grapevine.cl.cam.ac.uk 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27
17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
maven-debian-helper 1.5ubuntu1
maven-repo-helper 1.7.1ubuntu1
$ mvn -v
Apache Maven 3.0.4 (r1232337; 2012-01-17 08:44:56+0000)
Maven home: /home/drt24/bin/apache-maven-3.0.4
Java version: 1.7.0_03, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux", version: "3.2.0-29-generic", arch: "amd64", family:

Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: