« Current ping list... | Main | A Job In The Hand »

Getting Back On The Wagon: Maven 2 and FTP

November 28, 2006

Maven 2 has a cute nomenclature; I especially like the whole wagon/cargo motif. However, up until now, one of it's very, very dumb problems has been that there's no way for it to actually upload the site that it builds for you via FTP; you can use WebDAV, you can use SSH, etc... but not the simplest and most common of all file protocols; any attempt to use ftp with a mvn site-deploy command would result in failure.

Missing in wagon-ftp was an implementation for recursive upload. The bug for it is in the codehaus JIRA at http://jira.codehaus.org/browse/WAGONFTP-7, and bears the somewhat obvious name of "Wagon protocol 'ftp' doesn't support directory copying". The patch for the functionality has been added to the bug; basically, with this fixed, you'll be able to use site-deploy to upload the javadocs, test results, and other website stuff that Maven builds for you when you deploy your site.

F1x3d.

Feel free to build yourself a snapshot of the Maven Wagon FTP Provider by pulling down the wagon-ftp's source repository.

Unsurprisingly, you'll need maven to build. And because it's built in a funky-tree-multidependency, you might need to mess with your pom.xml a bit to do so. Basically, you need to:

  • comment out the parent node,
  • add a version tag (mine says "1.0-beta-2-SNAPSHOT", and I reference that version from the pom I want to ftp with once I've done a mvn install)
  • Add a dependency for wagon-provider-api (in groupID org.apache.maven.wagon)
  • Add a compile-time dependency for wagon-provider-test (in groupID org.apache.maven.wagon)

Once that's done, a mvn install will get you your installed maven plugin, and bob's your uncle. With any luck, this patch can get rolled into the next beta, and you can ignore these instructions. However, this should tide you over until his next beta release.

TrackBack

TrackBack URL for this entry:
http://www.ctoforaday.com/cgi-bin/mt/mt-tb.cgi/66

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About This Article

This page contains an article posted on November 28, 2006 11:20 PM.

The previous post in this blog was Current ping list....

The next post in this blog is A Job In The Hand.

Many more can be found on the home page or by looking through the full article list.

www.flickr.com
gblock's items Go to gblock's photostream
Creative Commons License
This weblog is licensed under a Creative Commons License.

PS3 ID: CTOForADay
Wii: 1974 6313 6054 0208