Generator

Jewai use Axgen to generate beans, mappings, ddl from .xmi files.

Generator Plugin

Configure pom.xml to use Generator Plugin:

<build>
        <plugins>
                <plugin>
                        <groupId>org.jewai</groupId>
                        <artifactId>generator-maven-plugin</artifactId>
                        <executions>
                                <execution>
                                        <phase>generate-sources</phase>
                                        <goals>
                                                <goal>generate</goal>
                                        </goals>
                                </execution>
                        </executions>
                        <configuration>
                                <modeldir>src/main/model</modeldir>
                                <rootPackageName>org.jewai.sample</rootPackageName>
                                <destinationPath>target/axgen/generate</destinationPath>
                                <xmiFilename>sample.xmi</xmiFilename>
                                <database>postgres</database>
                                <copySrc>true</copySrc>
                                <copyAddOn>true</copyAddOn>
                                <copyResources>true</copyResources>
                        </configuration>
                </plugin>
        </plugins>
</build>

Execute:

mvn jewai-generator:generate

Configuration properties:

Property Expression Default value Description
modeldir src/main/model Path of xmi file
rootPackageName -
destinationPath target/axgen/generate
xmiFilename - xmi filename
database postgres Values: postgres, mysql
copySrc false Copy generated src to src folder (src/main/java)
copyAddOn false Copy generated addOn to src folder (src/main/java)
copyResources false Copy generated resources to resources folder (src/main/resources)

Note: jewai-application-descriptor.xml and validation.xml will not be never overwrite, also if copyResources=true.