blob: 4008c9b0b802015454b11b734518eba0c57691ae [file] [log] [blame]
Guillaume Nodeta446ec22010-02-03 12:23:27 +00001<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2 <!--
3
4 Licensed to the Apache Software Foundation (ASF) under one or more
5 contributor license agreements. See the NOTICE file distributed with
6 this work for additional information regarding copyright ownership.
7 The ASF licenses this file to You under the Apache License, Version 2.0
8 (the "License"); you may not use this file except in compliance with
9 the License. You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 -->
19 <modelVersion>4.0.0</modelVersion>
20
21 <parent>
22 <groupId>org.apache.felix.karaf.tooling</groupId>
23 <artifactId>tooling</artifactId>
24 <version>1.3.0-SNAPSHOT</version>
25 </parent>
26
27 <groupId>org.apache.felix.karaf.tooling</groupId>
28 <artifactId>org.apache.felix.karaf.tooling.testing</artifactId>
29 <packaging>bundle</packaging>
30 <version>1.3.0-SNAPSHOT</version>
31 <name>Apache Felix Karaf :: Testing environment</name>
32
33 <description>
34 A bundle to help using Pax-Exam and Karaf.
35 </description>
36
37 <properties>
38 <appendedResourcesDirectory>${basedir}/../../etc/appended-resources</appendedResourcesDirectory>
39 </properties>
40
41 <dependencies>
42 <!-- Pax EXAM -->
43 <dependency>
44 <groupId>org.ops4j.pax.exam</groupId>
45 <artifactId>pax-exam</artifactId>
46 </dependency>
47 <dependency>
48 <groupId>org.ops4j.pax.exam</groupId>
49 <artifactId>pax-exam-junit</artifactId>
50 </dependency>
51 <dependency>
52 <groupId>org.ops4j.pax.exam</groupId>
53 <artifactId>pax-exam-container-default</artifactId>
54 </dependency>
55 <dependency>
56 <groupId>org.ops4j.pax.exam</groupId>
57 <artifactId>pax-exam-junit-extender-impl</artifactId>
58 </dependency>
59 <dependency>
60 <groupId>junit</groupId>
61 <artifactId>junit</artifactId>
62 <version>4.5</version>
63 </dependency>
64 </dependencies>
65
66 <build>
67 <resources>
68 <resource>
69 <directory>${pom.basedir}/src/main/resources</directory>
70 <includes>
71 <include>**/*</include>
72 </includes>
73 </resource>
74 </resources>
75 <filters>
76 <filter>target/filter.txt</filter>
77 </filters>
78 <plugins>
79 <plugin>
80 <groupId>org.apache.maven.plugins</groupId>
81 <artifactId>maven-antrun-plugin</artifactId>
82 <executions>
83 <execution>
84 <id>create-prop</id>
85 <phase>initialize</phase>
86 <configuration>
87 <tasks>
88 <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="maven.plugin.classpath" />
89 <property name="ant.regexp.regexpimpl" value="org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp" />
90 <property name="mv" value="${project.version}" />
91 <echo message="Maven version: ${mv}" />
92 <propertyregex property="ov.p1" input="${mv}" regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" replace="\1" defaultValue="0" />
93 <propertyregex property="ov.p2" input="${mv}" regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" replace=".\2" defaultValue=".0" />
94 <propertyregex property="ov.p3" input="${mv}" regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" replace=".\3" defaultValue=".0" />
95 <propertyregex property="ov.p4" input="${mv}" regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" replace=".\4" defaultValue="" />
96 <propertyregex property="ov.p1a" input="${ov.p1}" regexp="(.+)" replace="\1" defaultValue="0" />
97 <propertyregex property="ov.p2a" input="${ov.p2}" regexp="(\..+)" replace="\1" defaultValue=".0" />
98 <propertyregex property="ov.p3a" input="${ov.p3}" regexp="(\..+)" replace="\1" defaultValue=".0" />
99 <propertyregex property="ov.p4a" input="${ov.p4}" regexp="(\..+)" replace="\1" defaultValue="" />
100 <property name="ov" value="${ov.p1a}${ov.p2a}${ov.p3a}${ov.p4a}" />
101 <echo message="OSGi version: ${ov}" />
102 <mkdir dir="target" />
103 <echo message="karaf.osgi.version = ${ov}" file="target/filter.txt" />
104 </tasks>
105 </configuration>
106 <goals>
107 <goal>run</goal>
108 </goals>
109 </execution>
110 </executions>
111 </plugin>
112 <plugin>
113 <groupId>org.apache.maven.plugins</groupId>
114 <artifactId>maven-resources-plugin</artifactId>
115 <executions>
116 <execution>
117 <id>copy-filtered</id>
118 <!-- here the phase you need -->
119 <phase>compile</phase>
120 <goals>
121 <goal>copy-resources</goal>
122 </goals>
123 <configuration>
124 <outputDirectory>${basedir}/target/classes/</outputDirectory>
125 <resources>
126 <resource>
127 <directory>../../assembly/src/main/filtered-resources/etc</directory>
128 <filtering>true</filtering>
129 <includes>
130 <include>config.properties</include>
131 <include>startup.properties</include>
132 </includes>
133 </resource>
134 </resources>
135 </configuration>
136 </execution>
137 </executions>
138 </plugin>
139 <!-- generate dependencies versions -->
140 <plugin>
141 <groupId>org.apache.servicemix.tooling</groupId>
142 <artifactId>depends-maven-plugin</artifactId>
143 <version>1.1</version>
144 <executions>
145 <execution>
146 <id>generate-depends-file</id>
147 <goals>
148 <goal>generate-depends-file</goal>
149 </goals>
150 </execution>
151 </executions>
152 </plugin>
153 <plugin>
154 <groupId>org.apache.felix</groupId>
155 <artifactId>maven-bundle-plugin</artifactId>
156 <configuration>
157 <instructions>
158 <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
159 <Export-Package>org.apache.felix.karaf.testing;version=${pom.version}</Export-Package>
160 <Import-Package>
161 !org.apache.felix.karaf.testing*,
162 *
163 </Import-Package>
164 <Include-Resource>
165 {maven-resources},
166 org/apache/felix/karaf/testing/config.properties=target/classes/config.properties,
167 org/apache/felix/karaf/testing/startup.properties=target/classes/startup.properties
168 </Include-Resource>
169 <_versionpolicy>${bnd.version.policy}</_versionpolicy>
170 </instructions>
171 </configuration>
172 </plugin>
173 </plugins>
174 </build>
175
176</project>