Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Java (http://www.linux-archive.org/debian-java/)
-   -   maven2 and debhelper (http://www.linux-archive.org/debian-java/510712-maven2-debhelper.html)

Wouter Verhelst 04-06-2011 12:47 PM

maven2 and debhelper
 
Hi,

One of my packages, beid, has been reimplemented[1], part of it in Java.
This hasn't been released yet, but will be fairly soon, and then I'll
have to package it for Debian. They're using maven2 as their build
system.

As I understand it, there's some support for building maven-using
packages with some wrapper scripts and some cdbs magic, but no debhelper
support yet. IMAO, cdbs is of yuck, so I'm not interested in that.
Instead, I'd be happy to help with implementing debhelper support for
maven (be this debhelper 'dh' mode, or plain debhelper where reasonable
and necessary). Not sure whether I can maintain that long term (after
all, beid upstream may choose to reimplement everything in haskell next
time around for all I know), but I'd be happy with getting my hands
dirty, initially.

Any pointers?

[1] Again, *sigh*. My advice: never ever (*ever*) volunteer maintaining
a package of which upstream is a government body. Oh well.

--
The volume of a pizza of thickness a and radius z can be described by
the following formula:

pi zz a


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110406124702.GS3733@celtic.nixsys.be">http://lists.debian.org/20110406124702.GS3733@celtic.nixsys.be

Ludovic Claude 04-06-2011 10:02 PM

maven2 and debhelper
 
Hello Wouter,

CDBS is not so 'yuck', it works really well for building Java packages.
DH 7 is more trendy, but it's really a question of taste.
You can try today to run mh_make (from maven-debian-helper package) on
the sources of your project, it will guide you (find missing
dependencies) and produce most of the packaging automatically. It's not
perfect, but works reasonably well on 50% of packages.

Anyway, I have planned to support DH 7 in maven-debian-helper. If you
want to help then that would be great, as I'm not fond of writting Perl
scripts. I would need help about how to define a new build system in DH
7. The build process using Maven is not trivial, there are several steps
and possible alternatives:

- debian/PACKAGE.poms and debian/maven.rules files can be automatically
generated if they are not present using mh_lspoms. It's ok if this
functionality is not kept with DH 7, as there are better tools for the
job and it's better to force the packager to do it and check for
correctness.
- the pom.xml files are patched using mh_patchpoms
- the repository located in /usr/share/maven-repo is copied locally
(more exactly symlinks are created locally) using copy-repo.sh
- clean target: mvn clean is called
- build target: mvn package is called
- install target: mvn debian:install is called
- at the end of the build, mh_unpatchpoms is called and scaffold files
are removed.

If there is a documentation package, then mvn javadoc:jar is called,
followed by mvn debian:install-doc.
There are quite a few options to those calls, and they can either be
defined by the user, or infered from the defaults and the structure of
the package and a few conventions. I'll let you have a look at
/usr/share/cdbs/1/class/maven.mk and maven-vars.mk for details.

So if you have any expertise with DH 7 or Perl, then please help me
here! Note that I have already made another tool DH 7 compliant, that's
maven-repo-helper and it can be used on simple Maven projects such as
libraries but it uses Ant instead of Maven as the build tool.

Thanks,
Ludovic

On 06/04/2011 14:47, Wouter Verhelst wrote:
>
> Hi,
>
> One of my packages, beid, has been reimplemented[1], part of it in Java.
> This hasn't been released yet, but will be fairly soon, and then I'll
> have to package it for Debian. They're using maven2 as their build
> system.
>
> As I understand it, there's some support for building maven-using
> packages with some wrapper scripts and some cdbs magic, but no debhelper
> support yet. IMAO, cdbs is of yuck, so I'm not interested in that.
> Instead, I'd be happy to help with implementing debhelper support for
> maven (be this debhelper 'dh' mode, or plain debhelper where reasonable
> and necessary). Not sure whether I can maintain that long term (after
> all, beid upstream may choose to reimplement everything in haskell next
> time around for all I know), but I'd be happy with getting my hands
> dirty, initially.
>
> Any pointers?
>
> [1] Again, *sigh*. My advice: never ever (*ever*) volunteer maintaining
> a package of which upstream is a government body. Oh well.
>


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4D9CE30B.9010803@laposte.net">http://lists.debian.org/4D9CE30B.9010803@laposte.net

Niels Thykier 04-07-2011 10:22 PM

maven2 and debhelper
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 2011-04-07 00:02, Ludovic Claude wrote:
>
> Hello Wouter,
>

Hey

> CDBS is not so 'yuck', it works really well for building Java packages.
> DH 7 is more trendy, but it's really a question of taste.
> You can try today to run mh_make (from maven-debian-helper package) on
> the sources of your project, it will guide you (find missing
> dependencies) and produce most of the packaging automatically. It's not
> perfect, but works reasonably well on 50% of packages.
>
> Anyway, I have planned to support DH 7 in maven-debian-helper. If you
> want to help then that would be great, as I'm not fond of writting Perl
> scripts. I would need help about how to define a new build system in DH
> 7. The build process using Maven is not trivial, there are several steps
> and possible alternatives:
>

I would propose to use a DH Sequence rather than a build system. Mainly
the greatest advantage of build systems are that they are auto-chosen,
but this is disabled for third party build systems, so...

> - debian/PACKAGE.poms and debian/maven.rules files can be automatically
> generated if they are not present using mh_lspoms. It's ok if this
> functionality is not kept with DH 7, as there are better tools for the
> job and it's better to force the packager to do it and check for
> correctness.
> - the pom.xml files are patched using mh_patchpoms
> - the repository located in /usr/share/maven-repo is copied locally
> (more exactly symlinks are created locally) using copy-repo.sh
> - clean target: mvn clean is called
> - build target: mvn package is called
> - install target: mvn debian:install is called
> - at the end of the build, mh_unpatchpoms is called and scaffold files
> are removed.
>
> If there is a documentation package, then mvn javadoc:jar is called,
> followed by mvn debian:install-doc.
> There are quite a few options to those calls, and they can either be
> defined by the user, or infered from the defaults and the structure of
> the package and a few conventions. I'll let you have a look at
> /usr/share/cdbs/1/class/maven.mk and maven-vars.mk for details.
>
> So if you have any expertise with DH 7 or Perl, then please help me
> here! Note that I have already made another tool DH 7 compliant, that's
> maven-repo-helper and it can be used on simple Maven projects such as
> libraries but it uses Ant instead of Maven as the build tool.
>
> Thanks,
> Ludovic
>
[...]

Personally I do have some experience, but I have quite a few things on
my plate. I fear it may be a while before I can dedicate myself to this
task (especially with my lack of maven background).


~Niels

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBCAAGBQJNnjk7AAoJEAVLu599gGRCRZQP/2rQl41Ln9PUZnBfvHArOvDK
vdk4sthWapGRNfRGlCFFtyqMBGNDcImV0pee7JAFF6JYzRbZaZ JHVewFjwdk5jvL
XcD8GQFcZtrBpJE9/y6kxa+biyA3qhOIIzk8aHxpyW7MWd2/VYr05yu8aMeUrYT6
th5mD3xhr0mwDDaPIHVu1X86GBuqvG6ISRElWcmlc/DF9t3kFn3u/WVJZROynXTV
hZAbhNZ2V9ok+DcMsvze8VMYjHuBwt01E+PemIB2svrcj950z0 F0orfrg/ahBxxD
yJA2C68X16EX0yYFEd0MeqDoLjRgG0mt+X+WcayU1nonGgol5P EaUHUcDlGUxRf8
Y9BrDKcxaEbPkmFfn/61DbOcDLnidhJdpz8SYespW1jy0yPW6y43xS5AV2/S4/Ma
Hltzq9ripp4j4i6e/utsDl4y10bek74y8z8Ex/gOLIdwXZMothfnew6l0edkqRWn
qS4hvpqtZcRycRox+pALB5zeXCkPmya3njx5yjLeEuTe+gtg4K TSSq2ga5oYSOLY
E+6nuurU5FAemx3j214aKV41/B2Hm2fixOcsj7OoO7PN+wGNO9EguUtxRo+vGe1m
FY/KII55ApTBoVk9Hg+D3XyLza6lLMBoEAXFzU1FCTWT5iQVLHIbf oOOauXrlz4l
yPCO8stb2wIK/n1op60p
=HxnT
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4D9E393B.2040102@thykier.net">http://lists.debian.org/4D9E393B.2040102@thykier.net


All times are GMT. The time now is 01:41 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.