buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <alex.boisv...@gmail.com>
Subject Re: buildr upload task deal with webdav protocol.
Date Sat, 17 Oct 2009 18:19:03 GMT
Assuming you know where buildr is installed on your system, the rake task
itself is defined in lib/buildr/packaging/package.rb when you create a
package:

  task('upload')    { package.upload if package.respond_to?(:upload) }

There you  can see the task simply calls the artifact's upload method in
lib/buildr/packaging/artifact.rb, which calls URI.upload() defined in
lib/buildr/core/transports.rb.

alex


On Sat, Oct 17, 2009 at 10:57 AM, Jeff Yu <jeff.yuchang@gmail.com> wrote:

> Since I am new to Buildr (Ruby as well),  I am wondering where I can find
> the source code for upload task?
>
> -Jeff
>
> On Thu, Oct 15, 2009 at 8:59 PM, Jeff Yu <jeff.yuchang@gmail.com> wrote:
>
> > Hi Alex,
> >
> > Sorry for the delay, (as I was on holiday), thanks for your great
> > suggestion, I will try to do it this way.
> >
> > -Jeff
> >
> >
> > On Fri, Oct 2, 2009 at 4:30 AM, Alex Boisvert <alex.boisvert@gmail.com
> >wrote:
> >
> >> 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 <jeff.yuchang@gmail.com>
> 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
> >> >
> >>
> >
> >
> >
> > --
> > Cheers,
> > Jeff Yu
> >
> > ----------------
> > blog: http://jeff.familyyu.net
> > twitter: http://www.twitter.com/jeffyuchang
> >
> >
>
>
> --
> Cheers,
> Jeff Yu
>
> ----------------
> blog: http://jeff.familyyu.net
> twitter: http://www.twitter.com/jeffyuchang
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message