[maven-debian-helper] 17/21: Revert "Bootstrap debian build from itself rather than maven-ant-helper"
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Fri Nov 13 15:05:47 UTC 2015
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch maven-debian-helper-2.0
in repository maven-debian-helper.
commit 19eec2c19d6d10c06b3da77325f24c7cd95e4273
Author: Emmanuel Bourg <ebourg at apache.org>
Date: Fri Nov 13 12:39:07 2015 +0100
Revert "Bootstrap debian build from itself rather than maven-ant-helper"
This reverts commit e0a63e9ef4fb38d50e8cbb510c92cfcd2524d0da.
---
debian/build.properties | 4 +++
debian/build.xml | 65 ++++++++++++++++++++++++++++++++++++++++
debian/changelog | 1 -
debian/control | 4 +--
debian/rules | 34 +++++----------------
share/cdbs/1/class/maven-vars.mk | 3 +-
share/cdbs/1/class/maven.mk | 3 +-
7 files changed, 81 insertions(+), 33 deletions(-)
diff --git a/debian/build.properties b/debian/build.properties
index 5166494..37c9d60 100644
--- a/debian/build.properties
+++ b/debian/build.properties
@@ -1,2 +1,6 @@
+build.directory=target
+build.javaVersion=1.6
+javadoc.dir=target/api
+classpath.test=/usr/share/java/junit4.jar
maven.test.skip=true
diff --git a/debian/build.xml b/debian/build.xml
new file mode 100644
index 0000000..382e4f8
--- /dev/null
+++ b/debian/build.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+
+<project name="pkg-java" default="package" basedir="..">
+
+ <property file="debian/build.properties"/>
+ <property name="maven.build" value="/usr/share/maven-ant-helper/maven-build.xml"/>
+ <property file="/usr/share/maven-ant-helper/maven-defaults.properties"/>
+
+ <macrodef name="cleanmodule">
+ <attribute name="dir"/>
+ <sequential>
+ <ant target="clean" antfile="${maven.build}" dir="@{dir}">
+ <property name="debian.dir" location="debian" />
+ <property name="project.dir" value="@{dir}" />
+ </ant>
+ </sequential>
+ </macrodef>
+
+ <macrodef name="packagemodule">
+ <attribute name="dir"/>
+ <sequential>
+ <ant target="package-and-local-install" antfile="${maven.build}" dir="@{dir}">
+ <property name="debian.dir" location="debian" />
+ <property name="project.dir" value="@{dir}" />
+ <property name="keep-cleaned-pom" value="true" />
+ </ant>
+ </sequential>
+ </macrodef>
+
+ <macrodef name="package-plugin-module">
+ <attribute name="dir"/>
+ <sequential>
+ <ant target="package-and-local-install" antfile="${maven.build}" dir="@{dir}">
+ <property name="debian.dir" location="debian" />
+ <property name="project.dir" value="@{dir}" />
+ <property name="maven.generate.target" value="plugin:descriptor" />
+ <property name="keep-cleaned-pom" value="true" />
+ <property name="use-local-repo" value="true" />
+ </ant>
+ </sequential>
+ </macrodef>
+
+ <target name="clean">
+ <cleanmodule dir=""/>
+ <cleanmodule dir="maven-debian-helper"/>
+ <cleanmodule dir="debian-maven-plugin"/>
+ <cleanmodule dir="maven-packager-utils"/>
+ </target>
+
+ <target name="package">
+ <packagemodule dir=""/>
+ <packagemodule dir="maven-debian-helper"/>
+ <package-plugin-module dir="debian-maven-plugin"/>
+ <package-plugin-module dir="maven-packager-utils"/>
+ </target>
+
+ <target name="javadoc">
+ <javadoc destdir="${javadoc.dir}">
+ <packageset dir="maven-debian-helper/src/main/java/"/>
+ <packageset dir="debian-maven-plugin/src/main/java/"/>
+ <packageset dir="maven-packager-utils/src/main/java/"/>
+ </javadoc>
+ </target>
+
+</project>
diff --git a/debian/changelog b/debian/changelog
index cd96935..8e9e567 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,6 @@
maven-debian-helper (2.0) UNRELEASED; urgency=medium
* Update Maven to version 3.0.5
- * Build deb package using itself rather than maven-ant-helper
* Update mojos to use annotations
* Remove nodocs build due to Maven 3 update
diff --git a/debian/control b/debian/control
index cf23ce4..e9baa5c 100644
--- a/debian/control
+++ b/debian/control
@@ -8,10 +8,10 @@ Uploaders: Torsten Werner <twerner at debian.org>,
Thomas Koch <thomas at koch.ro>,
Emmanuel Bourg <ebourg at apache.org>,
Wolodja Wentland <debian at babilen5.org>
-Build-Depends: cdbs, debhelper (>= 9), default-jdk, help2man
+Build-Depends: cdbs, debhelper (>= 9), default-jdk, maven-ant-helper (>= 7.0), ant-optional, help2man
Build-Depends-Indep: junit4,
libcommons-io-java,
- libmaven-install-plugin-java,
+ libmaven3-core-java,
libmaven-plugin-tools-java,
libplexus-velocity-java,
maven-repo-helper (>= 1.8.9)
diff --git a/debian/rules b/debian/rules
index f6d0fd9..bc3ca18 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,36 +1,18 @@
#!/usr/bin/make -f
-ROOT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))/..
-# ensure that maven.mk is able to include necessary files
-_cdbs_class_path = $(ROOT_DIR)/share/cdbs/1/class
-
include /usr/share/cdbs/1/rules/debhelper.mk
-include $(ROOT_DIR)/share/cdbs/1/class/maven.mk
+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
-MAVEN_CLASSCONF_ORIG := $(ROOT_DIR)/etc/m2-debian.conf
-MAVEN_CLASSCONF_REAL := $(ROOT_DIR)/debian/.mh/etc/m2-debian.conf
-MAVEN_CLASSCONF := $(MAVEN_CLASSCONF_REAL)
-MAVEN_SETTINGS := $(ROOT_DIR)/etc/settings-debian.xml
-DEB_MAVEN_PROPERTYFILE:= $(ROOT_DIR)/debian/build.properties
-DEB_MAVEN_SCRIPT_DIR := $(ROOT_DIR)/share/maven-debian-helper/
-
-
-# clean happens before we get a chance to bootstrap (and we don't need sugar yet)
-clean:: override MAVEN_CLASSCONF=/etc/maven/m2.conf
-clean:: override JAVA_OPTS+="-Dmaven.home=$(MAVEN_HOME)"
-
-# bootstrap the build process
-before-mvn-build:: override MAVEN_CLASSCONF=/etc/maven/m2.conf
-before-mvn-build:: override JAVA_OPTS+="-Dmaven.home=$(MAVEN_HOME)"
-before-mvn-build::
- $(DEB_MAVEN_INVOKE) -Dmaven.test.skip -Djar.finalName=maven-debian-helper install
- cp maven-debian-helper/target/maven-debian-helper.jar debian/.mh/
- sed 's|load .*/maven-debian-helper.jar|load $(ROOT_DIR)/debian/.mh/maven-debian-helper.jar|g' $(MAVEN_CLASSCONF_ORIG) > $(MAVEN_CLASSCONF_REAL)
- $(DEB_MAVEN_INVOKE) clean
-
+DEB_JARS := ant-junit junit commons-io plexus-classworlds maven-core maven-artifact maven-artifact-manager maven-core-3.x maven-model \
+ maven-embedder maven-plugin-api maven-plugin-annotations maven-scm-api velocity file-management plexus-utils \
+ plexus-container-default-alpha maven-repo-helper
+DEB_ANT_BUILD_TARGET := package #javadoc
+DEB_ANT_BUILDFILE := debian/build.xml
+DEB_ANT_ARGS := -Dpackage=$(PACKAGE) -Dbin.package=$(PACKAGE)
+API_DOCS := target/api
debian/.mh:
mkdir -p debian/.mh
diff --git a/share/cdbs/1/class/maven-vars.mk b/share/cdbs/1/class/maven-vars.mk
index d14e48d..f3cfb54 100644
--- a/share/cdbs/1/class/maven-vars.mk
+++ b/share/cdbs/1/class/maven-vars.mk
@@ -37,7 +37,6 @@ MAVEN_HOME = /usr/share/maven
MAVEN_DEBIAN_VERSION = $(shell ls /usr/share/maven-repo/org/debian/maven/maven-packager-utils/ | sed 's|/||')
MAVEN_CLASSCONF = /etc/maven/m2-debian.conf
-MAVEN_SETTINGS = /etc/maven/settings-debian.xml
# The home directory of the Java Runtime Environment (JRE) or Java Development
# Kit (JDK). You can either directly set JAVA_HOME in debian/rules or set
@@ -95,7 +94,7 @@ DEB_MAVEN_PROPERTYFILE = $(shell test -f $(CURDIR)/debian/maven.properties && ec
DEB_MAVEN_INVOKE = cd $(DEB_BUILDDIR) && $(JAVACMD) -noverify -cp $(DEB_CLASSPATH) \
$(JAVA_OPTS) -Dclassworlds.conf=$(MAVEN_CLASSCONF) \
org.codehaus.classworlds.Launcher \
- -s$(MAVEN_SETTINGS) \
+ -s/etc/maven/settings-debian.xml \
-Dmaven.repo.local=$(DEB_MAVEN_REPO) \
$(if $(DEB_MAVEN_ARGS_$(cdbs_curpkg)),$(DEB_MAVEN_ARGS_$(cdbs_curpkg)),$(DEB_MAVEN_ARGS))
diff --git a/share/cdbs/1/class/maven.mk b/share/cdbs/1/class/maven.mk
index c6f16e8..89e6d0c 100644
--- a/share/cdbs/1/class/maven.mk
+++ b/share/cdbs/1/class/maven.mk
@@ -32,7 +32,6 @@ include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix)
include $(_cdbs_class_path)/maven-vars.mk$(_cdbs_makefile_suffix)
DEB_MAVEN_REPO := $(CURDIR)/debian/maven-repo
-DEB_MAVEN_SCRIPT_DIR := /usr/share/maven-debian-helper/
JAVA_OPTS = \
$(shell test -n "$(DEB_MAVEN_PROPERTYFILE)" && echo -Dproperties.file.manual=$(DEB_MAVEN_PROPERTYFILE))
@@ -80,7 +79,7 @@ unpatch-poms: debian/$(DEB_JAR_PACKAGE).poms
$(RM) -f debian/stamp-poms-patched
debian/maven-repo:
- $(DEB_MAVEN_SCRIPT_DIR)/copy-repo.sh $(CURDIR)/debian
+ /usr/share/maven-debian-helper/copy-repo.sh $(CURDIR)/debian
post-patches:: patch-poms
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/maven-debian-helper.git
More information about the pkg-java-commits
mailing list