1
votes

I'm moving over to a new computer, and in the processing I'm creating new Intellij 12 projects from my git source.

I have a gwt module file containing the following:

<!-- Other module inherits                                      -->
<inherits name="com.google.common.collect.Collect" />
<inherits name="com.google.common.base.Base" />
<inherits name="com.bdl.message.Message" />
<inherits name="com.bdl.universal.Universal" />
<inherits name="com.bdl.appengine.AppEngine" />
<inherits name="com.bdl.gwt.BdlGwt" />
<inherits name="com.google.gwt.inject.Inject"/>

The com.bdl.* entries are from another library I've written and I have their jar files (and sources) in the module dependencies. I can confirm that removing those dependencies causes the corresponding inherits nameto turn red, indicating an error.

I also have as a dependency, a global library Guava (GWT) which contains: classes: guava-14.0-rc2.jar sources: guava-14.0-rc2-sources.jar guava-gwt-14.0-rc2.jar javadoc guava-14.0-rc2-javadoc.jar

But despite this, the inherits for Collect and Base are red and the GWT compiler fails, saying it can't find Collect.gwt.xml.

On my old system I have an Intellij 11 project, which is set up the same way (there must be some difference somewhere, but I've been looking for hours to find it and can't) That also has the same library as a dependency, and the inherits lines in my app's module are still red, but the GWT compiler succeeds, finding the Collect.gwt.xml right where it should be, at: jar:file:/[path-to-guava]/guava-gwt-14.0-rc2.jar!/com/google/common/collect/Collect.gwt.xml

There must be something simple and stupid that I'm missing, but I can't find it.

1
Update... I tried an experiment of adding to the module a direct dependency on the directory in which guava is located (rather than going through my global library). That seems to have effectively worked around the problem, but seems like it shouldn't be necessary. It may, however, provide hints as to the underlying issue. - Ben Leitner

1 Answers

0
votes

You probably need to add guava-gwt-14.0-rc2.jar to your dependencies. Notice that the name has -gwt- embedded in it and you said that you have just these as dependencies:guava-14.0-rc2.jar sources: guava-14.0-rc2-sources.jar guava-gwt-14.0-rc2.jar javadoc guava-14.0-rc2-javadoc.jar

You can check that the jar is the appropriate one because when you open it (it is just a zip file) you should see the Collect.gwt.xml file somwhere within.