Maven Support
SmartGWT artifacts are not
published to any public repository, but a POM for each is included in the SDK, and can be
used to install them to your own private Maven repository. The official
Isomorphic plugin for
Maven
contains a handful of targets intended to simplify that process through automation. Please
refer to the plugin's documentation for usage and examples.
For a complete listing of artifacts installed in your environment, consult your repository
manager. Where no repository manager is in use, a directory listing can often provide all
the detail you need. Once you've made an artifact available to your build, you can use it
just like you'd use any other dependency.
Following execution of the plugin's install or deploy goal, your Maven repository will
include a handful of archetypes meant to jump start development with the SmartGWT framework.
Most users will want to start new projects with either the
archetype-smartgwt-quickstart or
archetype-smartgwt-quickstart-relogin
archetypes. To generate a new project based on the former:
- Install Maven, if necessary.
- Install SmartGWT, if necessary.
mvn com.isomorphic:isc-maven-plugin:1.4.5:install \
-Dproduct=SMARTGWT -Dlicense=EVAL -DbuildNumber=12.1p
-
Generate a project (using LATEST as below, or the version installed for you in step 2)
mvn archetype:generate \
-DartifactId=my-application \
-Dmodule=MyApplication -Dmodule-short-name=myapp \
-DgroupId=com.example -Dpackage=com.example.myapplication \
-DarchetypeGroupId=com.isomorphic.archetype \
-DarchetypeArtifactId=archetype-smartgwt-quickstart \
-DarchetypeVersion=LATEST -DinteractiveMode=false
and refer to the README in the new 'my-application' directory for further instructions
around usage in Maven, Ant, and Eclipse environments.
To generate a project from any of the following archetypes, provide its artifactId to the
above command's archetypeArtifactId parameter:
- archetype-smartgwt-quickstart:
The recommended approach for most applications, using data access / databinding with
"sql" datasources
- archetype-smartgwt-quickstart-relogin:
Like archetype-smartgwt-quickstart, but includes integration with Spring
Security to illustrate the
relogin
pattern.
- archetype-smartgwt-example-builtinds:
Illustrates how a single databound component can be used (and re-used) with many
datasources
- archetype-smartgwt-example-customds:
Illustrates setting up a DataSource accessing a servlet front controller (for example
Struts or Spring MVC controller) for the various DataSource operations
- archetype-smartgwt-example-dsdmi:
llustrates setting up a DataSource that calls methods on your configured server bean
in response to DataSource operations (fetch, add, update, remove)
- archetype-smartgwt-example-dshibernate:
llustrates the use of "hibernate" datasources in 'beanless mode'
- archetype-smartgwt-example-dshibernatederived:
This example illustrates the use of "hibernate" datasources with 'autoDeriveSchema'
to inherit fields from a Hibernate mapping or bean
- archetype-smartgwt-example-dsjpa:
llustrates the use of JPA DataSources
- archetype-smartgwt-example-gae:
llustrates an approach to running a SmartGWT application on the Google App Engine
standard environment using SQL DataSources
- archetype-smartgwt-example-gaedatastore:
llustrates an approach to running a SmartGWT application on the Google App Engine
standard environment using Google Cloud Datastore as a _limited_ JPA DataSource
- archetype-smartgwt-example-gaejpa:
llustrates an approach to running a SmartGWT application on the Google App Engine
standard environment using JPA DataSources
- archetype-smartgwt-example-manualhibernate:
llustrates setting up a DataSource that accesses your servlet controller, using
Hibernate to process the requests manually via a Spring MVC Controller class
(not recommended)
- archetype-smartgwt-example-restserver:
llustrates use of the Smart GWT
RESTHandler
servlet
to
easily provide data access to clients other than Smart GWT / SmartGWT (mobile,
Swing, native, etc).
- archetype-smartgwt-example-spring-hibernate3-dmi:
llustrates a DataSource accessing a Spring bean using Direct Method Invocation (DMI),
which then services the request manually via Hibernate.