4

after reading a lot about SuperDevMode of gwt 2.5 I wanted to try it myself. I read https://vaadin.com/blog/-/blogs/vaadin-and-superdevmode and some other articles. As I understand I have to run the codeserver class. I checked out the gwt-maven-plugin repository but wasn't quite sure if there is already support for gwt2.5.

Has anybody managed to get the SuperDevMode working with maven?

Regards, arne

Edit:

Thanks to Thomas I got it working!! Here is a extract of my pom.

<resources>
    <resource>
      <directory>
    src/main/java
      </directory>
    </resource>
</resources>

    <plugin>
       <groupId>org.codehaus.mojo</groupId>
       <artifactId>exec-maven-plugin</artifactId>
       <version>1.2.1</version>
        <executions>
            <execution>
              <goals>
                <goal>java</goal>
              </goals>
            </execution>
        </executions>

      <configuration>                                     
         <mainClass>com.google.gwt.dev.codeserver.CodeServer</mainClass>
         <arguments>
                <argument>com.myapp.Application</argument>
         </arguments>
      </configuration>

   </plugin>

Now I just have to run the goal: exec:java to start the codeserver.

Arne
  • 1,364
  • 1
  • 11
  • 22

2 Answers2

6

Version 2.5.0-rc1 of the gwt-maven-plugin will support it through the run-codeserver goal. That version is currently staged. Please test it and vote.

In the meantime you can use it with the exec-maven-plugin.

Jason Braucht
  • 2,358
  • 19
  • 31
Thomas Broyer
  • 64,353
  • 7
  • 91
  • 164
  • thank you very much!! I have the codeserver deployed in my local repository and set up the exec-maven-plugin now. But I am having trouble with the classpath. When I try to execute the goal it is complaining about all the gwt.xml files missing. Even the guava or inject ones :( – Arne Jun 17 '12 at 16:53
  • most gwt dependencies weren't picked up because the had the scope "provided". My own gwt.xml files are not in the classpath though. If I copy them manually. I get an error while finding entry point classes even though it actually is in the classpath. – Arne Jun 17 '12 at 17:29
  • Set `classpathScope` to `compile` for the `exec-maven-plugin`. – Thomas Broyer Jun 17 '12 at 20:47
  • I already did that and my target folder is added to the classpath. The gwt.xml files are not in the target folder though ( I had to copy them manually). Can this be a problem? – Arne Jun 18 '12 at 12:05
  • Ah yeah, right. You could add you `src/main/java` as `resource` folder to overcome this. – Thomas Broyer Jun 18 '12 at 14:26
  • thanks again! I am getting closer. Now I compiles. After the compilation completes it tries loading an inherited compile.gwt.xml that cannot be found. Do I need to add sources of the gwt libraries? – Arne Jun 19 '12 at 09:39
  • I have one more question though: when the codeserver is started, I use `gwt:run` to start the webapp. But since I don't use development mode any more, I don't see any client side logging in eclipse. Do I have to use the remote logger or is there is nicer way to do that? – Arne Jun 19 '12 at 13:27
  • Yeah, `GWT.log()` will be compiled out. You'll have to use `java.util.logging` and either remote or client-side logging (e.g. logging to the browser's console, right next to the SourceMap'd code ;-) )) – Thomas Broyer Jun 19 '12 at 15:54
  • The sourcemapping is really awesome!! great work you guys did there :) I configured remote logging now. works really nice. – Arne Jun 19 '12 at 17:36
  • two more questions: Is there a way to let superdevmode pickup the sources of other projects in my workspace? we have a extra project for some client stuff. Changes in there are not recompiled. In the normal development mode I used the builder-helper-maven-plugin to add the sources. Same thing with server changes. Is there a workaround to apply them? Or do I have to reload the server? – Arne Jun 21 '12 at 07:50
  • 1
    It should work the same. Alternately, you can pass them as `-src` arguments (which you could actually do for the `src/main/java` too). – Thomas Broyer Jun 21 '12 at 08:53
  • finally I got it to work. I have another question O:) Whenever an exception is thrown I get the javascript exception now. I guess there is no way to get the java stack trace ? – Arne Jun 26 '12 at 13:41
  • FYI: updated the answer as `gwt-codeserver` is in Central now, and `gwt-maven-plugin` has support for it in the upcoming 2.5.0-rc1 version (vote ongoing). – Thomas Broyer Jul 13 '12 at 09:24
0

This src repo: https://github.com/jbarop/gwt-maven-plugin/tree/gwt-2.5 looks like it supports GWT 2.5, with the last commit message being:

added mojo for running the code server

(disclaimer: I've not tried it myself, yet)

Chris Buckett
  • 13,738
  • 5
  • 39
  • 46