Requirements

check How to build SNAP from sources for guidelines.

Clone the SNAP Archetypes source code from GIT into a local directory referred to a ${snap-archetypes} from here on:

cd ${snap-archetypes}
git clone https://github.com/senbox-org/snap-archetypes.git

Build SNAP Archetypes:

mvn clean install

Setting up the IntelliJ IDEA

  1. Create a new project with the option "Project from existing sources", by choosing the pom.xml from ${snap-archetypes}

    create project screenshot
  2. Set the used JDK for the project.

    select the JDK for new pro

Usage of SNAP Archetypes

After making sure that snap-archetypes are successfully build, these can be used when creating new SNAP modules.

Assuming that snap-engine, snap-desktop and the preferred toolboxes (s1tbx, s2tbx, s3tbx) are locally cloned and build under ${snap} directory, one can chose a project (among the above enumerated) where a new module using a SNAP archetypes will be added.

From IntelliJ, being positioned on the parent project where a new module will be added, the steps are the following:

Note

If something goes wrong (e.g. wrong details provided when adding an archetype), these can be found under:

%userdir%\.IdeaIC[version]\system\Maven\Indices\UserArchetypes.xml

This is an XML file that can be easily modified. For deleting a wrong registered archetype, just delete the corresponding element, inside list.

Further read How to run and debug SNAP from an IDE.