Wrong Manifest.mf in IntelliJ IDEA created .jar

前端 未结 7 1950
-上瘾入骨i
-上瘾入骨i 2020-11-28 02:08

I\'m trying to package a project using OptaPlanner 6.0.1 libraries into a .jar through IntelliJ IDEA\'s jar artifact but instead of my manifest.mf containing the standard

7条回答
  •  一生所求
    2020-11-28 02:30

    There are several ways to generate executable jars. Using IntelliJ's GUI feature is one good way. Another way is to use Maven (or similarly in gradle, buildr, etc) which is build-server friendly:

    It's more or less copy pasteable from the optaplanner examples maven build:

    1. The end-user jar (optaplanner-examples-*.jar) must include the classpath of its dependencies in its manifest.
    2. The sh and bat script must then run that jar with accordingly.

提交回复
热议问题