Usage

Create a pom-expansion.xml in the root of your source base repository (repository containing your application model).

Mojo Configuration

Add the following configuration to your pom.

  <build>
    <plugins>
      <plugin>
        <groupId>net.democritus.maven.plugins</groupId>
        <artifactId>expanders-maven-plugin</artifactId>
        <version>${plugin.version}</version>
      </plugin>
    </plugins>
  </build>

Trigger a mojo goal from command line:

# expand
mvn -f pom-expansion.xml expanders:expand

# harvest
mvn -f pom-expansion.xml expanders:harvest

Cleanup

If you want to clean up previous expansion during maven's clean phase (mvn clean).

In the pom, directory should point to expansionSettings.xml's expansionDirectory.

NOTE: Both paths (directory and expansionDirectory) are relative to their respective files.

E.g. for

/project
  /conf
    /expansionSettings.xml
  /expansions
  /pom.xml

settings in conf/expansionSettings.xml

<applicationExpansionSettings>
  <expansionDirectory>../expansions</expansionDirectory>
</applicationExpansionSettings>

add this to your pom.xml

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
        <version>3.1.0</version>
        <configuration>
          <filesets>
            <fileset>
              <directory>expansions</directory>
            </fileset>
          </filesets>
        </configuration>
      </plugin>