Stacks

Eclipse Che doesn’t provide a standard mechanism to add custom stacks during build time. Therefore, Kuksa IDE provides an easy and straight forward mechanism to append custom stacks to the ones provided by Eclipse Che during build time.

Adding New Stacks

To add a new stack simply write its JSON. And add it to the repository at stacks/src/main/resources/stacks. During build time Maven will unpack che-core-ide-stacks-<version> and append any JSON content from stacks/src/main/resources/stacks/* to it’s main stacks.json.

For instance, by the time of writing two stacks were already added. These are shown below.

$ tree stacks/src/main/resources/stacks
stacks/src/main/resources/stacks
   ├── agl.json
   └── yocto.json

Debugging

For verifying that your stack is being added to the main stacks.json you can first check stacks/target/classes/stacks.json.

Note

stacks/target/classes/stacks.json is created during the building of kuksa-stacks Maven module.

You can also just build kuksa-stacks Maven module instead of the entire assembly for quicker debuggin by running;

mvn clean install -rf :kuksa-stacks

You can also check if your stack was in fact added to the assembly by checking if kuksa-stacks-<version>.jar was included into the api.war as explained in Verify your build’s correctness.

Additionally, you can extract kuksa-stacks-<version>.jar’s content to verify it your stack is in stacks.json by running;

pushd ${TEMP_DIR}
jar xf WEB-INF/lib/kuksa-stacks-<version>.jar
cat stacks.json

Note

${TEMP_DIR} is obtaine by following the steps from Verify your build’s correctness