debian swirl logo

Back to the packages list maven-plugin-tools

#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/ant.mk

PACKAGE              := $(DEB_SOURCE_PACKAGE)
VERSION              := $(DEB_UPSTREAM_VERSION)
JAVA_HOME            := /usr/lib/jvm/default-java
DEB_JARS             := ant-nodeps maven-repo-helper
DEB_ANT_BUILD_TARGET := package #javadoc
DEB_ANT_BUILDFILE    := debian/build.xml
DEB_ANT_ARGS         := -Dpackage=$(PACKAGE) -Dversion=$(VERSION)
API_DOCS             := target/api
DEB_CLASSPATH        := $(DEB_CLASSPATH):maven-plugin-tools-api/target/classes

get-orig-source:
		-uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename

makebuilddir/lib$(PACKAGE)-java::
		install -d debian/tmp/maven-repo
		cp -rL /usr/share/maven-repo/* debian/tmp/maven-repo/
		-rm -rf debian/tmp/maven-repo/org/apache/maven/plugins/
		-rm -rf debian/tmp/maven-repo/org/apache/maven/plugin-tools/
		cat debian/maven-settings.xml | sed 's|BASEDIR|$(realpath $(DEB_BUILDDIR))|g' > debian/tmp/maven-settings.xml

binary-post-install/lib$(PACKAGE)-java::
		mh_installpoms -plib$(PACKAGE)-java
		mh_installjar -plib$(PACKAGE)-java    maven-script/maven-script-ant/pom.xml       maven-script/maven-script-ant/target/maven-script-ant-$(VERSION).jar
		mh_installjar -plib$(PACKAGE)-java    maven-script/maven-script-beanshell/pom.xml maven-script/maven-script-beanshell/target/maven-script-beanshell-$(VERSION).jar
		mh_installjar -plib$(PACKAGE)-java -l maven-plugin-plugin/pom.xml            maven-plugin-plugin/target/maven-plugin-plugin-$(VERSION).jar
		mh_installjar -plib$(PACKAGE)-java -l maven-plugin-annotations/pom.xml       maven-plugin-annotations/target/maven-plugin-annotations-$(VERSION).jar
		mh_installjar -plib$(PACKAGE)-java -l maven-plugin-tools-annotations/pom.xml maven-plugin-tools-annotations/target/maven-plugin-tools-annotations-$(VERSION).jar
		mh_installjar -plib$(PACKAGE)-java -l maven-plugin-tools-ant/pom.xml         maven-plugin-tools-ant/target/maven-plugin-tools-ant-$(VERSION).jar
		mh_installjar -plib$(PACKAGE)-java -l maven-plugin-tools-api/pom.xml         maven-plugin-tools-api/target/maven-plugin-tools-api-$(VERSION).jar
		mh_installjar -plib$(PACKAGE)-java -l maven-plugin-tools-model/pom.xml       maven-plugin-tools-model/target/maven-plugin-tools-model-$(VERSION).jar
		mh_installjar -plib$(PACKAGE)-java -l maven-plugin-tools-beanshell/pom.xml   maven-plugin-tools-beanshell/target/maven-plugin-tools-beanshell-$(VERSION).jar
		mh_installjar -plib$(PACKAGE)-java -l maven-plugin-tools-generators/pom.xml  maven-plugin-tools-generators/target/maven-plugin-tools-generators-$(VERSION).jar
		mh_installjar -plib$(PACKAGE)-java -l maven-plugin-tools-java/pom.xml        maven-plugin-tools-java/target/maven-plugin-tools-java-$(VERSION).jar
		mh_installjar -plib$(PACKAGE)-java -l maven-plugin-tools-javadoc/pom.xml     maven-plugin-tools-javadoc/target/maven-plugin-tools-javadoc-$(VERSION).jar

clean::
		mh_unpatchpoms -plib$(PACKAGE)-java
		mh_clean
		rm -Rf target
		rm -Rf maven-plugin-tools-api/target
		rm -Rf maven-plugin-tools-model/target
		rm -Rf maven-plugin-tools-java/target
		rm -Rf maven-plugin-tools-javadoc/target
		rm -Rf maven-plugin-tools-beanshell/target
		rm -Rf maven-plugin-tools-ant/target
		rm -Rf maven-plugin-tools-annotations/target
		rm -Rf maven-plugin-tools-generators/target
		rm -Rf maven-script/maven-script-ant/target
		rm -Rf maven-script/maven-script-beanshell/target
		rm -Rf maven-plugin-annotations/target
		rm -Rf maven-plugin-plugin/target
		find . | grep pom.xml.save | xargs rm -f

Builds:

libmaven-plugin-tools-java
maven plugin tools base pom