Class OpenJpaTestEnhancerMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="test-enhance",
          defaultPhase=PROCESS_TEST_CLASSES,
          requiresDependencyResolution=TEST,
          threadSafe=true)
    public class OpenJpaTestEnhancerMojo
    extends AbstractOpenJpaEnhancerMojo
    Processes Application model test classes and enhances them by running OpenJPA Enhancer tool.
    Since:
    1.1
    Version:
    $Id: OpenJpaTestEnhancerMojo.java 9137 2009-02-28 21:55:03Z struberg $
    • Field Detail

      • testClasspathElements

        @Parameter(defaultValue="${project.testClasspathElements}",
                   required=true,
                   readonly=true)
        protected java.util.List<java.lang.String> testClasspathElements
        List of all class path elements that will be searched for the persistence-enabled classes and resources expected by PCEnhancer.
    • Constructor Detail

      • OpenJpaTestEnhancerMojo

        public OpenJpaTestEnhancerMojo()
    • Method Detail

      • getClasspathElements

        protected java.util.List<java.lang.String> getClasspathElements()
        This function overloads AbstractOpenJpaMojo#getClasspathElements() to return the test classpath elements.
        Overrides:
        getClasspathElements in class AbstractOpenJpaMojo
        Returns:
        List of classpath elements for the test phase
      • getEntityClasses

        protected java.io.File getEntityClasses()
        The File where the class files of the entities to enhance reside
        Overrides:
        getEntityClasses in class AbstractOpenJpaMojo
        Returns:
        normaly the test entity classes are located in target/test-classes
      • skipMojo

        protected boolean skipMojo()
        Description copied from class: AbstractOpenJpaMojo

        Determine if the mojo execution should get skipped.

        This is the case if:
        • AbstractOpenJpaMojo.skip is true
        • if the mojo gets executed on a project with packaging type 'pom' and AbstractOpenJpaMojo.forceMojoExecution is false
        Overrides:
        skipMojo in class AbstractOpenJpaMojo
        Returns:
        true if the mojo execution should be skipped.