Quick maven tip for deploying to remote FTP repository

First, you’ll need to make sure the following jars exist in %MAVEN_HOME%/lib (i include the versions i currently have):

  • wagon-ftp (1.0-beta-2)
  • commons-net (1.4.1)
  • oro (2.0.8)

Then define a server (& its credentials) for the remote repo in your ~/.m2/settings.xml and finally issue something like:

 mvn deploy:deploy-file -Dfile=mysql-source.jar -Dclassifier=sources
     -DpomFile=mysql-connector-java.pom -Durl=ftp://my.server.com/path/to/repository -DrepositoryId=my.server.id

andyhot

3 thoughts on “Quick maven tip for deploying to remote FTP repository

  1. Yea, of course it’s open-source (though the license is missing from the repo it’s Apache2). So, the idea is that i could have jawr produce the artifacts at build time – hence the maven plugin.

    I followed a weird approach when authoring this – I used EasyMock to mock and program all those ‘annoyances’! So, I didn’t really have any troubles – of course, a proper API would make things easier,… i’ll try to contact you soon.

  2. This is unrelated to your post, but…

    Just stumbled upon this. Really cool!.

    I am planning to implement build time operation for Jawr soon, which hopefully should help you with the new Mojo. Right now I think you might find some dependencies on a servletcontext instance and other annoyances that might keep Jawr from working during startup, and actually some feedback from you would probably help me. Drop me a line anytime you need help…

    By the way, are you planning on open-sourcing it?

Leave a Reply

Your email address will not be published. Required fields are marked *

Read previous post:
The history of Python in 5 mins

The history of Python in 5 mins Now that's some amazing visualization making use of the commit history of the...

Close