Hi, Why not simply use scm apis ? (you can have a look at the checkout mojo to understand how it works). The mojo is simply a kind of wrapper around the scm apis (all the stuff is done in the scm apis).
2010/10/28 Jared Prestwich <[email protected]>: > I'm writting a plugin that checks the dependencies and seperates my company > dependencies out. That works fine but now I would like to run a checkout on > those. > I have the connectionUrl set in the poms. I just need to call checkout. > > I have tried getting an object of CheckoutMojo type but it always comes back > as a Null. > I thought maybe to bag that and just do a CommandLine call but I like the > idea of a universal scm plugin. > > This is the latest iteration: > > CheckoutMojo co = (CheckoutMojo) lookupCheckoutMojo(); > ... > co.execute(); > > protected Mojo lookupCheckoutMojo() > { > PlexusContainer container = new DefaultPlexusContainer(); > container.initialize(); > container.start(); > return (Mojo) container.lookup( Mojo.ROLE, > "org.apache.maven.plugins:maven-scm-plugin:1.4:checkout"); > } > -- Olivier Lamy http://twitter.com/olamy http://www.linkedin.com/in/olamy --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
