title: Maven: How to write custom plugin to copy static resources?
body: <p>All our projects that are using docbook for creating documentation must have a set of static resources (images, css files and the like) in a particular target folder structure during site generation.</p>
  
  <p>To assemble these resources and do the copying, I wanted to write a custom plugin that just has to be added in those projects, is bound to appropriate lifecycle phase and on execution copies all required files.</p>
  
  <p>First approach was to create Ant based plugin, since the copy task is written down in a couple of lines. However, Ant's copy tasks copies what's in the filesystem... but on execution of the plugin the resources are in plugin's classpath and not available in filesystem. Right?</p>
  
  <p>So I probably do have to write a MOJO (Java based). I guess <strong>binary copying of resource files and folders from plugin's classpath to the project's target folder</strong> is more or less a standard task, so what support do I get in developing the plugin? Are there any base or utility classes I should use, or any plugin I can copy some code from?</p>