title: In Maven how do I copy files using the wagon plugin?
body: <p>Summary: How do I copy some generated files into a webserver (eg IIS or Apache) directory using Maven?</p>
  
  <p>Details:
  I have a working application that builds in Maven. I've managed to get it building using the <a href="http://mojo.codehaus.org/webstart/webstart-maven-plugin/" rel="nofollow">webstart-maven-plugin</a> which produces all the needed files (.jar and .jnlp) in a directory <code>target/jnlp</code>. It also creates a zip file with them all in at <code>target/foo-1.0.zip</code>.</p>
  
  <p>At the moment the webstart plugin does not have a <code>deploy</code> goal - the request for it has ended up on the <a href="http://mojo.codehaus.org/webstart/webstart-maven-plugin/faq.html" rel="nofollow">FAQ (question 3)</a>. It may be implemented in future, but the suggestion for the time being is to use <a href="http://mojo.codehaus.org/wagon-maven-plugin/usage.html" rel="nofollow">wagon-maven-plugin</a>.</p>
  
  <p>I've never used Wagon. To start with I'd like to just copy the files to a local directory served up by a webserver. Later I'd like to copy them remotely, probably using ftp. Can someone give an example to what I need to add to the <code>pom.xml</code> to get the local copy working (and hopefully an ftp example too?). I can't find it in the documentation. From reading I think I might also need the <a href="http://maven.apache.org/wagon/wagon-providers/wagon-file/" rel="nofollow">Wagon Maven File Provider</a> but as this seems to have almost no documentation I'm not sure.</p>