Task 'jar' not found in root project 'build'

I have tried and tried and your software is hard to use. what does this error mean?

Task ‘jar’ not found in root project ‘build’.

the file is named color_test.jar otherwise I have deleted all “jar” in the snapcraft.yaml that existed and still get the error

this is the file:

name: colortest
version: ‘1.6.10’
summary: Application for Mind Mapping, Knowledge and Project Management
description: |
Freeplane is a free and open source software application that supports
thinking, sharing information and getting things done at work, in school
and at home. The core of the software is tools for mind mapping (also
known as concept mapping or information mapping) and using mapped
information.

confinement: devmode

apps:
colortest:
command: desktop-launch $SNAP/color_test

parts:
colortest:
after: [desktop-glib-only]
plugin: gradle
source: .

install:
  unzip DIST/color_test*.zip -d $SNAPCRAFT_PART_INSTALL/
build-packages:
  - unzip
  - openjdk-8-jdk
  - openjdk-8-jre

You want openjdk as stage-packages … the install: scriptlet has been deprecared quite a while ago (did you follow an outdated tutorial) in favour of override-build:

to run a java app inside a snap you want to have JAVA_HOME and perhaps CLASSPATH pointing to the shipped interpreter and class path in the apps environment (and likely also prefix your command with “java $SNAP/path/to/your/jar”) …

This failure seems to be related to the Gradle build system, you might want to checkout the gradle plugin’s documentation by running snapcraft help gradle in a terminal and The Gradle plugin - Documentation for snaps: Universal Linux packages.

Also, the corresponding source code might help:

https://github.com/snapcore/snapcraft/blob/master/snapcraft/plugins/gradle.py