GWT Super Development Mode with Tomcat server

已回答

Hello!

I am trying to setup GWT Super Development Mode in IntelliJ Idea. I am using GWT 2.7. However, as we are using Tomcat server for development, I don't want to use the buit-in Jetty server. What I tried:

  1. I created a GWT configuration, checked "Use Super Dev Mode", selected the right module. However, this deploys whole my server side code to the built-in server, attempts to initialize Spring and so on. I want it to serve just the Javascript!
  2. I tried adding "-noserver" and "-war" options, the latter pointing to some unrelated directory. This allowed me to use the bookmarklet development mode, where I must hit recompile manually
  3. I attempted to set -launcherDir to the artifact location, but I got "Unknown argument: -launcherDir"

What am I doing wrong? How to achieve automatic recompilation of GWT with external server?

0

In IntelliJ IDEA it's possible to create a new GWT project with Tomcat using the wizard, you can check how it's configured (artifacts, run/debug configuration, deployment, etc).

1
Avatar
Permanently deleted user

I tried the second approach and set up my workspace like in the preconfigured examples and it worked. Thank you!

0

Serge Baranov I am using IJ Ultimate 2020.1, Tomcat 7 and GWT 2.9.0

I created a Sample App wusing the GWT wizard and when I run it, get this error:

Exception in thread "main" java.lang.NoClassDefFoundError: cern/colt/map/OpenIntObjectHashMap
at com.google.gwt.dev.util.collect.IntMultimap.<init>(IntMultimap.java:28)
at com.google.gwt.dev.StringAnalyzableTypeEnvironment.<init>(StringAnalyzableTypeEnvironment.java:68)
at com.google.gwt.dev.MinimalRebuildCache.<init>(MinimalRebuildCache.java:192)
at com.google.gwt.dev.CompilerContext$Builder.<init>(CompilerContext.java:37)
at com.google.gwt.dev.DevModeBase.<init>(DevModeBase.java:635)
at com.google.gwt.dev.DevMode.<init>(DevMode.java:463)
at com.google.gwt.dev.DevMode.main(DevMode.java:430)
Caused by: java.lang.ClassNotFoundException: cern.colt.map.OpenIntObjectHashMap
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 7 more

 

0

Serge Baranov Does the Intellij GWT plugin have a maven option? I actually prefer the maven option as that is how my employer will deploy it.

0

请先登录再写评论。