debhelper support for Maven
Hi,
Does anyone work for add Maven support for debhelper?
I wrote tiny patch for that, so please review it.
--
Regards,
Hideki Yamane henrich @ debian.or.jp/org
http://wiki.debian.org/HidekiYamane
diff -urN debhelper-9.20120909/Debian/Debhelper/Buildsystem/maven.pm debhelper-9.20120909_modified/Debian/Debhelper/Buildsystem/maven.pm
--- debhelper-9.20120909/Debian/Debhelper/Buildsystem/maven.pm 1970-01-01 09:00:00.000000000 +0900
+++ debhelper-9.20120909_modified/Debian/Debhelper/Buildsystem/maven.pm 2013-03-28 08:06:21.030962195 +0900
@@ -0,0 +1,37 @@
+# A debhelper build system class for handling Maven based projects.
+#
+# Copyright: © 2009 Joey Hess, 2013 Hideki Yamane
+# License: GPL-2+
+
+package Debian::Debhelper::Buildsystem::maven;
+
+use strict;
+use base 'Debian::Debhelper::Buildsystem';
+
+sub DESCRIPTION {
+ "Maven (pom.xml)"
+}
+
+sub check_auto_buildable {
+ my $this=shift;
+ return (-e $this->get_sourcepath("pom.xml")) ? 1 : 0;
+}
+
+sub new {
+ my $class=shift;
+ my $this=$class->SUPER::new(@_);
+ $this->enforce_in_source_building();
+ return $this;
+}
+
+sub build {
+ my $this=shift;
+ $this->doit_in_sourcedir("mvn", "-B", "-o", "install", @_);
+}
+
+sub clean {
+ my $this=shift;
+ $this->doit_in_sourcedir("mvn", "-B", "-o", "clean", @_);
+}
+
+1
diff -urN debhelper-9.20120909/Debian/Debhelper/Dh_Buildsystems.pm debhelper-9.20120909_modified/Debian/Debhelper/Dh_Buildsystems.pm
--- debhelper-9.20120909/Debian/Debhelper/Dh_Buildsystems.pm 2011-10-20 09:02:57.000000000 +0900
+++ debhelper-9.20120909_modified/Debian/Debhelper/Dh_Buildsystems.pm 2013-03-28 08:05:09.754737476 +0900
@@ -27,6 +27,7 @@
(compat(7) ? "perl_build" : ()),
"cmake",
"ant",
+ "maven",
"qmake",
"qmake_qt4",
);
Reply to: