This is an automated email from the git hooks/post-receive script. xhaakon-guest pushed a commit to branch topic-maven3 in repository maven-debian-helper.
commit dce344630d47e4bf28e64ac16f2733b5b35a02a6 Author: Jakub Adam <[email protected]> Date: Fri May 3 17:59:12 2013 +0200 Debhelper maven3 buildsystem --- debian/rules | 4 +++- share/perl/maven.pm | 18 ++++++++++++++---- share/perl/maven3.pm | 25 +++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 5 deletions(-) diff --git a/debian/rules b/debian/rules index fe95391..cfcf982 100755 --- a/debian/rules +++ b/debian/rules @@ -6,6 +6,7 @@ include /usr/share/cdbs/1/class/ant.mk PACKAGE := $(DEB_SOURCE_PACKAGE) VERSION := $(shell echo ${DEB_UPSTREAM_VERSION} | sed -r 's/([0-9\.]+).*/\1/') JAVA_HOME := /usr/lib/jvm/default-java +PERL_DIR := $(shell perl -MConfig -e 'print $$Config{vendorlib}') DEB_JARS := ant-junit junit commons-io classworlds maven-core maven-artifact maven-artifact-manager maven-model \ maven-compat maven-plugin-api maven-project maven-scm-api velocity file-management plexus-utils \ plexus-container-default-alpha maven-repo-helper @@ -47,7 +48,8 @@ install/$(PACKAGE):: -r maven-debian-helper-$(DEB_UPSTREAM_VERSION) \ man/mvn-debian.pod > man/mvn-debian.1 dh_installman $(MAN_PAGES) man/mvn-debian.1 - install -D share/perl/maven.pm debian/tmp/$$(perl -MConfig -e 'print $$Config{vendorlib}')/Debian/Debhelper/Buildsystem/maven.pm + install -D share/perl/maven.pm debian/tmp/$(PERL_DIR)/Debian/Debhelper/Buildsystem/maven.pm + install -D share/perl/maven3.pm debian/tmp/$(PERL_DIR)/Debian/Debhelper/Buildsystem/maven3.pm cleanbuilddir:: mh_unpatchpoms -p$(PACKAGE) diff --git a/share/perl/maven.pm b/share/perl/maven.pm index 19d63f1..468e483 100644 --- a/share/perl/maven.pm +++ b/share/perl/maven.pm @@ -18,20 +18,30 @@ sub check_auto_buildable { return (-e $this->get_sourcepath("pom.xml")) ? 1 : 0; } +sub maven_dir { + return '/usr/share/maven2'; +} + +sub boot_jar { + my $this=shift; + return $this->maven_dir() . '/boot/classworlds.jar'; +} + sub new { my $class=shift; my $this=$class->SUPER::new(@_); my $java_home = (exists $ENV{JAVA_HOME}) ? $ENV{JAVA_HOME} : '/usr/lib/jvm/default-java'; + my $maven_dir = $this->maven_dir(); my @packages = @{$dh{DOPACKAGES}}; $this->{package} = shift @packages; $this->{doc_package} = (grep /-doc$/, @packages)[0]; - my $classconf = '/etc/maven2/m2-debian.conf'; + my $classconf = "$maven_dir/conf/m2-debian.conf"; if (!$this->{doc_package}) { - $classconf = '/etc/maven2/m2-debian-nodocs.conf'; + $classconf = "$maven_dir/conf/m2-debian-nodocs.conf"; } - my @classpath = ('/usr/share/maven2/boot/classworlds.jar'); + my @classpath = ($this->boot_jar()); if (-e "$java_home/lib/tools.jar") { push(@classpath, "$java_home/lib/tools.jar"); } @@ -45,7 +55,7 @@ sub new { @{$this->{maven_cmd}} = ($java_home . '/bin/java', @jvmopts, "org.codehaus.classworlds.Launcher", - "-s/etc/maven2/settings-debian.xml", + "-s$maven_dir/conf/settings-debian.xml", "-Ddebian.dir=$this->{cwd}/debian", "-Dmaven.repo.local=$this->{cwd}/debian/maven-repo"); return $this; diff --git a/share/perl/maven3.pm b/share/perl/maven3.pm new file mode 100644 index 0000000..78bbab5 --- /dev/null +++ b/share/perl/maven3.pm @@ -0,0 +1,25 @@ +# A debhelper build system class for handling Maven3-based projects. +# +# Copyright: 2013 Debian Java Maintainers +# License: GPL-3 + +package Debian::Debhelper::Buildsystem::maven3; + +use strict; +use warnings; +use base 'Debian::Debhelper::Buildsystem::maven'; + +sub DESCRIPTION { + "Maven3 (pom.xml)" +} + +sub maven_dir { + return '/usr/share/maven'; +} + +sub boot_jar { + my $this=shift; + return $this->maven_dir() . '/boot/plexus-classworlds-2.x.jar'; +} + +1 -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/maven-debian-helper.git _______________________________________________ pkg-java-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

