#!/usr/bin/make -f
#export DH_VERBOSE=1

JAVA_HOME=/usr/lib/jvm/default-java
export CLASSPATH=/usr/share/java/commons-io.jar:/usr/share/java/commons-logging.jar:/usr/share/java/junit4.jar:/usr/share/java/mockito-core.jar
PACKAGE = xmlgraphics-commons
VERSION = $(shell dpkg-parsechangelog | grep '^Version' | cut -d' ' -f2 | cut -f1 -d-)

%:
	dh $@ --with javahelper

# all target, builds package and run test
override_dh_auto_build:
	#dh_auto_build -- -noinput -Dpwd=none all maven-artifacts
	dh_auto_build -- -noinput -Dpwd=none package maven-artifacts

# remove tests for now until issue with DISPLAY is solved
#override_dh_auto_test:

override_dh_install:
	#mh_installpoms -plib$(PACKAGE)-java
	mh_installpom -plib$(PACKAGE)-java build/maven/pom.xml
	mh_installjar -plib$(PACKAGE)-java -l build/maven/pom.xml build/$(PACKAGE)-$(VERSION).jar

get-orig-source:
	uscan --force-download --verbose --repack --rename
