GWT 2.8.2 and IntelliJ IDEA

479 views
Skip to first unread message

Mark Fekete

unread,
Mar 16, 2020, 7:07:54 AM3/16/20
to GWT Users
HI all,

I wonder if anyone is using Intellij and GWT 2.8.2. I 've literally found nothing about this topic.


My problem is that whenever i want to start and debug my application, it fails because the buildin Jetty-server runs with the wrong version 9.2 instead of 9.4.

The solution is to use a run configuration with a dedicated Jetty server. This is possible  with the "Jetty Runner"-IntelliJ-Plugin which uses Jetty version 9.4. 
Unfortunately, when I run this configuration in the context of my GWT 2.8.2 project, for some reasons the wrong jetty version is started: 9.2 which is located somewher in gwt-dev-xxx.jar

Any idea how to fix this? Or I'm forced to switch to Eclipse?

Adrian Smith

unread,
Mar 16, 2020, 9:19:49 AM3/16/20
to GWT Users
Hello,

I use IntelliJ although I must admit I start the application on the command-line as opposed to using IntelliJ to do this.

I have found the command

mvn -Djetty.version=9.4.19.v20190610 war:exploded gwt:devmode

work well for me.

To debug server-side code, in the GWT Maven plugin in pom.xml, I use:

      <plugin>
        <groupId>net.ltgt.gwt.maven</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <version>1.0-rc-10</version>
        ...
        <configuration>
          ...
          <jvmArgs>
            <arg>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8425</arg>
          </jvmArgs>
          ...
        </configuration>
      </plugin>

And then connect to that port using IntelliJ's debugger.

I hope that helps!

Jens

unread,
Mar 17, 2020, 4:24:19 AM3/17/20
to GWT Users
I use IntelliJ Ultimate and use the bundled Jetty integration plugin of IntelliJ. This is not the Jetty Runner plugin you are using. The bundled Jetty integration plugin lets you start a local Jetty just fine via a run configuration and lets you configure *.war or exploded war files to deploy. The run configuration as a "before launch" action that actually builds the war file using Gradle.

In your case it sounds like you have gwt-dev.jar on classpath and that Jetty Runner plugin uses the same classpath. Thus it can happen that jetty 9.2 from gwt-dev.jar might get started.

As an alternative (if you only have IntelliJ Community Edition) you could just download jetty and start it locally on your dev machine without any IntelliJ involved. Then use IntelliJ or whatever to produce a war file into the jetty/webapps folder. You could also create a symlink or use a script to copy your compile output into that webapps folder.


-- J.
Reply all
Reply to author
Forward
0 new messages