Reputation: 339
I am having problems with getting the gwt-maven-plugin working as the docs have stated. using GWT 2.8.2 using InteliJ 2018 Start with a sample project generated from the 2.8.2 webAppCreator with the templates maven,sample, readme.
That basic project has packaging set to war
<!-- POM file generated with GWT webAppCreator -->
<modelVersion>4.0.0</modelVersion>
<groupId>org.gwtproject.tutorial</groupId>
<artifactId>TodoList</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>org.gwtproject.tutorial.TodoList</name>
The gwt-maven-plugin is set to 1.0-rc-8
<!-- GWT Maven Plugin-->
<plugin>
<groupId>net.ltgt.gwt.maven</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.0-rc-8</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test</goal>
</goals>
</execution>
</executions>
<configuration>
<moduleName>org.gwtproject.tutorial.TodoList</moduleName>
<moduleShortName>TodoList</moduleShortName>
<failOnError>true</failOnError>
<!-- GWT compiler 2.8 requires 1.8, hence define sourceLevel here if you use
a different source language for java compilation -->
<sourceLevel>1.8</sourceLevel>
<!-- Compiler configuration -->
<compilerArgs>
<!-- Ask GWT to create the Story of Your Compile (SOYC) (gwt:compile) -->
<arg>-compileReport</arg>
<arg>-XcompilerMetrics</arg>
</compilerArgs>
<!-- DevMode configuration -->
<warDir>${project.build.directory}/${project.build.finalName}</warDir>
<classpathScope>compile+runtime</classpathScope>
<!-- URL(s) that should be opened by DevMode (gwt:devmode). -->
<startupUrls>
<startupUrl>TodoList.html</startupUrl>
</startupUrls>
</configuration>
</plugin>
At this point I can run in DEV mode. Once I change the packaging to gwt-app ( per the plugin's docs https://tbroyer.github.io/gwt-maven-plugin/usage.html) it fails.
[ERROR] Unknown packaging: gwt-app @ line 9, column 14
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.gwtproject.tutorial:TodoList:1.0-SNAPSHOT (D:\ToDoList\pom.xml) has 1 error
[ERROR] Unknown packaging: gwt-app @ line 9, column 14
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
Any idea as to the issue?
thanks
Upvotes: 2
Views: 1266
Reputation: 64561
You're probably missing the <extensions>true</extensions>
in the plugin.
Be aware that a gwt-app
is only client code, with no server-side at all. I'd suggest using https://github.com/tbroyer/gwt-maven-archetypes instead of the webAppCreator as a starting point. The modular-webapp archetype is functionally identical to the sample project generated by the webAppCreator, but in a more Maven-oriented setup.
Upvotes: 1