2

I'm trying to migrate a project from gwt-2.6.1 to gwt-2.7. However, I'm facing a problem. In one of inherited modules tags in .gwt.xml are ignored by gwt compiler for some reason. So I have something like this in .gwt.xml:

  <source path="">
    ...
    <exclude name="servlet/**"/>
  </source>

But I keep getting errors like this, when compiling using maven with gwt-maven-plugin:

 Tracing compile failure path for type 'my.module.servlet.SomeClass'
[INFO]       [ERROR] Errors in 'jar:file:/path/to/jar/servlet/SomeClass.java'
[INFO]          [ERROR] Line 15: No source code is available for type javax.servlet.ServletContext; did you forget to inherit a required module?

As you can see, gwt tries to compile a file in servlet directory, which was excluded in .gwt.xml. What can be the cause? There were no such problems with gwt-2.6.1.

EDIT: I found that (in gwt-maven-plugin configuration)

<configuration>
  <incrementalCompileWarnings>true</incrementalCompileWarnings>
</configuration>

is what causes the problem (without it the project compiles). However, the question still remains.

EvilTosha
  • 157
  • 11
  • are you sure `path=""` is correct? Usually you specify a subdirectory like `client` or `shared` or similar. Possibly this doesn't work correctly if emtpy, so try `path="."` (`.` for "current directory") and specify `name="./servlet/**"` for the exclude path (i.e. also prefix with `.`) – geert3 Jan 12 '15 at 12:42
  • Have you tried ``? (not denying it can be a bug, just trying to find a workaround and know where to start looking at for fixing it) – Thomas Broyer Jan 12 '15 at 12:47
  • @geert3 we use `path=""` in many of our modules, because some java files aren't contained in any subdirectory. I believe it's the correct way to do things (http://comments.gmane.org/gmane.org.google.gwt/8663). – EvilTosha Jan 12 '15 at 12:54

1 Answers1

2

I faced the same issue,

<source path="plugin/campaign/rpc">
    <exclude name="**/impl/**"/>
</source>

Was now giving me errors in GWT 2.7, the java files under impl were not being ignored. Turns out that the folder had a typo and was actually called "Impl" so it seems not as of 2.7 excludes are now case sensitive.

I don't know if this is your issue but it resolved my problem.

Dale Ellis
  • 21
  • 2