Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    HowTo: SmartGWT with Eclipse and GWT-Maven

    How to get started using Eclipse and the Maven 2 Plugin for GWT:

    Setting up Eclipse & Maven2

    If you get a chance to try this out, please let me know about any
    problems or errors you encountered. Suggestions are welcome, too.

    More information on the Plugins used:

    m2eclipse: Eclipse Maven 2 Plugin

    GWT-Maven: Eclipse Maven 2 Plugin for the Google Web Toolkit

    #2
    Great job Nick, thanks a lot for posting that.

    Note: if you can't use Maven (you should if you can), there are brief instructions here.
    Last edited by Isomorphic; 22 Apr 2009, 13:10.

    Comment


      #3
      Note: Some versions of Eclipse on Linux don't seem to be able to assume the default-location of your local repository when Maven hasn't been configured, yet. This will result in a folder named ${settings.localRepository} being created inside your workspace when you want to start the GWT Shell.

      Fix this by creating the file ~/.m2/settings.xml (containing the path to your local maven2 repository):
      Code:
      <settings xmlns="http://maven.apache.org/POM/4.0.0"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                                    http://maven.apache.org/xsd/settings-1.0.0.xsd">
          <localRepository>${user.home}/.m2/repository</localRepository>
      </settings>
      Last edited by nlotz; 16 Dec 2008, 15:56.

      Comment


        #4
        I'm getting a 404 for the posted link. Is there another copy around?

        Comment


          #5
          Originally posted by andmej
          I'm getting a 404 for the posted link. Is there another copy around?
          That's because I'm moving my server at the moment. It'll be up again in a few hours ...

          Comment


            #6
            the wiki is up again - apologies for the inconvenience.

            anyone interested in contributing ? just drop me a mail ...
            Last edited by nlotz; 6 Jan 2009, 12:35.

            Comment


              #7
              error running gwt shell

              First of all, thanks for the great tutorial. I have followed the steps but have some problems. When I try to run the thing by right click on pom.xml and then "maven build" (and then gwt:gwt), I get the following error in the console of eclipse:

              java.lang.UnsatisfiedLinkError: Can't load library: C:\Users\Damir\.m2\repository\com\google\gwt\gwt-dev\1.5.3/swt-win32-3235.dll
              ..
              .
              Could not find the main class: com.google.gwt.dev.GWTShell. Program will exit.

              Do you have any idea what's the cause of this? Do i need to set a path to the gwt or something?

              Greetings,
              Damir

              Comment


                #8
                Originally posted by damirovic
                java.lang.UnsatisfiedLinkError: Can't load library: C:\Users\Damir\.m2\repository\com\google\gwt\gwt-dev\1.5.3/swt-win32-3235.dll
                When you take a look into that folder, do you see a swt-win32-3235.dll ?


                When running your app via GWT-Maven you should see something like this:
                Code:
                [INFO] [dependency:unpack]
                [INFO] Configured Artifact: com.google.gwt:gwt-dev:windows-libs:1.5.3:zip
                [INFO] gwt-dev-1.5.3-windows-libs.zip already unpacked.
                When running your app via GWT-Maven for the first time you should see something like this:
                Code:
                [INFO] [dependency:unpack]
                [INFO] Configured Artifact: com.google.gwt:gwt-dev:windows-libs:1.5.3:zip
                [INFO] Unpacking C:\Users\Damir\.m2\repository\com\google\gwt\gwt-dev\1.5.3\gwt-dev-1.5.3-windows-libs.zipto
                 C:\Users\Damir\.m2\repository\com\google\gwt\gwt-dev\1.5.3
                with Includes null and excludes:null
                I think I had that problem with another GWT-App and solved it by forcing the GWT-Maven plugin
                to re-download and extract all GWT-development libraries. This can be done by deleting this folder:

                C:\Users\Damir\.m2\repository\com\google\gwt

                If you don't mind the download you could try that and post the Console output if it doesn't work.

                And of course google might be helpful:
                http://www.google.de/search?hl=en&q=...win32-3235.dll
                Last edited by nlotz; 8 Jan 2009, 15:24.

                Comment


                  #9
                  Missing Artifact com.smartgwt

                  I am learning java (only becuase this GWT and Smart GWT) seem so kick ass

                  So this question may be really dumb and for that I am sorry however

                  I tried to exactly follow you instructions (They are thhe only ones I can find on how to use SmartGWT with eclipse). I am growing to love eclipse as it seem to keep everything glued together.

                  At the end of the process I get the error
                  1/8/09 7:44:47 AM EST: [INFO] User settings file does not exist /Users/billmarshall/.m2/settings.xml
                  1/8/09 7:44:49 AM EST: [INFO] snapshot com.smartgwt:samrtgwt:1.0b2-SNAPSHOT: checking for updates from gwt-maven
                  1/8/09 7:44:50 AM EST: [INFO] snapshot com.smartgwt:samrtgwt:1.0b2-SNAPSHOT: checking for updates from smartclient
                  1/8/09 7:44:50 AM EST: [INFO] snapshot com.smartgwt:samrtgwt:1.0b2-SNAPSHOT: checking for updates from gwt-maven-plugins
                  1/8/09 7:44:51 AM EST: Missing artifact com.smartgwt:samrtgwt:jar:1.0b2-SNAPSHOT:compile

                  I think this is becuase I have not told it how to find the smartgwt.jar

                  Trouble is I do not know how to do that

                  What am I doing wrong

                  Thanks

                  Comment


                    #10
                    Originally posted by cwm1949
                    What am I doing wrong
                    you've got a typo in the Artifact Id ...

                    -> open your pom.xml
                    -> select the Dependencies tab
                    -> select the SmartGWT dependency
                    -> change the Artifact Id from samrtgwt to smartgwt
                    -> save your pom.xml
                    Last edited by nlotz; 8 Jan 2009, 11:24.

                    Comment


                      #11
                      it works

                      Thanks for the suggestions, It works! I did it by deleting the google folder in my repository and therefore forcing it to redownload it.

                      Thanks!

                      Greetings,

                      Damir

                      Comment


                        #12
                        Still confused

                        Thanks you were correct I fat finger the word smartgwt

                        With your help I fixed that and am now getting this error
                        ----------------
                        Unable to load required native library 'gwt-ll'. Detailed error:
                        Can't load library: /Users/billmarshall/.m2/repository/com/google/gwt/gwt-dev/1.5.3/libgwt-ll.jnilib)

                        Your GWT installation may be corrupt
                        On Mac OS X, ensure that you have Safari 3 installed.

                        -------------------
                        How do I get past this?

                        Note I have been reading java manual etc and the world has moved forward during my research, so I was using gwt 1.5.2 and I have down loaded 1.5.3 I have put that directory in my path but I am really wrapped around the axil of getting the hello world ap to run.

                        Is there a way, short of reformatting my apple, to just start over and reinstall gwt, smartgwt mavin (I still do not understand what it does but what I have seen makes me happy to use it.) eclipse etal. as I really need to start working on my problem rather than the tool I hope to use.

                        Thanks again for your patience as these tools look very powerful I just can not get my environment correct.

                        Comment


                          #13
                          Originally posted by cwm1949
                          Is there a way, short of reformatting my apple, to just start over and reinstall gwt, smartgwt mavin (I still do not understand what it does but what I have seen makes me happy to use it.) eclipse etal.
                          Sorry - I don't do Mac OS, but the following could do the trick:

                          -> ensure that you have Safari 3 installed
                          -> remove GWT from your path and unset all GWT environment variables
                          -> instruct Maven2 to use a fresh repository by modifying /Users/billmarshall/.m2/settings.xml :
                          Code:
                          <settings xmlns="http://maven.apache.org/POM/4.0.0"
                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                            xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                                                http://maven.apache.org/xsd/settings-1.0.0.xsd">
                            <localRepository>/Users/billmarshall/.m2/newRepository</localRepository>
                          </settings>
                          -> install the latest version of eclipse to a location of your choice
                          -> follow the tutorial (use copy & paste for all values)
                          Last edited by nlotz; 8 Jan 2009, 15:26.

                          Comment


                            #14
                            Thanks

                            Originally posted by nlotz
                            follow the tutorial[/url] (use copy & paste for all values)

                            Your time spent on helping people, like me, understand the tool is much appreciated. I got it working and have even made a change based on the smartgwt examples and gotten it to run also.

                            My next goal is to understand how to ise the tool to connect to an Informix database we have. Do you have a suggestion of the best place to understand how to connect smartgwt code using the Informix JDBC connection and then how to deploy from the local gwt server to an Apache server with tomcat.

                            But above all THANKS for your time and effort. You have helped me and many others begin to understand this powerful tool.

                            Borland Pascal was a great success, not only because for it's time it was a good language, but also because it had a clear set of instructions on how to use it. You're providing the same excellent support for SmatGWT.
                            Last edited by cwm1949; 10 Jan 2009, 08:20.

                            Comment


                              #15
                              Hi cwm1949,

                              In the short term take a look at RestDataSource. If you have a Java server, you can use tools like XStream to quickly stream JDBC result sets obtained from Informix to SmartClient's RestDataSource.

                              However, SmartGWT EE (commercial version), due out shortly, has direct support for Hibernate DataSources, which in turn can connect to Informix, so you might want to consider that when it's available.

                              Comment

                              Working...
                              X