leiningen uberjar doesn't add manifest attribute

I am unsuccessfully trying to run instant-pdf

lein uberjar
cd target
java -jar instant-pdf-0.2.0-standalone.jar
no main manifest attribute, in instant-pdf-0.2.0-standalone.jar

Do I have to manually edit the jar now?

I am using OpenJDK 7.u13-x86_64.


instant-pdf's project.clj lacks a :main setting, and I bet that's why it's not setting a main class in the jar's manifest. However, the project doesn't specify a main method anywhere in the sources either, so you'd have to add one yourself. See the section on Running Code from the Leningen Tutorial for details on using :main .


@Yogothos pointed out that using the Ring plugin for Leiningen will fix this (quoting his comment below):

The project should be built using lein ring uberjar instead of lein uberjar . The Ring plugin is responsible for creating the main.

链接地址: http://www.djcxy.com/p/51736.html

上一篇: 在leiningen创建多个uberjars

下一篇: leiningen uberjar不添加显示属性