/
GreenPepper Maven Plugin - FixtureGeneratorDefinition

GreenPepper Maven Plugin - FixtureGeneratorDefinition

Custom Fixture Generator configuration

The FixtureGeneratorDefinition is meant to allow the specification of a JAVA class implementing a generation of fixtures.

<fixtureGenerator>
    <impl/>
    <properties>
        <javaBeanProperty1/>
        <javaBeanProperty2/>
        ...
        <javaBeanPropertyn/>
    </properties>
</fixtureGenerator>

 Nodes details

fixtureGenerator

Element

Description

Type

impl

The implementation class that will generate the fixtures. See below for more details.

String

properties

The map of JAVA Bean properties that can be injected in the implementation.

Map

impl

The implementation should: * implement the com.greenpepper.spy.FixtureGenerator interface. * have a default constructor. * be avalaible in the classpath during the fixture generation goal.
The implementation will be instanciated using the default constructor. Then the properties will be set using Java Beans specification.

 properties

The properties node is optional and can be empty.
When not empty, it may contain writeable Java Beans properties. This means that at least at setter is to be defined in the impl class for that property.
The injection of properties is made using Commons BeanUtils. This has the benefits to map the properties values to Java types different from java.lang.String.

Default Fixture Generator Definition

As an information, here is the default fixture generator definition

<fixtureGenerator>
    <impl>com.greenpepper.maven.plugin.spy.impl.JavaFixtureGenerator</impl>
    <properties>
        <defaultPackage>${greenpepper.fixtures.defaultpackage}</defaultPackage>
    </properties>
</fixtureGenerator>

Related content

GreenPepper Maven Plugin - Generate Fixtures
GreenPepper Maven Plugin - Generate Fixtures
More like this
GreenPepper Maven Plugin - fixture-jar
GreenPepper Maven Plugin - fixture-jar
More like this
GreenPepper Maven Plugin - generate-fixtures
GreenPepper Maven Plugin - generate-fixtures
More like this
GreenPepper Maven Plugin - Usage
GreenPepper Maven Plugin - Usage
More like this
Fixtures Conventions
Fixtures Conventions
More like this
GreenPepper Maven Plugin - Runner
GreenPepper Maven Plugin - Runner
More like this