Simple example integrating the commercetools JVM SDK with Spring MVC and Spring DI
requirements:
mvn archetype:generate \
-DarchetypeGroupId=com.commercetools.maven-archetypes \
-DarchetypeArtifactId=commercetools-spring-mvc-quickstart \
-DarchetypeVersion=0.4.0 \
-DgroupId=io.sphere.demo \
-DartifactId=commercetools-spring-mvc \
-Dversion=0.1.0-SNAPSHOT \
-DcommercetoolsProjectKey=YOUR-PROJECT-KEY \
-DcommercetoolsClientId=YOUR-CLIENT-ID \
-DcommercetoolsClientSecret=YOUR-CLIENT-SECRET
cd commercetools-spring-mvc
mvn tomcat7:run
- Import archetype URI by
Import ... > Projects from Git > Clone URI
- Install the archetype in local repository with
mvn install
- Go to
Preferences > Maven > Archetypes
andAdd Local Catalog
- Select the catalog from file (
archetype-catalog.xml
) - Create new Maven project and select the archetype (remember so select
Include snapshot archetypes
)
If you have any troubles with installation in Eclipse, you may want to have a look at this issue: #74
This template is a modified copy of https://github.com/kolorobot/spring-mvc-quickstart-archetype