]> git.argeo.org Git - gpl/argeo-slc.git/blob - dist/org.argeo.slc.sdk/pom.xml
Introduce SLC SDK RPMs
[gpl/argeo-slc.git] / dist / org.argeo.slc.sdk / 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.12.2-SNAPSHOT</version>
8 </parent>
9 <groupId>org.argeo.slc.dist</groupId>
10 <artifactId>org.argeo.slc.sdk</artifactId>
11 <packaging>jar</packaging>
12 <name>SLC SDK</name>
13 <properties>
14 <argeo.p2.cmd>/opt/equinox-p2-agent/eclipse</argeo.p2.cmd>
15 <argeo.p2.repository>/var/argeo/projects/SLC/www/sdk-dev</argeo.p2.repository>
16 </properties>
17 <build>
18 <plugins>
19 <plugin>
20 <groupId>org.apache.maven.plugins</groupId>
21 <artifactId>maven-dependency-plugin</artifactId>
22 <executions>
23 <execution>
24 <id>copy-dependencies</id>
25 <phase>process-resources</phase>
26 <goals>
27 <goal>copy-dependencies</goal>
28 </goals>
29 <configuration>
30 <includeTypes>jar</includeTypes>
31 <outputDirectory>${project.build.directory}/lib</outputDirectory>
32 </configuration>
33 </execution>
34 </executions>
35 </plugin>
36 <plugin>
37 <groupId>org.argeo.maven.plugins</groupId>
38 <artifactId>maven-argeo-osgi-plugin</artifactId>
39 <version>${version.maven-argeo-osgi}</version>
40 <executions>
41 <execution>
42 <id>pde-source</id>
43 <phase>process-resources</phase>
44 <goals>
45 <goal>pde-sources</goal>
46 </goals>
47 <configuration>
48 </configuration>
49 </execution>
50 <execution>
51 <id>check-osgi</id>
52 <phase>test</phase>
53 <goals>
54 <goal>equinox</goal>
55 </goals>
56 <configuration>
57 <useDependencies>false</useDependencies>
58 <onlyCheck>true</onlyCheck>
59 <argsToAppend>
60 <arg>-clean</arg>
61 </argsToAppend>
62 <systemProperties>
63 <!-- Make sure that no bundle will be started -->
64 <argeo.osgi.start>XXX</argeo.osgi.start>
65 <argeo.osgi.bundles>
66 ${project.build.directory}/lib;in=*.jar,
67 </argeo.osgi.bundles>
68 </systemProperties>
69 </configuration>
70 </execution>
71 </executions>
72 </plugin>
73 <plugin>
74 <artifactId>maven-resources-plugin</artifactId>
75 <executions>
76 <execution>
77 <id>filter-base</id>
78 <phase>process-resources</phase>
79 <goals>
80 <goal>copy-resources</goal>
81 </goals>
82 <configuration>
83 <outputDirectory>${basedir}/target/base</outputDirectory>
84 <resources>
85 <resource>
86 <directory>src/main/base</directory>
87 <filtering>true</filtering>
88 </resource>
89 </resources>
90 </configuration>
91 </execution>
92 </executions>
93 </plugin>
94 <plugin>
95 <groupId>org.apache.maven.plugins</groupId>
96 <artifactId>maven-assembly-plugin</artifactId>
97 <configuration>
98 <descriptors>
99 <descriptor>src/assembly/dist.xml</descriptor>
100 <descriptor>src/assembly/devel.xml</descriptor>
101 </descriptors>
102 </configuration>
103 <executions>
104 <execution>
105 <id>attach-assembly</id>
106 <phase>package</phase>
107 <goals>
108 <goal>single</goal>
109 </goals>
110 </execution>
111 </executions>
112 </plugin>
113 <plugin>
114 <groupId>org.codehaus.mojo</groupId>
115 <artifactId>exec-maven-plugin</artifactId>
116 <version>1.1</version>
117 <executions>
118 <execution>
119 <id>create-repository</id>
120 <phase>deploy</phase>
121 <goals>
122 <goal>exec</goal>
123 </goals>
124 </execution>
125 </executions>
126 <configuration>
127 <executable>${argeo.p2.cmd}</executable>
128 <!-- optional -->
129 <workingDirectory>/tmp</workingDirectory>
130 <arguments>
131 <argument>-noSplash</argument>
132 <argument>-application</argument>
133 <argument>org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher</argument>
134 <argument>-metadataRepository</argument>
135 <argument>file:${argeo.p2.repository}</argument>
136 <argument>-artifactRepository</argument>
137 <argument>file:${argeo.p2.repository}</argument>
138 <argument>-bundles</argument>
139 <argument>${project.build.directory}</argument>
140 <argument>-features</argument>
141 <argument>${project.build.directory}</argument>
142 <argument>-compress</argument>
143 <argument>-publishArtifacts</argument>
144 </arguments>
145 </configuration>
146 </plugin>
147 </plugins>
148 </build>
149 <dependencies>
150 <dependency>
151 <groupId>org.argeo.slc.dep</groupId>
152 <artifactId>org.argeo.slc.dep.server</artifactId>
153 <version>${project.version}</version>
154 </dependency>
155 <dependency>
156 <groupId>org.argeo.slc.dep</groupId>
157 <artifactId>org.argeo.slc.dep.sdk</artifactId>
158 <version>${project.version}</version>
159 </dependency>
160 </dependencies>
161 <profiles>
162 <profile>
163 <id>rpmbuild</id>
164 <!--
165 <activation> <os> <name>Linux</name> </os> <file>
166 <exists>/usr/bin/rpmbuild</exists> </file> </activation>
167 -->
168 <properties>
169 <package.version>${project.version}</package.version>
170 <distribution.label>argeo</distribution.label>
171 <distribution.root>/net/cash/srv/yumrepos/argeo-el/5/argeo-testing/</distribution.root>
172 </properties>
173 <build>
174 <plugins>
175 <plugin>
176 <groupId>org.codehaus.mojo</groupId>
177 <artifactId>rpm-maven-plugin</artifactId>
178 <extensions>true</extensions>
179 <configuration>
180 <version>${package.version}</version>
181 <release>r${buildNumber}.${distribution.label}</release>
182 <copyright>2010 Argeo</copyright>
183 <distribution>${distribution.label}</distribution>
184 <packager>mbaudier@argeo.org</packager>
185 <group>Applications/System</group>
186 <prefix>/usr</prefix>
187 </configuration>
188 <executions>
189 <execution>
190 <id>rpm-sdk</id>
191 <phase>package</phase>
192 <goals>
193 <goal>rpm</goal>
194 </goals>
195 <configuration>
196 <mappings>
197 <mapping>
198 <directory>/usr/bin</directory>
199 <username>root</username>
200 <groupname>root</groupname>
201 <filemode>755</filemode>
202 <directoryIncluded>false</directoryIncluded>
203 <sources>
204 <source>
205 <location>src/main/rpm/usr/bin</location>
206 <includes>
207 <include>*</include>
208 </includes>
209 </source>
210 </sources>
211 </mapping>
212 <mapping>
213 <directory>/etc/init.d</directory>
214 <username>root</username>
215 <groupname>root</groupname>
216 <filemode>755</filemode>
217 <directoryIncluded>false</directoryIncluded>
218 <sources>
219 <source>
220 <location>src/main/rpm/etc/init.d</location>
221 <includes>
222 <include>*</include>
223 </includes>
224 </source>
225 </sources>
226 </mapping>
227 <mapping>
228 <directory>/etc/slc-agent</directory>
229 <username>root</username>
230 <groupname>root</groupname>
231 <filemode>644</filemode>
232 <configuration>true</configuration>
233 <sources>
234 <source>
235 <location>src/main/rpm/etc/slc-agent</location>
236 <includes>
237 <include>*</include>
238 </includes>
239 </source>
240 </sources>
241 </mapping>
242 <mapping>
243 <directory>/etc/slc-server</directory>
244 <username>root</username>
245 <groupname>root</groupname>
246 <filemode>644</filemode>
247 <configuration>true</configuration>
248 <sources>
249 <source>
250 <location>src/main/rpm/etc/slc-server</location>
251 <includes>
252 <include>*</include>
253 </includes>
254 </source>
255 </sources>
256 </mapping>
257 <mapping>
258 <directory>/usr/share/osgi</directory>
259 <username>root</username>
260 <groupname>root</groupname>
261 <filemode>644</filemode>
262 <directoryIncluded>false</directoryIncluded>
263 <sources>
264 <source>
265 <location>target/lib</location>
266 <includes>
267 <include>*.jar</include>
268 </includes>
269 </source>
270 </sources>
271 </mapping>
272 </mappings>
273 <postinstallScriptlet>
274 <scriptFile>src/main/scripts/postinstall</scriptFile>
275 </postinstallScriptlet>
276 <preremoveScriptlet>
277 <scriptFile>src/main/scripts/preremove</scriptFile>
278 </preremoveScriptlet>
279 <requires>
280 <require>java</require>
281 <!-- For the start/stop scripts -->
282 <require>expect</require>
283 </requires>
284 </configuration>
285 </execution>
286 <execution>
287 <id>rpm-devel</id>
288 <phase>package</phase>
289 <goals>
290 <goal>rpm</goal>
291 </goals>
292 <configuration>
293 <name>${project.artifactId}-pdesources</name>
294 <mappings>
295 <mapping>
296 <directory>/usr/src/osgi/pde</directory>
297 <username>root</username>
298 <groupname>root</groupname>
299 <filemode>644</filemode>
300 <directoryIncluded>false</directoryIncluded>
301 <sources>
302 <source>
303 <location>target/libsrc</location>
304 <includes>
305 <include>*.jar</include>
306 </includes>
307 </source>
308 </sources>
309 </mapping>
310 </mappings>
311 <requires>
312 <require>org.argeo.slc.sdk</require>
313 </requires>
314 </configuration>
315 </execution>
316 <execution>
317 <id>rpm-demo</id>
318 <phase>package</phase>
319 <goals>
320 <goal>rpm</goal>
321 </goals>
322 <configuration>
323 <name>${project.artifactId}-demo</name>
324 <mappings>
325 <mapping>
326 <directory>/var/lib/slc-agent/modules</directory>
327 <username>root</username>
328 <groupname>root</groupname>
329 <filemode>644</filemode>
330 <directoryIncluded>false</directoryIncluded>
331 <configuration>true</configuration>
332 <sources>
333 <source>
334 <location>../../demo/site</location>
335 <includes>
336 <include>**</include>
337 </includes>
338 <excludes>
339 <exclude>*.pom.xml</exclude>
340 <exclude>.svn</exclude>
341 <exclude>**/.svn/**</exclude>
342 </excludes>
343 </source>
344 </sources>
345 </mapping>
346 </mappings>
347 <requires>
348 <require>org.argeo.slc.sdk</require>
349 </requires>
350 </configuration>
351 </execution>
352 </executions>
353 </plugin>
354 <plugin>
355 <groupId>org.apache.maven.plugins</groupId>
356 <artifactId>maven-antrun-plugin</artifactId>
357 <executions>
358 <execution>
359 <id>rpm-copyToRepo</id>
360 <phase>install</phase>
361 <goals>
362 <goal>run</goal>
363 </goals>
364 <configuration>
365 <tasks>
366 <delete verbose="true">
367 <fileset dir="${distribution.root}" includes="*/org.argeo.slc.sdk-*.rpm" />
368 </delete>
369 <copy todir="${distribution.root}/x86_64" verbose="true">
370 <fileset dir="target">
371 <include name="rpm/*/RPMS/*/*.rpm" />
372 </fileset>
373 <flattenmapper />
374 </copy>
375 <exec executable="/usr/bin/createrepo">
376 <arg value="${distribution.root}/x86_64" />
377 </exec>
378 <copy todir="${distribution.root}/i386" verbose="true">
379 <fileset dir="target">
380 <include name="rpm/*/RPMS/*/*.rpm" />
381 </fileset>
382 <flattenmapper />
383 </copy>
384 <exec executable="/usr/bin/createrepo">
385 <arg value="${distribution.root}/i386" />
386 </exec>
387 </tasks>
388 </configuration>
389 </execution>
390 </executions>
391 </plugin>
392 </plugins>
393 </build>
394
395 </profile>
396 </profiles>
397 </project>