1
votes

When trying to run our GWT app from maven command line, I get the following error:

The parameters 'runTarget' for goal org.codehaus.mojo:gwt-maven-plugin:2.4.0:run are missing or invalid.

However, this is with the following in the pom.xml:

<plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>gwt-maven-plugin</artifactId>
            <!-- <version>2.5.0</version> 2.1.0-1 -->
            <version>${gwt.version}</version>
            <configuration>
                <configuration>
                    <runTarget>com.magick.webtrader/Webtrader.html</runTarget>
                    <buildOutputDirectory>${project.build.outputDirectory}</buildOutputDirectory>
                    <generateDirectory>${project.build.directory}/generated-sources/gwt</generateDirectory>
                    <hostedWebapp>${webappDirectory}</hostedWebapp>
                    <copyWebApp>true</copyWebApp>
                    <draftCompile>true</draftCompile>
                    <webXml>${basedir}/war/WEB-INF/web.xml</webXml>
                </configuration>

            </configuration>

            <executions>
                <execution>
                    <goals>
                        <goal>compile</goal>
                        <goal>test</goal>
                        <goal>generateAsync</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

What is it I'm doing wrong?

Thanks

2

2 Answers

1
votes

I don't think you need to nest those <Configuration> elements i.e. <Configuration> inside another <Configuration>. Try fixing this and see if it works. On a side note, you shouldn't need to specify parameters like <buildOutputDirectory> explicitly if you're anyway using the default values.

0
votes

If you are using eclipse and m2e - open the pom file in the pom editor and it will indicate the errors in your POM.xml.

One such error is in your Conifugration tag. Ensure that you drop your extra configuration tag.

Also always check your pom.xml w.r.t to sample ones from GWT team -

1) Validation

2) Dynatablerf

3) Mobilewebapp