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");
}

Reply via email to