Search code examples
gwtspring-roo

exec-maven-plugin Error in Spring-Roo Generated GWT Application


I am trying to generate a simple gwt application using spring-roo. Following is the contents of log.roo file:

project --projectName erp --topLevelPackage org.erp
persistence setup --provider HIBERNATE --database MYSQL 
web gwt setup

After project generation, I run following command:

mvn clean package

And I receive following error:

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:exec 
(default) on project erp: Command execution failed. Process exited with an 
error: 255 (Exit value: 255) -> [Help 1]

Following is the exec plugin configuration:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>exec-maven-plugin</artifactId>
    <version>1.2</version>
    <executions>
        <execution>
            <phase>process-classes</phase>
            <goals>
                <goal>exec</goal>
            </goals>
            <configuration>
                <id>VerifyRequestFactoryInterfaces</id>
                <executable>java</executable>
                <arguments>
                    <argument>-cp</argument>
                    <classpath/>
                    <argument>com.google.web.bindery.requestfactory.apt.ValidationTool</argument>
                    <argument>${project.build.outputDirectory}</argument>
                    <argument>${project.groupId}.client.managed.request.ApplicationRequestFactory</argument>
                </arguments>
            </configuration>
        </execution>
    </executions>
</plugin>

What does error 255 supposed to mean? What is the use of exec plugin in this scenario? And how can I overcome this error?

Thanks...


Solution

  • The gwt setup in roo is not well documented.

    At the end to complete the gwt setup you have to run web gwt all to create the gwt scaffolding, actually this is the cause of your error, because it tries to run the validator before the gwt stuff has been created.

    And, for some reason, before running web gwt setup you have to create at least an entity.

    This should work in your case:

     project --projectName erp --topLevelPackage org.erp
     persistence setup --provider HIBERNATE --database MYSQL 
     entity jpa --class  org.erp.domain.MyClass
     web gwt setup
     web gwt all --proxyPackage ~.client.proxy --requestPackage ~.client.request
     quit
    

    Here you have a working roo example I post in SO some time ago: Spring + GWT or Spring vs GWT