Customising goals

Customising existing Maven goals is quite simple as long as you know where to hook in to. As an example, let's consider you want to generate some resources and have them placed into the produced JAR file.

Note: Generally resources should be specified in the <build>/<resources> section of the project.xml file. However, if they are generated as part of the build, you will want to copy them to the destination yourself.

So, here is a sample maven.xml file that demonstrates how this would be achieved: