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]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
