fix deb to properly copy over sigar

This commit is contained in:
Shay Banon 2011-12-08 13:40:09 +02:00
parent 6d0b94b81b
commit 16c2c6b2c3
2 changed files with 44 additions and 29 deletions

69
pom.xml
View File

@ -399,21 +399,21 @@
<plugin> <plugin>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<configuration> <configuration>
<outputDirectory>${project.build.directory}/releases/</outputDirectory> <outputDirectory>${project.build.directory}/releases/</outputDirectory>
<descriptors> <descriptors>
<descriptor>${basedir}/src/main/assemblies/targz-bin.xml</descriptor> <descriptor>${basedir}/src/main/assemblies/targz-bin.xml</descriptor>
<descriptor>${basedir}/src/main/assemblies/zip-bin.xml</descriptor> <descriptor>${basedir}/src/main/assemblies/zip-bin.xml</descriptor>
</descriptors> </descriptors>
</configuration> </configuration>
<executions> <executions>
<execution> <execution>
<phase>package</phase> <phase>package</phase>
<goals> <goals>
<goal>single</goal> <goal>single</goal>
</goals> </goals>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<artifactId>maven-dependency-plugin</artifactId> <artifactId>maven-dependency-plugin</artifactId>
<executions> <executions>
@ -424,19 +424,19 @@
</goals> </goals>
<configuration> <configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory> <outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<!-- some infos https://github.com/tcurdt/jdeb/blob/master/docs/maven.md <!-- some infos https://github.com/tcurdt/jdeb/blob/master/docs/maven.md
--> -->
<artifactId>jdeb</artifactId> <artifactId>jdeb</artifactId>
<groupId>org.vafer</groupId> <groupId>org.vafer</groupId>
<version>0.8</version> <version>0.8</version>
<configuration> <configuration>
<deb>${project.build.directory}/releases/${artifactId}-${version}.deb</deb> <deb>${project.build.directory}/releases/${project.artifactId}-${project.version}.deb</deb>
</configuration> </configuration>
<executions> <executions>
<execution> <execution>
<phase>package</phase> <phase>package</phase>
@ -444,33 +444,33 @@
<goal>jdeb</goal> <goal>jdeb</goal>
</goals> </goals>
<configuration> <configuration>
<dataSet> <dataSet>
<data> <data>
<src>${project.basedir}/</src> <src>${project.basedir}/</src>
<includes>*.txt, *.textile</includes> <includes>*.txt, *.textile</includes>
<type>directory</type> <type>directory</type>
<mapper> <mapper>
<type>perm</type> <type>perm</type>
<prefix>/usr/share/elasticsearch</prefix> <prefix>/usr/share/elasticsearch</prefix>
<user>root</user> <user>root</user>
<group>root</group> <group>root</group>
</mapper> </mapper>
</data> </data>
<data> <data>
<src>${project.basedir}/bin</src> <src>${project.basedir}/bin</src>
<type>directory</type> <type>directory</type>
<excludes>*.bat</excludes> <excludes>*.bat</excludes>
<mapper> <mapper>
<type>perm</type> <type>perm</type>
<prefix>/usr/share/elasticsearch/bin</prefix> <prefix>/usr/share/elasticsearch/bin</prefix>
<filemode>755</filemode> <filemode>755</filemode>
<user>root</user> <user>root</user>
<group>root</group> <group>root</group>
</mapper> </mapper>
</data> </data>
<data> <data>
<src>${project.build.directory}/</src> <src>${project.build.directory}/</src>
<includes>${project.build.finalName}.jar, ${project.basedir}/lib/sigar/*</includes> <includes>${project.build.finalName}.jar</includes>
<type>directory</type> <type>directory</type>
<mapper> <mapper>
<type>perm</type> <type>perm</type>
@ -478,9 +478,20 @@
<user>root</user> <user>root</user>
<group>root</group> <group>root</group>
</mapper> </mapper>
</data> </data>
<data> <data>
<src>${project.build.directory}/lib</src> <src>${project.basedir}/lib/sigar/</src>
<includes>sigar-*.jar, libsigar-*-linux.*</includes>
<type>directory</type>
<mapper>
<type>perm</type>
<prefix>/usr/share/elasticsearch/lib/sigar</prefix>
<user>root</user>
<group>root</group>
</mapper>
</data>
<data>
<src>${project.build.directory}/lib</src>
<includes>lucene*, log4j*, jline*, jna*</includes> <includes>lucene*, log4j*, jline*, jna*</includes>
<type>directory</type> <type>directory</type>
<mapper> <mapper>
@ -490,17 +501,17 @@
<group>root</group> <group>root</group>
</mapper> </mapper>
</data> </data>
<data> <data>
<src>${project.basedir}/src/deb/default/</src> <src>${project.basedir}/src/deb/default/</src>
<type>directory</type> <type>directory</type>
<mapper> <mapper>
<type>perm</type> <type>perm</type>
<prefix>/etc/default</prefix> <prefix>/etc/default</prefix>
<user>root</user> <user>root</user>
<group>root</group> <group>root</group>
</mapper> </mapper>
</data> </data>
<data> <data>
<src>${project.basedir}/src/deb/init.d/</src> <src>${project.basedir}/src/deb/init.d/</src>
<type>directory</type> <type>directory</type>
<mapper> <mapper>
@ -511,22 +522,22 @@
<group>root</group> <group>root</group>
</mapper> </mapper>
</data> </data>
<data> <data>
<src>${project.basedir}/config</src> <src>${project.basedir}/config</src>
<type>directory</type> <type>directory</type>
<mapper> <mapper>
<type>perm</type> <type>perm</type>
<prefix>/etc/elasticsearch</prefix> <prefix>/etc/elasticsearch</prefix>
<user>root</user> <user>root</user>
<group>root</group> <group>root</group>
</mapper> </mapper>
</data> </data>
</dataSet> </dataSet>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
</project> </project>

View File

@ -28,6 +28,10 @@
</fileSet> </fileSet>
</fileSets> </fileSets>
<files> <files>
<file>
<source>README.textile</source>
<outputDirectory>/</outputDirectory>
</file>
<file> <file>
<source>LICENSE.txt</source> <source>LICENSE.txt</source>
<outputDirectory>/</outputDirectory> <outputDirectory>/</outputDirectory>