Leidolfr, start with this. See the paragraph 5 - #
http://www.ibm.com/developerworks/opensource/library/j-5things13/index.html?ca=drs-
Write some simple plugin just to see if it's working. Then take a look at Jar plugin and make something similar (i.e. use maven-archiver):
http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.3.1/