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-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4d9ce30b.9010...@laposte.net

Reply via email to