structurizr / cli

A command line utility for Structurizr.
https://docs.structurizr.com/cli
Apache License 2.0
491 stars 75 forks source link

Invalid Jar File #65

Closed brunopenso closed 2 years ago

brunopenso commented 2 years ago

Hi, how are you?

I'm trying to use the CLI downloaded from the release screen but after version 10.0.1 I'm getting this error:

    Error: Command failed: java -jar /Users/myuser/dev/structurizr-cli-1.15.0.jar export -workspace '/Users/myuser/dev/assets/c4model/bank.dsl' -format plantuml
     -output './out/bank'
    no main manifest attribute, in /Users/brunopenso/dev/gbcli/bin/structurizr-cli-1.15.0.jar

I download the jar file and notice this difference between the 10.0.1 and the newest on the MANIFEST.MF.

10.0.1

Manifest-Version: 1.0
Main-Class: org.springframework.boot.loader.JarLauncher
Start-Class: com.structurizr.cli.StructurizrCliApplication
Spring-Boot-Version: 2.3.0.RELEASE
Spring-Boot-Classes: BOOT-INF/classes/
Spring-Boot-Lib: BOOT-INF/lib/
Spring-Boot-Classpath-Index: BOOT-INF/classpath.idx

newest

Manifest-Version: 1.0
Implementation-Title: Assembles a jar archive containing the main classe
 s.
Implementation-Version: 1.17.0

Is it possible to fix this?

simonbrowndotje commented 2 years ago

The CLI changed from a Spring Boot app to a regular Java app a while back, so the command to start the CLI is now different. See structurizr.sh for details.

brunopenso commented 2 years ago

Thanks @simonbrowndotje