Building Debian packages with Maven
How do you distribute and deploy you java applications and libraries? Especially if you are using Debian/Ubuntu machines the desire to just install them like any other software with “apt-get install” comes just with that. But how do you integrate this with you build system? You could of course have the debian tools installed on the build bot and have that generate the deb. But wouldn’t it be nice to have your java build system take care of that too? Cross platform packaging is why I started jdeb. What started out as a little library with an ant task has now gotten a bit more flexible. Today I am happy to announce that with the new release of 0.3 there is also a maven plugin available. Just add this to your POM and your are good to go. When you call “mvn install” you will also find the Debian archive in the target directory.
<plugin> <artifactId>jdeb</artifactId> <groupId>org.vafer</groupId> <version>0.3</version> <executions> <execution> <phase>package</phase> <goals> <goal>deb</goal> </goals> </execution> </executions> </plugin>
You can even get the appropriate changes file generated. Please see the documentation for further details and let me know if you have any questions. For the ones upgrading from 0.2 – it should be (more or less) a drop in replacement. For more details on the changes see the project website.