Well, I had to fudge it a little by adding a bogus Boolean b to avoid signature conflict, but it seems to works fine now. Here is the convenience method:
protected Mojo lookupMojo( String mojoArtifactId, String mojoGroupId, String mojoVersion, String goal, File pom, Boolean b) throws Exception { PlexusConfiguration pluginConfiguration = extractPluginConfiguration( mojoArtifactId, pom ); return lookupMojo( mojoGroupId, mojoArtifactId, mojoVersion, goal, pluginConfiguration ); } Here is are my JUnit test methods: protected void setUp() throws Exception { // required for mojo lookups to work super.setUp(); File pluginXml = new File(getBasedir(), "src/test/resources/plugin-config.xml"); mojo = (JPackageMojo) lookupMojo( "xml2spec.mojo", "org.jpackage", "1.0-SNAPSHOT", "generate", pluginXml, false); } public void testMojoLookup() throws Exception { File pluginXml = new File(getBasedir(), "src/test/resources/plugin-config.xml"); mojo = (JPackageMojo) lookupMojo( "xml2spec.mojo", "org.jpackage", "1.0-SNAPSHOT", "generate", pluginXml, false); assertNotNull(mojo); } Cheers, - Ole --- Ole Ersoy <[EMAIL PROTECTED]> wrote: > Hmmm, > > Sorry - Not really a bug...but more of a convenience > lookup method request. > > I reviewed lookupMojo, and if these was another one > like this I think everything would work out: > protected Mojo lookupMojo( > String mojoArtifactId, > String mojoGroupId, > String mojoVersion, > String goal, > File pom ) > throws Exception > { > PlexusConfiguration pluginConfiguration = > extractPluginConfiguration( artifactId, pom ); > > return lookupMojo( groupId, artifactId, version, > goal, pluginConfiguration ); > } > > I'll give this a shot next, and post back. I have a > CLA with Apache...in case anyone wants to throw this > in with the rest of the harness. > > Cheers, > - Ole > > > > ____________________________________________________________________________________ > Any questions? Get answers on any topic at > www.Answers.yahoo.com. Try it now. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > ____________________________________________________________________________________ Yahoo! Music Unlimited Access over 1 million songs. http://music.yahoo.com/unlimited --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]