Hi Milan, Currently, there are some known incompatibilities between Maven and the Google Eclipse plugin, including the WEB-INF/lib issue you ran into. However, we are planning on improving things with the next release, and have just posted a survey on the groups (Maven users survey<http://groups.google.com/group/google-web-toolkit/browse_thread/thread/b43de4bb51a0ea2d?hl=en>) to elicit feedback from the community. Please take a look and reply with your suggestions.
Until we ship the next version, one solution for debugging in Eclipse is to forget about the Web App launch configurations, and instead use the gwt-maven-plugin's gwt:debug goal, and then attach to the debug process with a Remote Java Application launch configuration in Eclipse. Keith On Wed, Jan 13, 2010 at 5:14 AM, 米兰 <[email protected]> wrote: > Hi, > > we've started adapting gwt in our company as our new GUI layer and we > have some issues, especially in development mode. I would also refer > to this thread(http://groups.google.com/group/google-web-toolkit/ > browse_thread/thread/f505610b3bc1ca17/dfe298d08e8bca13? > lnk=gst&q=eclipse+hosted+mode+maven#dfe298d08e8bca13), but I am not > quite satisfied with answers, there must be some solution! I hope ;). > > The case is we have a quite big project with several independent > modules, We use maven 2 as our build/deployment tool, with all > dependencies at place etc. Our development tool is eclipse(with maven2 > and gwt plugins installed). When implementing gwt, we set up a new GUI > project using maven with all gwt plugins, maven-gwt plugins and that > stuff. > But we have problems when running our app in hosted mode in eclipse. > It looks like gwt doesn't accept fact our 50+ libraries(our modules > plus dependencies) are not placed in war/WEB-INF/lib. Our non GWT > modules changes quite often(at least version number, that is common > for whole app) - especially our business layer that we rebuild right > now. So placing them statically there is not the smartest solution - > that is up to maven to tackle it. > Our environment in eclipse looks correct with all maven dependencies, > we are able to build, project, but when we run it, we get > ClassNotFoundException, since libraries are not in war/WEB-INF/lib > (this is not the case of development mode as I said, there we already > have solution). Oh we also use Spring for DI, and that one really > suffers a lot without llibraries. > > The even stranger fact is, that some of libraries(our base modules) > are loaded automatically > > (Server class 'xx.xxxxx.CustomCollection' could not be found in the > web app, but was found on the system classpath,[WARN] Adding classpath > entry 'file:/home/milan/.m2/repository/xx/xxxxxx/CustomModule/2.01.0- > b4/CustomModule-2.01.0-b4.jar' to the web app classpath for this > session). > And here I'm really puzzled, since CustomCollection is not used at all > in our GWT app, but CustomModule-2.01.0-b4.jar is defined as maven > dependency in pom. Strange fact is, there some other custom modules, > that are also in the same pom file, but are not loaded automatically > this way, even I refer to them and use classes(interfaces) from them > in my GWT code. > > So problems summarized: > 1. maven dependencies not used in hosted mode : GUI team has to copy > manually all built libraries from local repository to war/WEB-INF/lib > - very tiresome in length > 2. some dependencies are added to web classpath some not, I couldn't > find out why > > I checked whole eclipse, tried all possible configurations, I found > some solutions, that might work, but not completely > 1. add libraries to Run Configuration/.../ClassPath/BootstrapEntries : > works, but what have we gained? > 2. use maven tasks "gwt:eclipse gwt:compile gwt:run" : better, I just > miss task for cleaning war/WEB-INF/lib directory before each running, > then it would plausible solution - even I don't like running > gwt:eclipse, not sure what it does beside copying maven dependencies > to war/WEB-INF/lib > 3. we can create task for deleting and copying necessary libraries to/ > from WEB-INF/lib : is this the only way? > > > > Sorry for longer post, but I am quite desperate. > > So any tips here? Experience? Can anyone help how to set up gwt > project with maven correctly in eclipse? > > > thanks, > > milan > > > > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > > >--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
