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
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:
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>
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.