package com.divae.ageto.hybris.codegenerator;

import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.project.MavenProject;

/**
 * @author Klaus Hauschild
 */
@Mojo(name = "code-generator", defaultPhase = LifecyclePhase.GENERATE_SOURCES)
public class CodeGeneratorMojo extends AbstractMojo {

    @Component
    private MavenProject project;

    @Override
    public void execute() throws MojoExecutionException, MojoFailureException {
        CodeGenerator.generate(project.getBasedir());
    }

}

@@ -197,63 +197,8 @@
 on;%0A
-import org.apache.maven.plugins.annotations.Component;%0A
 impo
@@ -299,24 +299,79 @@
 tions.Mojo;%0A
+import org.apache.maven.plugins.annotations.Parameter;%0A
 import org.a
@@ -583,29 +583,67 @@
    @
-Component%0A    private
+Parameter(defaultValue = %22$%7Bproject%7D%22, readonly = true)%0A   
  Mav

replace deprecated @Component with @Paramater