If you are using SmartGWT, chances are high that you might be using it as a maven project to some stable and popular framework such as Spring.

There are many approaches to download and install SmartGWT jars from Isomorphic repository:

1) you could use command line to utilize maven isomorphic plugin and download, unpack and install SmartGWT dependencies. You might be using something as follows:

mvn com.isomorphic:isc-maven-plugin:install -Dproduct=SMARTGWT -Dlicense=POWER -DbuildNumber=6.0p -DbuildDate=2017-02-11

But, every time you wish to upgrade or downgrade SmartGWT dependency by changing builDate and/or buildNumber and/or even license. You would have to navigate to your project’s root directory and execute above command.

2) Second and configurable approach is to include maven isomorphic plugin in your pom and use your IDE (say eclipse) to manage SmartGWT dependencies. In this post, I would describe this very approach and I hope, it will make your life a bit easy:

STEPS

Step 1: Add isomorphic maven dependency

Include Isomorphic maven plugin by adding following dependency:

<dependency>
 <groupId>com.isomorphic</groupId>
 <artifactId>isc-maven-plugin</artifactId>
 <version>1.2.1</version>
 </dependency>

NOTE: isomorphic plugin comes with a lot of dependencies included in its package. You might face some errors in your build after adding this. In such case look for Dependency hierarchy of your maven project to find out any conflicts and resolve them by excluding them from isomorphic dependency. I faced this issue with 2 dependencies and resolved it as follows:


<dependency>
<groupId>com.isomorphic</groupId>
<artifactId>isc-maven-plugin</artifactId>
<version>1.2.1</version>
<exclusions>
<exclusion> <!-- exclude version 3 of asm -->
<groupId>asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</exclusion>
</exclusions>
</dependency>

Step 2: Add isc-maven-plugin in plugins section:


<plugin>
<groupId>com.isomorphic</groupId>
<artifactId>isc-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<buildNumber>6.1p</buildNumber>
<license>POWER</license>
<buildDate>2017-08-29</buildDate>
</configuration>
</plugin>

Now,

a) go to Run –> Run Configurations and create a new Maven Configuration.
b) Select your project in Base Directory section.
c) Enter isc:install in Goals section.
d) Apply and Run the newly created configuration.

Step 4: Your SmartGwt jars will be downloaded, unpacked and installed in your local maven repository.

That’s it. You are good to go. Feel free to ask me, if you face any issue while following this guide.

Isomorphic maven plugin : How to setup and use in eclipse

4 thoughts on “Isomorphic maven plugin : How to setup and use in eclipse

  • February 21, 2018 at 8:40 am
    Permalink

    Hi I am facing below issue for both the methods:

    [ERROR] Failed to execute goal com.isomorphic:isc-maven-plugin:1.2.1:install (default-cli) on project gwtspring: Error during POST request for authentication: peer not authenticated -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.

    Reply
    • February 21, 2018 at 9:03 am
      Permalink

      Hi Pranav,

      Could you pl, post complete stacktrace of error and command you’re firing?

      Reply
      • February 22, 2018 at 6:49 am
        Permalink

        Somehow it started working today. I guess some local network issues. Thanks anyways.

        Reply
        • February 22, 2018 at 6:54 am
          Permalink

          Cheers!

          Reply

Leave a Reply

Your email address will not be published. Required fields are marked *