My 2 cents... since uploading via WebDav is essentially just a PUT operation, I'd try to hook into the upload task and reuse some of this code<http://codesnippets.joyent.com/posts/show/1076>to perform the upload directly from Buildr/Ruby.
alex On Thu, Oct 1, 2009 at 11:34 AM, Jeff Yu <[email protected]> wrote: > Hi all, > > I faced a problem with regard to the using buildr to upload the artifact > into maven snapshot repository. > Firstly, I am ok to run 'buildr upload' to deploy all the artifacts into my > local maven repository, but the problem is that in our maven snapshot > repository, it is using the 'webdav' protocol to upload the aritfact, so I > need to use the following maven command to do the deployment: > > mvn deploy:deploy-file -DgroupId=com.company.myproj > -DartifactId=myproject -Dversion=1-SNAPSHOT -Dpackaging=jar \ > -DgeneratePom=true -Dfile=path/to/file/myproject.jar > \ > -DrepositoryId=snapshots.company.com \ > -Durl=dav:https://snapshots.company.com/maven2 > > The problem is that I've got a bunch of artifacts for my project, it > doesn't > make sense for me to do this manually, hence I got following thoughts: > > I might extend/override the upload task to do the deploy one by one by > invoking the maven command line above, hopefully I can get the artifactName > somehow, as I thought once it packaged my jar, I want to deploy it > accordingly. I see there is an integration point with the ant task, but > didn't see one for maven one, how can I achieve this? > > Does above thought make sense? Or what else approach do we use in the > buildr > to deal with this issue? > > -- > Cheers, > Jeff Yu > > ---------------- > blog: http://jeff.familyyu.net > twitter: http://www.twitter.com/jeffyuchang >
