No description, website, or topics provided.
Java
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/main/resources
.gitignore
LICENSE
README.md
pom.xml

README.md

Simple archetype to create a Java application with a main method which does a request to the commercetools platform.

It prints the product names and the category names it is in:

found product MB PREMIUM TECH T in categories Long sleeves
found product MB SOFTSHELL LINER in categories Snowboard equipment
found product WB ATHLETIC TANK in categories Tank tops
found product GIRLS HARTBREAK CREW in categories Long sleeves
found product SAPPHIRE in categories Snowboard equipment

Create the software project

requirements:

mvn archetype:generate -B \
  -DarchetypeGroupId=com.commercetools.maven-archetypes \
  -DarchetypeArtifactId=commercetools-hello-java-archetype \
  -DarchetypeVersion=0.1.1 \
  -DgroupId=io.sphere.demo \
  -DartifactId=commercetools-hello-java \
  -Dversion=0.1.0-SNAPSHOT \
  -DcommercetoolsProjectKey=YOUR-PROJECT-KEY \
  -DcommercetoolsClientId=YOUR-CLIENT-ID \
  -DcommercetoolsClientSecret=YOUR-CLIENT-SECRET

Change to the project folder

cd commercetools-hello-java

Run the project

mvn compile exec:java