Juan Hernandez has uploaded a new change for review. Change subject: codegen: Use Maven to generate code ......................................................................
codegen: Use Maven to generate code Currently the code generator has to be executed as a Java class with a script or from an IDE. This patch adds a Maven profile that executes the generator using the exec plugin, so that it can be executed with the following command: mvn validate -Pupdate-code Once the generated code is updated the developer is resposible from adding it to the source code repository. Change-Id: I2b3472ed3009aa6acc2500d49e26628660764aaf Signed-off-by: Juan Hernandez <juan.hernan...@redhat.com> --- M ovirt-engine-sdk-java-codegen/pom.xml 1 file changed, 39 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine-sdk-java refs/changes/89/23689/1 diff --git a/ovirt-engine-sdk-java-codegen/pom.xml b/ovirt-engine-sdk-java-codegen/pom.xml index cfed472..21deba9 100644 --- a/ovirt-engine-sdk-java-codegen/pom.xml +++ b/ovirt-engine-sdk-java-codegen/pom.xml @@ -142,6 +142,45 @@ </build> </profile> + <!-- This profile is used to regenerate the SDK from the XML schema and + the RSDL documents. To run it use the validate phase and enable the + profile: + + mvn validate -Pupdate-code + + After generating the code remember to add the modifications to the + source code control system. --> + <profile> + <id>update-code</id> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>1.2.1</version> + <executions> + <execution> + <id>update-code</id> + <phase>validate</phase> + <goals> + <goal>java</goal> + </goals> + <configuration> + <mainClass>org.ovirt.engine.sdk.codegen.Main</mainClass> + <arguments> + <argument>--xsd</argument> + <argument>${basedir}/src/main/resources/api.xsd</argument> + <argument>--rsdl</argument> + <argument>${basedir}/src/main/resources/api.rsdl</argument> + </arguments> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> -- To view, visit http://gerrit.ovirt.org/23689 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2b3472ed3009aa6acc2500d49e26628660764aaf Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine-sdk-java Gerrit-Branch: sdk_3.3 Gerrit-Owner: Juan Hernandez <juan.hernan...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches