Bug#811053: *.poms Should Not Be Required to Ensure Trailing Newline

Christopher Hoskin christopher.hoskin at gmail.com
Tue Sep 27 03:29:01 UTC 2016


Package: maven-repo-helper
Version: 1.9.2
Followup-For: Bug #811053

I haven't reproduced the trailing newline issue, but there's definitely a problem with multiple poms.

What happens at the moment is that jh_maven_repo_helper adds the following to the debhelper sequence:

mh_installpoms
mh_linkjars --skip-clean-poms

mh_installpoms calls mh_installpom for each pom, which calls mh_cleanpom, which creates (amongst other things) the file debian/.mh/pom.properties. mh_linkjars --skip-clean-poms calls mh_linkjar --skip-clean-poms for each pom. The --skip-clean-poms option assumes that debian/.mh/pom.properties already exists and reuses it in the creation of the symlinks.

This is fine if there's only one pom to deal with, but if there are multiple poms, each call to mh_installpom overwrites the previous debian/.mh/pom.properties, so that mh_linkjar only creates the symlink for the last pom processed by mh_installpoms.

You can see this in the package mongo-java-driver which I am currently working on. I am working around the problem by overriding mh_linkjars in debian/rules to remove the --skip-clean-poms option.

The attached patch modifies jh_maven_repo_helper.pm to remove the --skip-clean-poms options from the debhelper sequence. (Another option might be to modify mh_installpom to copy debian/.mh/pom.properties to debian/.mh/${artifactId}-${version}.properties and then modify mh_linkjar to look for this file instead.)

Christopher

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***


-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages maven-repo-helper depends on:
ii  default-jre-headless [java2-runtime-headless]    2:1.8-57
ii  gcj-5-jre-headless [java2-runtime-headless]      5.4.1-1
ii  libstax-java                                     1.2.0-3
ii  openjdk-7-jre-headless [java2-runtime-headless]  7u111-2.6.7-1
ii  openjdk-8-jre-headless [java2-runtime-headless]  8u102-b14.1-2

Versions of packages maven-repo-helper recommends:
ii  debhelper  10

Versions of packages maven-repo-helper suggests:
ii  maven-debian-helper  2.1.1

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-jh_maven_repo_helper-to-work-with-multiple-poms-.patch
Type: text/x-diff
Size: 1479 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-java-maintainers/attachments/20160927/554ce5b6/attachment.patch>


More information about the pkg-java-maintainers mailing list