1. Home
  2. Docs
  3. Shared profile
  4. Profile updaters
  5. Maven profile updater plugin

Maven profile updater plugin

The Maven profile updater plugin permits to update your Jeyzer profile during the the Maven package phase of your application.

The Jeyzer profile updater is responsible for adding/updating/deleting the Jeyzer analysis pattern changes within your master or shared profile.
Pattern changes are the result of the compilation of the Jeyzer annotations referenced in your applicative source code.
The resulting pattern profile file is generated along with its original source file, suffixed by .source to allow easy file diff.

Maven plugin is available on the Maven Central repository :

<groupId>org.jeyzer.build</groupId>
<artifactId>jeyzer-maven-plugin</artifactId>
<version>2.0</version>

The plugin takes as parameters :

  • sourcePatterns : the source patterns XML file path. Mandatory
  • newPatternEntries : the new pattern entries XML file path. Optional
    Default value is : ${project.build.directory}/generated-sources/jeyzer/new_pattern_entries.xml
  • targetPatternsDir : the patterns output directory. Optional
    Default value is : ${project.build.directory}/generated-sources/jeyzer
  • targetPatternsName : the generated pattern file name (without file extension). Optional
    Default value is the source pattern file name

Usage

In your project pom.xml add this block and adapt the paths (like the master vs shared one) :

        <!-- Update the project Jeyzer profiles -->
        <plugin>
            <groupId>org.jeyzer.build</groupId>
            <artifactId>jeyzer-maven-plugin</artifactId>
            <version>2.0</version>
            <executions>
                <execution>
                    <id>demo-features-mx</id>
                    <phase>package</phase>
                    <configuration>
                        <sourcePatterns>${basedir}/src/main/config/profiles/master/demo-features-mx/analysis/patterns.xml</sourcePatterns>
                        <!-- newPatternEntries>${project.build.directory}/generated-sources/jeyzer/new_pattern_entries.xml</newPatternEntries>
                        <targetPatternsDir>${project.build.directory}/generated-sources/jeyzer</targetPatternsDir> -->
                        <targetPatternsName>demo-features-mx_patterns</targetPatternsName>
                    </configuration>
                    <goals>
                        <goal>update-profile</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

This example is an extract from the Jeyzer demo pom.xml.

This Maven plugin is a Jeyzer Community project.