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-unprotected
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.3.0:install \
-Dproduct=SMARTGWT -Dlicense=EVAL -DbuildNumber=12.0p
-
Generate a project (using LATEST as below, or the version installed for you in step 2)
mvn archetype:generate \
-DartifactId=my-application -Dmodule=MyApplication \
-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 'myapplication' 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-unprotected: The recommended approach for most
applications, using data access / databinding with "sql" datasources
- archetype-smartgwt-quickstart: Like archetype-smartgwt-quickstart-unprotected, but
includes integration with Spring Security
- 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: Illustrates 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: Illustrates 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: Illustrates the use of JPA DataSources
- archetype-smartgwt-example-gae: Illustrates an approach to running a SmartGWT
application on the Google App Engine standard environment using SQL DataSources
- archetype-smartgwt-example-gaedatastore: Illustrates 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: Illustrates an approach to running a SmartGWT
application on the Google App Engine standard environment using JPA DataSources
- archetype-smartgwt-example-manualhibernate: Illustrates 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: Illustrates 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: Illustrates a DataSource accessing
a Spring bean using Direct Method Invocation (DMI), which then services the request manually
via Hibernate.