How to create a PPA for a Maven project?

Solution 1:

Look in my bookjar project: http://code.google.com/p/bookjar/source/browse/

specifically the debian directory (especially the debian/package.sh file) and the build.xml (ant) file. In that file there is a new target 'upload' that uploads a buildable artefact to the launchpad buildbot.

I'm using ivy and the netbeans ant infrastructure so it's likely to be slightly different for you. However, one thing is certain: you can't use ivy or maven from the remote buildserver. You need to upload all libraries you use, either in the form of code or jars. ivy:retrive downloads the files to the current_dir/lib so my project in netbeans is setup to look for it's libraries there (nblibraries.properties is part of the netbeans infrastructure for that). Read the build.xml for details (basically the debian/rules files call a special ant target to build in the server that doesn't try to symlink the jar files - because they are already copied there).

I'm also taking advantage in my package.sh of my project being in mercurial to build a changelog file from the hg log, so there are other problems to solve if you want the same degree of automatism and don't use hg (in fact, i think that my changelog is bending the rules of debian changelogs by having each change be a 'minor' release).