maven-debian-helper: porting to dh(1)?

Steve Langasek vorlon at debian.org
Tue Jan 10 14:28:29 UTC 2012


Hi Ludovic,

On Mon, Jan 09, 2012 at 01:23:24AM +0100, Ludovic Claude wrote:
> Hello Steve,

> Thanks for starting this task. You save me here, as my Perl skills are
> next to zero. To answer to your questions, I would say:

> - dh_auto_test could run mvn test, but this doesn't looks really needed
> as a standard Maven build using package or install as target will launch
> the unit tests unless they have been disabled. I would favour making
> dh_auto_test a noop.

The problem with this is that it provides no way to implement support
for DEB_BUILD_OPTIONS=nocheck.  We really want to be able to invoke the
tests separately from the build here, or at the very least, have some way to
specify whether to run the tests so that we can respect 'nocheck'.

> - dh_auto_build (and maven.mk for that matter) would benefit from using
> install as the default target, as this fixes problems when building some
> complex projects, and don't have any bad side effect. The only minus is
> that the build uses slightly more time and space.

That's an easy enough change, if there's agreement that it's the right thing
to do.  I just need the Debian Java community to tell me if it is.

> - the custom classpath using DEB_JARS or whatever you want to name it
> sounds unecessary and bad practice as Maven takes care of all classpath
> issues. You're allowing packagers to play with the internals of Maven,
> and while I added this DEB_JARS to maven.mk, it's not a good idea to
> keep it for dh. Anyway (and fortunately), nobody seems to use it.

Oh, if that's the case I'm very happy to drop it.

> - The double invocation of classworlds.jar actually launches Maven twice
> - with different targets. We can easily optimize things here and launch
> Maven only once, but with several targets, for example 'install
> javadoc:jar'. The -Ddebian.package argument doesn't seem useful here.

Ok, thought that might be the case.

> - mh_patchpoms and mh_unpatchpoms can be improved to scan the list of
> packages and find the *.poms files that they need in order to patch all
> used POM files. I can copy the code already present in mh_install, it
> will require a new release of maven-repo-helper.

<nod>

> - mvn-debian can be more actively maintained, I need to see how exactly
> we can use it in your dh script.

The general idea would be to encapsulate the common arguments for invoking
maven into a simple one-word command, so that anyone needing to invoke it
differently doesn't need to reproduce a complex commandline with 9 arguments
every time.  Basically, what's currently done by the class's new method
would be replaced by the external command.

Attached is an updated version of the patch incorporating your feedback.

Thanks,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: maven-debian-helper-dh1.patch
Type: text/x-diff
Size: 5810 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-java-maintainers/attachments/20120110/d64b76e1/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-java-maintainers/attachments/20120110/d64b76e1/attachment.pgp>


More information about the pkg-java-maintainers mailing list