添加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>
|
||||
|
||||
Reference in New Issue
Block a user