0

These imports cannot be resolved in my app, I'm using GWT 2.5.1, and I checked the maven lib in the project and gwt is there:

import com.google.gwt.core.ext.UnableToCompleteException;
import com.google.gwt.core.ext.typeinfo.JClassType;
import com.google.gwt.core.ext.typeinfo.JField;
import com.google.gwt.core.ext.typeinfo.JMethod;
import com.google.gwt.core.ext.typeinfo.JParameter;
import com.google.gwt.core.ext.typeinfo.JPrimitiveType;
import com.google.gwt.core.ext.typeinfo.JType;
import com.google.gwt.core.ext.typeinfo.TypeOracle;

pom.xml

<dependencies>
    <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-servlet</artifactId>
        <version>${gwt.version}</version>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-user</artifactId>
        <version>${gwt.version}</version>
        <scope>provided</scope>
    </dependency>
</dependencies>
quarks
  • 33,478
  • 73
  • 290
  • 513

2 Answers2

1

You should replace {gwt.version} with your version like:

<dependency>
    <groupId>com.google.gwt</groupId>
    <artifactId>gwt-dev</artifactId>
    <version>1.5.2</version> //<== this here you should add
</dependency>

I think this will solve the dependencies.

I guess the dependency you found showed a general template but you should adjust it to your version. I see that you may use different <artifactId> (e.g. <artifactId>gwt-servlet</artifactId>) but that's the general idea.

Eypros
  • 5,370
  • 6
  • 42
  • 75
0

Have you added the needed jar files like gwt-dev-modified.jar to your class path?

gprathour
  • 14,813
  • 5
  • 66
  • 90