GWT Designer with Maven

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

GWT Designer with Maven

Postby pup » Mon Sep 15, 2008 2:33 pm

does anyone have any best practices to share when using this plugin with maven v2?

i noticed one odd thing after i installed and clicked on the "designer" tab... it couldn't find gwt-user.jar. even though GWT_HOME was set correctly, GWT Designer was still looking for this library in the classpath. fair enough, but maven repositories usually rename the libraries, inserting their version number. so although the .classpath variable in eclipse was pointing to gwt-user-1.5.2.jar... GWT Designer was barking not because it didn't find the correct objects/methods, but because the filename was different. to correct, i symlinked that library in my .m2 repository to gwt-user.jar, then created another entry in my workspace/project/.classpath file.

that's a little ugly. searches on this forum don't show much. has anyone else seen this? are there more gotcha's ahead for me if i use maven? comments?
pup
 
Posts: 3
Joined: Wed Sep 10, 2008 6:37 am

Re: GWT Designer with Maven

Postby Eric Clayberg » Mon Sep 15, 2008 2:46 pm

We don't use Maven and know virtually nothing about it.

The GWT_HOME classpath variable is provided as a convenience. You can configure the project classpath manually if you wish and point to any gwt-user.jar that you like.

GWT Designer does need to be able to find the gwt-user.jar in order to parse any of the GUI classes.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: GWT Designer with Maven

Postby ronlawrence3 » Mon Sep 15, 2008 4:36 pm

I am having the same issue with maven. To the instantiations folks: Unfortunately, maven requires jars to be versioned, so my gwt-user.jar is actually gwt-user-1.4.62.jar, which designer fails to find. Could this be changed to look for a specific class in the classpath rather than a hardcoded jar name? Adding jars to the classpath after each maven build is so inconvenient as to cause us to not use the 5.1 release.
ronlawrence3
 
Posts: 3
Joined: Mon Sep 15, 2008 4:33 pm

Re: GWT Designer with Maven

Postby Eric Clayberg » Tue Sep 16, 2008 5:39 am

The latest GWT Designer build will now let you use renamed gwt-user.jar files.

Now we will identify gwt-user.jar as any JAR file containing the file com/google/gwt/core/Core.gwt.xml.

You can point your project's classpath at gwt-user-1.5.2.jar, and it should now work.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: GWT Designer with Maven

Postby ronlawrence3 » Tue Sep 16, 2008 5:43 am

Thank you very much. I have to say that this sort of turnaround is quite impressive!
ronlawrence3
 
Posts: 3
Joined: Mon Sep 15, 2008 4:33 pm

Re: GWT Designer with Maven

Postby pup » Tue Sep 16, 2008 5:59 am

Yes, thanks Eric.
pup
 
Posts: 3
Joined: Wed Sep 10, 2008 6:37 am

Re: GWT Designer with Maven

Postby Eric Clayberg » Tue Sep 16, 2008 6:04 am

Seemed like the right thing to do. ;-)
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: GWT Designer with Maven

Postby jmbe » Wed Oct 15, 2008 11:04 am

Could you perhaps also change so that the gwt-dev jar is loaded from the classpath?

I get the following error when I try to switch to Design mode:

Code: Select all
Caused by: org.apache.commons.lang.exception.NestableError: Can not open file |/home/jmbe/.m2/repository/com/google/gwt/gwt-user/1.5.2/gwt-dev-linux.jar|


Notice that it tries to load the dev jar from the user directory.

The gwt-user jar is located at /home/jmbe/.m2/repository/com/google/gwt/gwt-user/1.5.2/gwt-user-1.5.2.jar. The gwt-dev jar is located at /home/jmbe/.m2/repository/com/google/gwt/gwt-dev/1.5.2/gwt-dev-1.5.2-linux.jar. This is standard for Maven and both of these files have been added to the Eclipse project classpath automatically.



Steps to reproduce:

1. Add http://m2eclipse.codehaus.org/ as a plugin in Eclipse.
2. Install Maven 2 according to the instructions at the bottom of http://maven.apache.org/download.html
3. Run the two commands on http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/archetype.html to create a new Maven GWT project.
4. In Eclipse, choose Import > Maven projects and point to the directory with the newly created maven project. (It's the directory with pom.xml in it.)
5. Open the Application class and try to switch to design mode.
jmbe
 
Posts: 2
Joined: Wed Oct 15, 2008 10:43 am

Re: GWT Designer with Maven

Postby jmbe » Wed Oct 15, 2008 11:40 am

I just installed the latest build (instead of the release version I was using) and this was apparently fixed already! Great!
jmbe
 
Posts: 2
Joined: Wed Oct 15, 2008 10:43 am

Re: GWT Designer with Maven

Postby Eric Clayberg » Wed Oct 15, 2008 12:51 pm

jmbe wrote:I just installed the latest build (instead of the release version I was using) and this was apparently fixed already! Great!

Yes. That issue was addressed about a week or so ago.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 3 guests