Hi there,

you may want to read through this thread: http://www.mail-archive.com/users@maven.apache.org/msg113122.html I have done the same thing, but was using the Maven API to resolve the plugin rather than trying it via the container directly.

HTH
Andreas

Am 10/28/10 1:41 AM, schrieb Jared Prestwich:
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");
}



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to