]> git.argeo.org Git - gpl/argeo-slc.git/blob - dist/slc/pom.xml
Improve Maven and RPM Structure
[gpl/argeo-slc.git] / dist / slc / pom.xml
1 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3 <modelVersion>4.0.0</modelVersion>
4 <parent>
5 <groupId>org.argeo.slc</groupId>
6 <artifactId>dist</artifactId>
7 <version>0.13.1-SNAPSHOT</version>
8 </parent>
9 <groupId>org.argeo.slc.dist</groupId>
10 <artifactId>slc</artifactId>
11 <packaging>pom</packaging>
12 <name>SLC Node (RPM)</name>
13 <build>
14 <plugins>
15 <plugin>
16 <artifactId>maven-resources-plugin</artifactId>
17 <executions>
18 <execution>
19 <id>filter-base</id>
20 <phase>process-resources</phase>
21 <goals>
22 <goal>copy-resources</goal>
23 </goals>
24 <configuration>
25 <outputDirectory>${basedir}/target/base</outputDirectory>
26 <resources>
27 <resource>
28 <directory>src/main/base</directory>
29 <filtering>true</filtering>
30 </resource>
31 </resources>
32 </configuration>
33 </execution>
34 </executions>
35 </plugin>
36 </plugins>
37 </build>
38 <profiles>
39 <profile>
40 <id>rpmbuild</id>
41 <build>
42 <plugins>
43 <plugin>
44 <groupId>org.codehaus.mojo</groupId>
45 <artifactId>rpm-maven-plugin</artifactId>
46 <executions>
47 <execution>
48 <id>rpm-slc</id>
49 <phase>package</phase>
50 <goals>
51 <goal>rpm</goal>
52 </goals>
53 <configuration>
54 <name>slc</name>
55 <copyright>2011 Argeo</copyright>
56 <mappings>
57 <mapping>
58 <directory>/usr/bin</directory>
59 <username>root</username>
60 <groupname>root</groupname>
61 <filemode>755</filemode>
62 <directoryIncluded>false</directoryIncluded>
63 <sources>
64 <source>
65 <location>src/main/rpm/usr/bin</location>
66 </source>
67 </sources>
68 </mapping>
69 <mapping>
70 <directory>/etc/init.d</directory>
71 <username>root</username>
72 <groupname>root</groupname>
73 <filemode>755</filemode>
74 <directoryIncluded>false</directoryIncluded>
75 <sources>
76 <source>
77 <location>src/main/rpm/etc/init.d</location>
78 </source>
79 </sources>
80 </mapping>
81 <mapping>
82 <directory>/etc/slc</directory>
83 <username>root</username>
84 <groupname>slc</groupname>
85 <filemode>640</filemode>
86 <configuration>noreplace</configuration>
87 <directoryIncluded>false</directoryIncluded>
88 <sources>
89 <source>
90 <location>src/main/rpm/etc/slc</location>
91 </source>
92 </sources>
93 </mapping>
94 <mapping>
95 <directory>/etc/slc-cl</directory>
96 <username>root</username>
97 <groupname>root</groupname>
98 <filemode>644</filemode>
99 <directoryIncluded>false</directoryIncluded>
100 <sources>
101 <source>
102 <location>src/main/rpm/etc/slc-cl</location>
103 </source>
104 </sources>
105 </mapping>
106 </mappings>
107 <preinstallScriptlet>
108 <scriptFile>src/main/scripts/preinstall</scriptFile>
109 </preinstallScriptlet>
110 <postinstallScriptlet>
111 <scriptFile>src/main/scripts/postinstall</scriptFile>
112 </postinstallScriptlet>
113 <preremoveScriptlet>
114 <scriptFile>src/main/scripts/preremove</scriptFile>
115 </preremoveScriptlet>
116 <requires>
117 <require>slc-libs</require>
118 <require>osgi-boot</require>
119 <require>java-1.6.0-openjdk</require>
120 </requires>
121 </configuration>
122 </execution>
123 </executions>
124 </plugin>
125 <plugin>
126 <artifactId>maven-antrun-plugin</artifactId>
127 <executions>
128 <execution>
129 <phase>install</phase>
130 <goals>
131 <goal>run</goal>
132 </goals>
133 <configuration>
134 <target>
135 <copy todir="${rpm.stagingRepository}" verbose="true">
136 <fileset dir="${project.build.directory}/rpm"
137 includes="*/RPMS/**/*.rpm" />
138 <flattenmapper />
139 </copy>
140 </target>
141 </configuration>
142 </execution>
143 </executions>
144 </plugin>
145 </plugins>
146 </build>
147 </profile>
148 </profiles>
149 </project>