添加RPM打包方式
This commit is contained in:
+60
-8
@@ -20,13 +20,6 @@
|
||||
<artifactId>moquette-broker</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.vafer/jdeb -->
|
||||
<dependency>
|
||||
<groupId>org.vafer</groupId>
|
||||
<artifactId>jdeb</artifactId>
|
||||
<version>1.10</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -128,7 +121,66 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- 打包RPM 开始-->
|
||||
<!-- 打包RPM 包需要本地有rpm命令才可以,linux和mac都可以安装rpm。如果是windows需要cygwin安装rpm才可以,如果不需要rpm包,可以把这个plugin注释掉-->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>rpm-maven-plugin</artifactId>
|
||||
<version>2.2.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-rpm</id>
|
||||
<goals>
|
||||
<goal>rpm</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
|
||||
<configuration>
|
||||
<group>Applications/Chat</group>
|
||||
<name>wildfirechat</name>
|
||||
<packager>Wildfirechat</packager>
|
||||
<needarch>noarch</needarch>
|
||||
<targetOS>linux</targetOS>
|
||||
<prefix>/usr/local/wildfirechat/im</prefix>
|
||||
<defineStatements>
|
||||
<defineStatement>_unpackaged_files_terminate_build 0</defineStatement>
|
||||
</defineStatements>
|
||||
<copyTo>
|
||||
target/wildfirechat-${project.version}.rpm
|
||||
</copyTo>
|
||||
<autoRequires>no</autoRequires>
|
||||
<autoProvides>no</autoProvides>
|
||||
<requires>
|
||||
<require>java-1.8.0-openjdk-headless</require>
|
||||
</requires>
|
||||
|
||||
<mappings>
|
||||
<mapping>
|
||||
<directory>/usr/local/wildfirechat/im</directory>
|
||||
<filemode>755</filemode>
|
||||
<sources>
|
||||
<source>
|
||||
<location>${project.build.directory}/distribution-${project.version}-bundle-tar.tar.gz</location>
|
||||
</source>
|
||||
</sources>
|
||||
</mapping>
|
||||
</mappings>
|
||||
<postinstallScriptlet>
|
||||
<script>
|
||||
echo "Unzip packages..." ; cd /usr/local/wildfirechat/im ; tar -xzvf distribution*.tar.gz ; echo "Wildfire im installed in /usr/local/wildfirechat/im"
|
||||
</script>
|
||||
</postinstallScriptlet>
|
||||
<postremoveScriptlet>
|
||||
<script>
|
||||
echo "Remove files..." ; cd /usr/local/wildfirechat/im ; rm -rf *
|
||||
</script>
|
||||
</postremoveScriptlet>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- 打包RPM 结束-->
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -6,4 +6,5 @@ Architecture: all
|
||||
Maintainer: Wildfirechat <[email protected]>
|
||||
Description: Wildfirechat IM Server
|
||||
Distribution: development
|
||||
Depends: openjdk-8-jre-headless
|
||||
Homepage: https://wildfirechat.cn
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
<!--monitorInterval="30" :间隔秒数,自动检测配置文件的变更和重新配置本身-->
|
||||
<configuration status="WARN" monitorInterval="60">
|
||||
<Properties>
|
||||
<!--自定义一些常量,之后使用${变量名}引用-->
|
||||
<!-- 日志路径-->
|
||||
<Property name="MSG_LOG_HOME">./logs</Property>
|
||||
<!-- <Property name="MSG_LOG_HOME">/var/log/wildfirechat/im/logs</Property>-->
|
||||
<property name="charset">UTF-8</property>
|
||||
<!--自定义的输出格式-->
|
||||
<property name="pattern">%d %-5p [%t] %C{2} (%F:%L) - %m%n</property>
|
||||
</Properties>
|
||||
<!--appenders:定义输出内容,输出格式,输出方式,日志保存策略等,常用其下三种标签[console,File,RollingFile]-->
|
||||
|
||||
Reference in New Issue
Block a user