Work with guava-gwt 12.0

276 views
Skip to first unread message

Juan Pablo Gardella

unread,
Jun 15, 2012, 12:16:55 PM6/15/12
to google-we...@googlegroups.com
Hi,

Yesterday I try to add guava-gwt in my GWT module but have the same
problems mention
http://stackoverflow.com/questions/4904344/using-guava-in-a-maven-gwt-project,
but I can't fix with the solutions mention there. The error is simple:

Unable to find 'com/google/common/collect/Collect.gwt.xml' on your classpath...

But I added in my module this line:

<inherits name="com.google.common.collect.Collect" />

And don't works. In the pom.xml I add guava-gwt as provided. Why
happen this error?

Thanks,
Juan

Thomas Broyer

unread,
Jun 16, 2012, 4:35:11 AM6/16/12
to google-we...@googlegroups.com
This is strange, because:
1. I'm using com.google.guava:guava-gwt:12.0 without any problem
2. com/google/common/collect/Collect.gwt.xml indeed is in the guava-gwt-12.0.jar

Maybe run mvn with -X and check the classpath used in gwt-maven-plugin, and check that you guava-gwt-12.0.jar in your local repo is not corrupted.
Message has been deleted

Juan Pablo Gardella

unread,
Jun 16, 2012, 11:16:26 PM6/16/12
to google-we...@googlegroups.com
Thanks! Change to compile it works.


2012/6/16 Steve Moyer <smoy...@gmail.com>:
> We're also using Collect from guava-gwt but if you want Maven to
> download and manage the dependency for you, then it shouldn't be
> scoped as "provided" in the pom.xml file.
>
> Try changing the scope to "compile" (or removing it since "compile" is
> the default).
>
> --
> You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> To post to this group, send email to google-we...@googlegroups.com.
> To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
>

Thomas Broyer

unread,
Jun 17, 2012, 4:53:32 AM6/17/12
to google-we...@googlegroups.com


On Sunday, June 17, 2012 5:16:26 AM UTC+2, Juan Pablo Gardella wrote:
Thanks! Change to compile it works.


2012/6/16 Steve Moyer <smoy...@gmail.com>:
> We're also using Collect from guava-gwt but if you want Maven to
> download and manage the dependency for you, then it shouldn't be
> scoped as "provided" in the pom.xml file.

Er, plain wrong?
 
>
> Try changing the scope to "compile" (or removing it since "compile" is
> the default). 

I'm using it with scope=provided and it Just Works™
This is com.google.common.base.Base though, not com.google.common.collect.Collect, but I'm using Collect in another (private) project with scope=provided and it Just Works™ there too (using 10.0.1 there).
Reply all
Reply to author
Forward
0 new messages