/usr/bin/mh_lspoms is in maven-debian-helper 1.6.6.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | #!/bin/bash --
MH_VERSION=$(ls /usr/share/maven-repo/org/debian/maven/maven-packager-utils/ | sed 's|/||')
. /usr/share/maven-repo-helper/mh_lib.sh
syntax()
{
echo -e "Usage: mh_lspoms [option]... <package>"
echo -e "Looks for all POM files defined in the source of the project."
echo -e ""
echo -e "Where"
echo -e "\t<package> is the name of the binary package,"
echo -e "\t e.g. libcommons-lang-java. Default to the first binary"
echo -e "\t found in the debian/control file"
echo -e "Options:"
echo -e "\t-h --help: show this text"
echo -e "\t-V --version: show the version"
echo -e "\t-p<package> --package=<package>: package to act on"
echo -e "\t-f --force: force run even if the .poms files exist."
echo -e "\t Only maven.rules will be created, assuming that it"
echo -e "\t did not exist before."
echo -e "\t-n --non-interactive: non interactive session, don't ask questions."
echo -e "\t-o --offline: don't ever connect to the internet, for Debian build"
echo -e "\t compatibility."
echo -e ""
echo -e "You need to execute it on the unpacked origial source tree, merged with the"
echo -e "debian/ folder. It will create the file debian/<binary package>.poms which"
echo -e "contains all the POMs to deploy to the Maven repository and is used by"
echo -e "mh_installpoms."
echo -e ""
echo -e "The contents of debian/<binary package>.poms should be:"
echo -e "\t* one POM file location per line,"
echo -e "\t* optionally, the location is followed by the option --no-parent"
echo -e "\t to indicate that if this POM inherits from a parent, the parent"
echo -e "\t element will be removed."
exit 1
}
ARGS="p package f force n non-interactive o offline" parseargs "$@"
PACKAGE=$(getarg p package)
FORCE=$(getarg f force)
NON_INTERACTIVE=$(getarg n non-interactive)
OFFLINE=$(getarg o offline)
if [ -z "$PACKAGE" ]; then
if [ "$ARGC" -gt "0" ]; then
PACKAGE="${ARGV[0]}"
else
PACKAGE=$(dh_listpackages | head -1)
fi
fi
if [ -e debian/$PACKAGE.poms -a -z "$FORCE" ]; then
echo "debian/$PACKAGE.poms already exist. Please delete it if you want to regenerate it."
else
mkdir -p debian
java -cp /usr/share/java/maven-project.jar:/usr/share/java/maven-repo-helper.jar:/usr/share/java/maven-packager-utils.jar org.debian.maven.packager.DependenciesSolver ${NON_INTERACTIVE:+--non-interactive} ${OFFLINE:+--offline} --package=$PACKAGE --maven-repo=/usr/share/maven-repo
rm debian/$PACKAGE.substvars
echo "The list of POM files is now in debian/$PACKAGE.poms"
fi
|