首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 开源软件 >

[插件]应用Gradle打可执行jar包

2013-03-29 
[插件]使用Gradle打可执行jar包发现一个直接打出可执行jar包的gradle 插件地址:https://github.com/stigkj

[插件]使用Gradle打可执行jar包

发现一个直接打出可执行jar包的gradle 插件

地址:

https://github.com/stigkj/gradle-executable-jar-plugin

?

用法:由于已经很明了,在此不做翻译了;

Executable Jar plugin for Gradle

The Executable Jar plugin creates an executable jar from your project with all its runtime dependencies embedded.

This means, when using this plugin in a build, you will get a?artifact_-execjar.jar?artifact than can be run like this:

java -jar artifact_name-execjar.jar
Usage

To use the executable jar plugin, include the following in your build script:

apply plugin: 'executable-jar'// This is the class that starts your applicationmainClass = 'the.class.that.has.Main'buildscript {    repositories {        mavenCentral()    }    dependencies {        classpath 'net.nisgits.gradle:gradle-executable-jar-plugin:master-REL-6'    }}

热点排行