JetBrains / plugin-repository-rest-client

Apache License 2.0
21 stars 15 forks source link

Wrong main class in the manifest of the 2.0.15 "all" jar #46

Open odisseus opened 3 years ago

odisseus commented 3 years ago

Steps to reproduce:

curl -Lo /tmp/plugin-client.jar "https://dl.bintray.com/jetbrains/intellij-plugin-service/org/jetbrains/intellij/plugin-repository-rest-client/2.0.15/plugin-repository-rest-client-2.0.15-all.jar"
java -jar /tmp/plugin-client.jar info

Expected output: usage information Actual output:

Error: Could not find or load main class org.jetbrains.intellij.PluginRepository.Client
Caused by: java.lang.ClassNotFoundException: org.jetbrains.intellij.PluginRepository.Client

Finding the intended main class

jar -tf /tmp/plugin-client.jar | grep 'org/jetbrains/.*/Client\.class'
org/jetbrains/intellij/pluginRepository/Client.class

Verifying the main class

java -cp /tmp/plugin-client.jar org.jetbrains.intellij.pluginRepository.Client info
You must set argument plugin
Usage: org.jetbrains.intellij.pluginRepository.Client$InfoOptions
  -channel [String] Plugin channel
  -family [ProductFamily] Plugin's family (INTELLIJ)
  -host [String] Plugins repository host (https://plugins.jetbrains.com)
  -plugin [String] Plugin ID defined in plugin.xml

This problem is not the same as #23, because the "all" jar actually contains the main class, but it's not runnable due to an error in the manifest file.

odisseus commented 1 year ago

The version 2.0.32 still has this problem.