Example of downloading and running a program

Hi. I want to download and run a jar file. I think I should be using the dummy plugin but cannot find a simple example (these are hard to follow). Can any one give me pointers on how I run a program after it is downloaded?

TO clarify: I can run the program fine, just need to first download it, then run the downloaded version.

The source keyword is documented here: https://docs.snapcraft.io/snapcraft-parts-metadata

Here is an example that builds for me with the snap version of snapcraft and multipass:

name: helloworld
version: "0.0.1"
summary: Download and run hello world
description: |
  Download and run hello world
confinement: strict
grade: stable
base: core18

    command: bin/hello-world.sh

    plugin: nil
    override-build: |
      set -x
      snapcraftctl build
      wget https://raw.githubusercontent.com/salman-bhai/hello-world/master/Bash/hello-world.sh
      mkdir -p $SNAPCRAFT_PART_INSTALL/bin
      cp -r hello-world.sh $SNAPCRAFT_PART_INSTALL/bin/.
      chmod +x $SNAPCRAFT_PART_INSTALL/bin/hello-world.sh

There are other ways of doing this, I’m sure.

Fantastic. Exactly what I needed. Thanks!