Last active
April 16, 2020 02:53
-
-
Save yangl/b73fd7311cff34ac8062d6c0987c1b0d to your computer and use it in GitHub Desktop.
appassembler-maven-plugin打包,注意extraArgument一行只能配置一个参数,不然生成的shell会多加了个“” <configurationSourceDirectory>参数暂时没法配置多个目录或者排队某个目录 (比assembly.xml方便一点的是可以自动给生成启动脚本)详见http://www.mojohaus.org/appassembler/appassembler-maven-plugin/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>appassembler-maven-plugin</artifactId> | |
<version>2.1.0</version> | |
<executions> | |
<execution> | |
<id>make-assembly</id> | |
<phase>package</phase> | |
<goals> | |
<goal>assemble</goal> | |
</goals> | |
</execution> | |
</executions> | |
<configuration> | |
<encoding>UTF-8</encoding> | |
<repositoryLayout>flat</repositoryLayout> | |
<configurationDirectory>conf</configurationDirectory> | |
<configurationSourceDirectory>src/main/resources</configurationSourceDirectory> | |
<copyConfigurationDirectory>true</copyConfigurationDirectory> | |
<includeConfigurationDirectoryInClasspath>true</includeConfigurationDirectoryInClasspath> | |
<!--<logsDirectory>logs</logsDirectory>--> | |
<tempDirectory>tmp</tempDirectory> | |
<assembleDirectory>${project.build.directory}/${project.artifactId}</assembleDirectory> | |
<binFileExtensions> | |
<unix>.sh</unix> | |
</binFileExtensions> | |
<platforms> | |
<platform>unix</platform> | |
</platforms> | |
<repositoryName>lib</repositoryName> | |
<programs> | |
<program> | |
<mainClass>com.sf.edp.event.engine.main.EventEngineMain</mainClass> | |
<name>start</name> | |
<jvmSettings> | |
<extraArguments> | |
<extraArgument>-Xmx3G</extraArgument> | |
<extraArgument>-Xms3G</extraArgument> | |
<extraArgument>-XX:MaxMetaspaceSize=256M</extraArgument> | |
<extraArgument>-XX:MetaspaceSize=256M</extraArgument> | |
<extraArgument>-XX:+UseG1GC</extraArgument> | |
<extraArgument>-XX:MaxGCPauseMillis=100</extraArgument> | |
<extraArgument>-XX:+ParallelRefProcEnabled</extraArgument> | |
<extraArgument>-XX:ErrorFile=/app/log/hs_err_pid%p.log</extraArgument> | |
<extraArgument>-XX:HeapDumpPath=/app/log</extraArgument> | |
<extraArgument>-XX:+HeapDumpOnOutOfMemoryError</extraArgument> | |
</extraArguments> | |
</jvmSettings> | |
</program> | |
</programs> | |
</configuration> | |
</plugin> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment