Dennis Lundberg a écrit :
I use it through the maven-maven1-plugin like this:

        Maven1Converter converter = new Maven1Converter();
        converter.setBasedir( basedir );

        try
        {
            converter.execute();
        }
        catch ( ProjectConverterException e )
        {
throw new MojoExecutionException( "An exception occured while converting the Maven 1 project", e );
        }


Ok, you can't use "new" for plexus components, you must lookup them. If you don't lookup it, fields aren't initilialized with requirements.

In your mojo, add this:

/**
 * @parameter 
expression="${component.org.apache.maven.model.converter.Maven2Converter}"
 * @required
 */
private Maven1Converter converter;

...
converter.execute();
...

Is there a way for me to test it on the command line using just maven-model-converter?


No, but I'll add a junit test for it.

Emmanuel


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to