]> 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 <activation>
165 <os>
166 <name>Linux</name>
167 </os>
168 <file>
169 <exists>/usr/bin/rpmbuild</exists>
170 </file>
171 </activation>
172 <properties>
173 <package.version>${project.version}</package.version>
174 <distribution.label>argeo</distribution.label>
175 <distribution.root>/net/cash/srv/yumrepos/argeo-el/5/argeo-testing/</distribution.root>
176 </properties>
177 <build>
178 <plugins>
179 <plugin>
180 <groupId>org.codehaus.mojo</groupId>
181 <artifactId>rpm-maven-plugin</artifactId>
182 <extensions>true</extensions>
183 <configuration>
184 <version>${package.version}</version>
185 <release>r${buildNumber}.${distribution.label}</release>
186 <copyright>2010 Argeo</copyright>
187 <distribution>${distribution.label}</distribution>
188 <packager>mbaudier@argeo.org</packager>
189 <group>Applications/System</group>
190 <prefix>/usr</prefix>
191 </configuration>
192 <executions>
193 <execution>
194 <id>rpm-sdk</id>
195 <phase>package</phase>
196 <goals>
197 <goal>rpm</goal>
198 </goals>
199 <configuration>
200 <mappings>
201 <mapping>
202 <directory>/usr/bin</directory>
203 <username>root</username>
204 <groupname>root</groupname>
205 <filemode>755</filemode>
206 <directoryIncluded>false</directoryIncluded>
207 <sources>
208 <source>
209 <location>src/main/rpm/usr/bin</location>
210 <includes>
211 <include>*</include>
212 </includes>
213 </source>
214 </sources>
215 </mapping>
216 <mapping>
217 <directory>/etc/init.d</directory>
218 <username>root</username>
219 <groupname>root</groupname>
220 <filemode>755</filemode>
221 <directoryIncluded>false</directoryIncluded>
222 <sources>
223 <source>
224 <location>src/main/rpm/etc/init.d</location>
225 <includes>
226 <include>*</include>
227 </includes>
228 </source>
229 </sources>
230 </mapping>
231 <mapping>
232 <directory>/etc/slc-agent</directory>
233 <username>root</username>
234 <groupname>root</groupname>
235 <filemode>644</filemode>
236 <configuration>true</configuration>
237 <sources>
238 <source>
239 <location>src/main/rpm/etc/slc-agent</location>
240 <includes>
241 <include>*</include>
242 </includes>
243 </source>
244 </sources>
245 </mapping>
246 <mapping>
247 <directory>/etc/slc-server</directory>
248 <username>root</username>
249 <groupname>root</groupname>
250 <filemode>644</filemode>
251 <configuration>true</configuration>
252 <sources>
253 <source>
254 <location>src/main/rpm/etc/slc-server</location>
255 <includes>
256 <include>*</include>
257 </includes>
258 </source>
259 </sources>
260 </mapping>
261 <mapping>
262 <directory>/usr/share/osgi</directory>
263 <username>root</username>
264 <groupname>root</groupname>
265 <filemode>644</filemode>
266 <directoryIncluded>false</directoryIncluded>
267 <sources>
268 <source>
269 <location>target/lib</location>
270 <includes>
271 <include>*.jar</include>
272 </includes>
273 </source>
274 </sources>
275 </mapping>
276 </mappings>
277 <postinstallScriptlet>
278 <scriptFile>src/main/scripts/postinstall</scriptFile>
279 </postinstallScriptlet>
280 <preremoveScriptlet>
281 <scriptFile>src/main/scripts/preremove</scriptFile>
282 </preremoveScriptlet>
283 <requires>
284 <require>java</require>
285 </requires>
286 </configuration>
287 </execution>
288 <execution>
289 <id>rpm-devel</id>
290 <phase>package</phase>
291 <goals>
292 <goal>rpm</goal>
293 </goals>
294 <configuration>
295 <name>${project.artifactId}-pdesources</name>
296 <mappings>
297 <mapping>
298 <directory>/usr/src/osgi/pde</directory>
299 <username>root</username>
300 <groupname>root</groupname>
301 <filemode>644</filemode>
302 <directoryIncluded>false</directoryIncluded>
303 <sources>
304 <source>
305 <location>target/libsrc</location>
306 <includes>
307 <include>*.jar</include>
308 </includes>
309 </source>
310 </sources>
311 </mapping>
312 </mappings>
313 </configuration>
314 </execution>
315 <execution>
316 <id>rpm-demo</id>
317 <phase>package</phase>
318 <goals>
319 <goal>rpm</goal>
320 </goals>
321 <configuration>
322 <name>${project.artifactId}-demo</name>
323 <mappings>
324 <mapping>
325 <directory>/var/lib/slc-agent/modules</directory>
326 <username>root</username>
327 <groupname>root</groupname>
328 <filemode>644</filemode>
329 <directoryIncluded>false</directoryIncluded>
330 <configuration>true</configuration>
331 <sources>
332 <source>
333 <location>../../demo/site</location>
334 <includes>
335 <include>**</include>
336 </includes>
337 <excludes>
338 <exclude>*.pom.xml</exclude>
339 <exclude>.svn</exclude>
340 <exclude>**/.svn/**</exclude>
341 </excludes>
342 </source>
343 </sources>
344 </mapping>
345 </mappings>
346 </configuration>
347 </execution>
348 </executions>
349 </plugin>
350 <plugin>
351 <groupId>org.apache.maven.plugins</groupId>
352 <artifactId>maven-antrun-plugin</artifactId>
353 <executions>
354 <execution>
355 <id>rpm-copyToRepo</id>
356 <phase>install</phase>
357 <goals>
358 <goal>run</goal>
359 </goals>
360 <configuration>
361 <tasks>
362 <delete>
363 <fileset dir="${distribution.root}" includes="*/org.argeo.slc.sdk-*.rpm" />
364 </delete>
365 <copy todir="${distribution.root}/x86_64" verbose="true">
366 <fileset dir="target">
367 <include name="rpm/*/RPMS/*/*.rpm" />
368 </fileset>
369 <flattenmapper />
370 </copy>
371 <exec executable="/usr/bin/createrepo">
372 <arg value="${distribution.root}/x86_64" />
373 </exec>
374 <copy todir="${distribution.root}/i386" verbose="true">
375 <fileset dir="target">
376 <include name="rpm/*/RPMS/*/*.rpm" />
377 </fileset>
378 <flattenmapper />
379 </copy>
380 <exec executable="/usr/bin/createrepo">
381 <arg value="${distribution.root}/i386" />
382 </exec>
383 </tasks>
384 </configuration>
385 </execution>
386 </executions>
387 </plugin>
388 </plugins>
389 </build>
390
391 </profile>
392 </profiles>
393 </project>