Announcement

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

    Maven dependency for SmartGWT Pro?

    Hi,

    I am a licensed Smart GWT pro customer. I have successfully made SmartGWT integrate nicely[1] with our build system, using the following maven dependency:

    <dependency>
    <groupId>com.smartgwt</groupId>
    <artifactId>smartgwt</artifactId>
    <version>2.2</version>
    </dependency>

    But when I would like to test the visual builder, I had no success with my initial attempts at guessing the correct config (allthough I can make it work with a local evaluation version of the EE edition downloaded).

    Can you (or some other customers) help me?

    Thanks for what seems to be a great product.

    Sondre

    [1] - I found no way of getting the javadoc into my favorite IDE, IntelliJ 9, without hardcoding a path (or URL) into the local project - but I can live with that small hack.

    #2
    Hi sondresb,

    Although we publish detailed dependency information, we don't currently have Maven support for Pro. If you (or other community members who may respond) create POM files et al to work with Maven, if you post them here it will accelerate getting official Maven support for Pro/EE.

    Comment


      #3
      Hi,

      Thanks for the response.

      I am afraid my maven skills are approaching a decent level as a user - i.e. I can pretty much get my projects to build smoothly, but I am not currently competent to define a completely new component...

      I think I will do something along the lines of http://www.thinkplexx.com/learn/article/maven-learn-material/creapr/customjars to get my build up and running. But if I look at the DMI sample in the EE download, the ant script adds no less than 40 jars to the WEB-INF/lib. All of this cannot possibly be needed for that? Anyone here who knows what specifically is needed for DMI?

      Comment


        #4
        Am I correct to assume that isomorphic_core_rpc.jar and all its dependencies will do the trick? I am thinking maybe getting all its dependencies through maven (many of them are transitive dependencies of other stuff already in the project) and then using systemPath only for the single isomorphic jar.

        Feels a little bit "dirty", since the dependency will be very much hidden - but hey, I am a pragmatic guy.

        Comment


          #5
          Necessary but not sufficient - whether done via Maven or manual steps, the overall effect has to match this step by step installation process.

          Comment


            #6
            Thanks. My practical steps to get this working became (wanted to share in case someone has a similar setup and need - YMMV of course, the number of jars will be totally dependent on what the rest of the project looks like):

            1) Put these 5 jars in src\main\webapp\WEB-INF\lib:
            smartgwt<EDITION>.jar
            isomorphic_compression.jar
            isomorphic_core_rpc.jar
            isomorphic_tools.jar
            isc-jakarta-oro-2.0.6.jar

            and add local dependencies for them, such as:
            Code:
            	<dependency>
            	    <groupId>isomorphic_core</groupId>
            	    <artifactId>local1</artifactId>
            	    <version>local1</version>
            	    <scope>system</scope>
            	    <systemPath>${basedir}/src/main/webapp/WEB-INF/lib/isomorphic_core_rpc.jar</systemPath>
            	</dependency>
            I also incrementally added maven dependencies for stuff such as velocity, commons-codec/pool etc. - this of course varies a lot with what is already in the project.

            2) Check or copy log4j config (I already used log4j in my project) into src\main\resources of the maven project

            3) Copy modified server.properties into src\main\resources of the maven project

            4) Set up servlets. I use Guice 2, so it is somewhat different than the doc. Will create a separate thread on that in case anyone else can benefit.

            Then I copied my defined datasource into the webapp/ds folder and made sure the server.properties. I have an issue (multiple fetch methods in my DMI impl), but don't think it is related to configuration - creating another thread for that.

            So, with the config and basic infrastructure done - on to some more fun; coding actual features.

            Comment


              #7
              sondresb: Did you ever get a chance to post that thread about guice and maven?

              Also, is there a way to get the files in <project>\src\main\resources to be copied into the <project>\war directory. I tried running the targets: clean, eclipse, install, compile, gwt:compile, and gwt:run without success. Am I missing something?

              Thanks!

              Comment


                #8
                I did indeed post about setting up SmartGWT on Guice:

                http://forums.smartclient.com/showthread.php?t=12089&highlight=guice

                As for the resource copying, I think that would work more or less as you expect when you do "mvn package". In my local setup I have my IDE compile directly to the war-folder (non-versioned controlled, just output) that my app server uses when developing, but from time to time I run a small script with contents ala this to also get the resource merging I think you want into that same folder:

                call mvn package -Dmaven.test.skip=true
                7z x -owar -y target\myapp-1.0-SNAPSHOT.war

                (if on linux/mac, probably skip "call" + use unzip with relevant params)

                HTH.

                Cheers,
                Sondre

                Comment


                  #9
                  To bring this old thread up to date - there are now instructions for using Maven with SmartGWT here.

                  Comment

                  Working...
                  X