Maven打包生成可运行bat/sh脚本文件
利用Maven的appassembler-maven-plugin插件,就可以实现自动打包可运行的脚本,还可以跨平台。
<
plugin
>
<
groupId
>org.codehaus.mojo</
groupId
>
<
artifactId
>appassembler-maven-plugin</
artifactId
>
<
version
>1.1.1</
version
>
<
configuration
>
<
repositoryLayout
>flat</
repositoryLayout
>
<
repositoryName
>lib</
repositoryName
>
<
configurationSourceDirectory
>src/main/resources/conf</
configurationSourceDirectory
>
<!-- Set the target configuration directory to be used in the bin scripts -->
<
configurationDirectory
>conf</
configurationDirectory
>
<!-- Copy the contents from "/src/main/config" to the target configuration
directory in the assembled application -->
<
copyConfigurationDirectory
>true</
copyConfigurationDirectory
>
<!-- Include the target configuration directory in the beginning of
the classpath declaration in the bin scripts -->
<
includeConfigurationDirectoryInClasspath
>true</
includeConfigurationDirectoryInClasspath
>
<!-- prefix all bin files with "mycompany" -->
<
binPrefix
>startup</
binPrefix
>
<!-- set alternative assemble directory -->
<
assembleDirectory
>${project.build.directory}/server</
assembleDirectory
>
<!-- Extra JVM arguments that will be included in the bin scripts -->
<
extraJvmArguments
>-Xms768m -Xmx768m -XX:PermSize=128m
-XX:MaxPermSize=256m -XX:NewSize=192m -XX:MaxNewSize=384m
</
extraJvmArguments
>
<!-- Generate bin scripts for windows and unix pr default -->
<
platforms
>
<
platform
>windows</
platform
>
<
platform
>unix</
platform
>
</
platforms
>
<
programs
>
<
program
>
<
mainClass
>com.coderli.onecoder.server.HypervisorServer</
mainClass
>
<
name
>startup</
name
>
</
program
>
</
programs
>
</
configuration
>
</
plugin
>
Maven打包生成可运行bat/sh脚本文件的更多相关文章
- 【Maven学习】Maven打包生成普通jar包、可运行jar包、包含所有依赖的jar包
http://blog.csdn.net/u013177446/article/details/54134394 ******************************************* ...
- Maven将java项目打包生成可运行jar
Maven将java项目打包生成可运行jar Maven插件配置 <plugins> <plugin> <groupId>org.apache.maven.plug ...
- 【Maven学习】Maven打包生成包含所有依赖的jar包
http://blog.csdn.net/u013177446/article/details/54134583 ******************************************* ...
- maven的几个重要配置文件pom.xml、settings.xml;Maven打包生成包含所有依赖的jar包
一个java项目通过maven自动下载依赖时,会涉级读取三个配置文件,分别是项目下的pom.xml 文件 .用户家目录下的.m2/settings.xml 与 maven 全局配置settings.x ...
- rac_进行grid自检时提示运行runfixup.sh脚本一例
原创作品,出自 "深蓝的blog" 博客,欢迎转载,转载时请务必注明下面出处,否则追究版权法律责任. 深蓝的blog:http://blog.csdn.net/huangyanlo ...
- sh脚本文件的运行
sh脚本文件的运行mac终端下运行shell脚本 1.写好自己的 脚本,比如test-bash.sh 2.打开终端 执行,方法一: 输入命令 ./test-bash.sh , 方法二:直接把 aa.s ...
- RAC安装GI时运行root.sh脚本结果
第一节点运行root.sh脚本的结果: # /u01/app//grid/root.sh Performing root user operation for Oracle 11g The follo ...
- linux执行sh脚本文件命令
linux执行sh脚本文件命令 很多时候需要多个命令来完成一项工作,而这个工作又常常是重复的,这个时候我们自然会想到将这些命令写成sh脚本,下次执行下这个脚本一切就都搞定了,下面就是发布代码的一个脚本 ...
- 网站卡死,照惯例运行.bat批量处理文件进行重启不起作用
网站卡死,照惯例运行.bat批量处理文件进行重启不起作用,进入虚拟机控制台进行虚拟机重启仍然不起作用,通过ping分析物理服务器能ping通,各个虚拟机之前也能ping通,但是不能ping通外部,分析 ...
随机推荐
- 疑问,关于win64无法使用debug的问题
学习汇编语言的过程中,无法使用debug.exe,怎么办? 使用这篇文章中的解决方案 http://www.cnblogs.com/xuepeng0521/p/3661598.html 结果调试程序的 ...
- 【转】ORACLE的REDO与UNDO
一.什么是redo?redo:oracle在在线或者归档重做日志文件中的记录的信息,外以出现失败时可以利用这些数据来"重放"事务.每个oracle数据都至少有二个在线重做日志组,每 ...
- 他山之石——vs2013 安装与部署及程序打包
C#打包需要这个:InstallShield 2013 Limited Edition for Visual Studio .下载地址: InstallShield 2013 Limited Edi ...
- 解决Android studio导入项目卡死
在使用Android studio的时候常常遇到这样的问题,从github或是其他地方导入项目,Android studio呈现卡死的现象!当遇到这种情况时,可以看看是下面那种情况,在按照方法来解决! ...
- EventBus
EventBus GitHub 上的地址 https://github.com/greenrobot/EventBus EventBus干的事情可以概括来说 别人可以根据某一个事件订阅我,但是他得去实 ...
- BZOJ 2083: [Poi2010]Intelligence test
Description 问一个序列是不是起始序列的子序列. Sol 二分. 直接维护每个数出现的位置,二分一个最小的就行. Code /******************************** ...
- 【splay】文艺平衡树 BZOJ 3223
Description 您需要写一种数据结构(可参考题目标题),来维护一个有序数列,其中需要提供以下操作:翻转一个区间,例如原有序序列是5 4 3 2 1,翻转区间是[2,4]的话,结果是5 2 3 ...
- Java 动态代理机制详解
在学习Spring的时候,我们知道Spring主要有两大思想,一个是IoC,另一个就是AOP,对于IoC,依赖注入就不用多说了,而对于Spring的核心AOP来说,我们不但要知道怎么通过AOP来满足的 ...
- 设计模式--外观模式Facade(结构型)
一.外观模式 外观模式提供了一个统一的接口,用来访问子系统中的一群接口.外观模式定义了一个高层接口,让子系统更容易被使用. 二.UML图 三.例子 举个编译器的例子,假设编译一个程序需要经过四个步骤: ...
- js 实时监听input中值变化
注意:用到了jquery需要引入jquery.min.js. 需求: 1.每个地方需要分别打分,总分为100; 2.第一个打分总分为40; 3.第二个打分总分为60. 注意:需要判断null.&quo ...