Hi, I'm new to Java packaging but I feel I'm already finding some edge cases that may need looking into by more experienced people; they may even be bugs.
I'd like to share two issues that caused me some headache. The package I'm trying to build is called argus-pdp-pep-common, part of a larger set of packages called ARGUS that comprise a site central authorization framework used in science grids. Upstream uses maven, so I've used the maven.mk class in cdbs. Because javahelper has good support for installing Manifests I'm using that too. The issue is this: upstream decided to split of a large piece of common data off the pom.xml into a parent pom. Most importantly, the versions of all dependencies are listed in the parent, not in the main pom. The parent could be packaged on its own, but it hardly makes sense to do so, as it's very much private to the ARGUS system. I chose to put the parent pom in debian/parent/pom.xml. The <package>.pom file in debian/ lists both: pom.xml debian/parent/pom.xml but this setup never worked. No matter what I tried, the mh_patchpoms script would always insert <version>debian</version> for every dependency in the pom, instead of using the correct versions in the parent pom. This caused some dependencies to fail. The solution was so simple I nearly pulled my hair out: by reversing the listing debian/parent/pom.xml pom.xml Things started to work. The documentation about this isn't wrong, but it's also far from obvious[1]. 1. http://wiki.debian.org/Java/MavenRepoHelper The second issue has to do with mh_patchpoms. I patched the <relativePath> of the pom to point to debian/parent/pom. Upon building with dpkg-buildpackage, this (quilt) patch happens first, then the mh_patchpoms changes the pom.xml to debianize it. After the package is completely build, in the final step dpkg-source --after-build comes by to undo the quilt patch; but at this time, the pom.xml is still the debianized one and not the one that had the quilt patch (that one is pom.xml.save). So the build fails at last because the patch won't apply in reverse. The solution I found here was to include the following in debian/rules: binary/libpdp-pep-common-java:: mh_unpatchpoms -plibpdp-pep-common-java I'm thinking that this should have been taken care of by maven.mk... Sorry for the long post, but that's what we get with these technicalities! Cheers, Dennis -- D.H. van Dok :: Software Engineer :: www.nikhef.nl :: www.biggrid.nl Phone +31 20 592 22 28 :: http://www.nikhef.nl/~dennisvd/ -- 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/4f1dd82f.9020...@nikhef.nl