Well, allow me then.. but before I create an issue, I really don't think a separate wagon:remove mojo is the right answer. After all, the whole is point is to try to capture the commonly desired functionality into a mojo. wagon:remove looks to me dangerously like an Ant task - what's next then: wagon:chmod, wagon:mkdir, ...). If it has to be a separate mojo, then it could just as well be something like wagon:command where you can specify the command to execute (like Ant's sshexec), but it could be implemented only for certain protocols so I don't know it shouldn't be part of the wagon plugin anymore. On the contrary, if you are using wagon:upload there's a pretty good chance you want a clean upload, so adding a clean option makes sense even if it can only be implemented for some specific protocols.
Kalle On Thu, Mar 11, 2010 at 10:41 PM, Dan Tran <[email protected]> wrote: > no issue filed yet :-) > > -D > > On Thu, Mar 11, 2010 at 10:36 PM, Kalle Korhonen > <[email protected]> wrote: >> Hey Knute & others, did this enhancement ever go anywhere? I there was >> an issue opened for it, I couldn't find it. >> >> Kalle >> >> >> On Thu, Jun 25, 2009 at 9:15 PM, Stephen Connolly >> <[email protected]> wrote: >>> +1 >>> >>> 2009/6/26 Dan Tran <[email protected]>: >>>> I rather to create a separate mojo wagon:remove >>>> >>>> -D >>>> >>>> On Thu, Jun 25, 2009 at 8:50 PM, Knute G. Axelson<[email protected]> >>>> wrote: >>>>> My idea is to add something like this: >>>>> >>>>> if ( clean ) >>>>> { >>>>> if ( ! ( wagon instanceof CommandExecutor ) ) >>>>> { >>>>> throw new UnsupportedProtocolException( "Wagon " + >>>>> wagon.getRepository().getProtocol() + " does not support clean upload" ); >>>>> } >>>>> >>>>> String targetRepoBaseDirectory = >>>>> wagon.getRepository().getBasedir(); >>>>> >>>>> String command = "rm -rf " + targetRepoBaseDirectory + "/*"; >>>>> >>>>> logger.info( "Remote: " + command ); >>>>> ( (CommandExecutor) wagon ).executeCommand( command ); >>>>> } >>>>> >>>>> to the beginning of the "public void upload( Wagon wagon, FileSet fileset, >>>>> boolean optimize, boolean clean, Log logger )" method in >>>>> DefaultWagonUpload. >>>>> >>>>> -Knute >>>>> >>>>> to the beginning of >>>>> >>>>> On 6/25/2009 10:31 PM, Dan Tran wrote: >>>>> >>>>> I guest it would work if the target provider has a delete api. >>>>> >>>>> -Dan >>>>> >>>>> On Thu, Jun 25, 2009 at 7:21 PM, Brett Porter<[email protected]> wrote: >>>>> >>>>> >>>>> On 26/06/2009, at 12:17 PM, Brett Porter wrote: >>>>> >>>>> >>>>> >>>>> Duh, of course :) I was looking at it from the get PoV. >>>>> >>>>> >>>>> Sorry, hit send early accidentally. I meant to add that (now that I >>>>> understand what was actually meant), it sounds like a good idea. I'm >>>>> guessing the implementation uses list and then subsequent deletes - it >>>>> probably works but is not very performant? >>>>> >>>>> - Brett >>>>> >>>>> >>>>> >>>>> >>>>> On 26/06/2009, at 12:12 PM, Dan Tran wrote: >>>>> >>>>> >>>>> >>>>> Brett, i think Knute wants to delete remote files on the target host >>>>> >>>>> -D >>>>> >>>>> On Thu, Jun 25, 2009 at 6:04 PM, Brett Porter<[email protected]> wrote: >>>>> >>>>> >>>>> I know it is verbose, but you can achieve this by binding in the clean >>>>> plugin right? >>>>> >>>>> - Brett >>>>> >>>>> On 26/06/2009, at 5:21 AM, Knute G. Axelson wrote: >>>>> >>>>> >>>>> >>>>> I'd like to see the wagon plugin support an option that would empty out >>>>> the target directory before copying files when using the upload goal. >>>>> Any thoughts? >>>>> >>>>> I've actually already coded this up and would be happy to contribute it >>>>> if others think it would be generally useful. >>>>> >>>>> -kaxelson >>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe from this list, please visit: >>>>> >>>>> http://xircles.codehaus.org/manage_email >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe from this list, please visit: >>>>> >>>>> http://xircles.codehaus.org/manage_email >>>>> >>>>> >>>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe from this list, please visit: >>>> >>>> http://xircles.codehaus.org/manage_email >>>> >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
