blob: 94401630f612526bb483d20bba8287e8c9eacf78 [file] [log] [blame]
Carsten Ziegelerb61fe0e2008-01-03 09:24:12 +00001<!--
2 Licensed to the Apache Software Foundation (ASF) under one
3 or more contributor license agreements. See the NOTICE file
4 distributed with this work for additional information
5 regarding copyright ownership. The ASF licenses this file
6 to you under the Apache License, Version 2.0 (the
7 "License"); you may not use this file except in compliance
8 with the License. You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing,
13 software distributed under the License is distributed on an
14 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 KIND, either express or implied. See the License for the
16 specific language governing permissions and limitations
17 under the License.
18-->
Carsten Ziegeler4fec0962008-01-11 16:13:31 +000019<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">
Karl Pauls589e2b32007-07-11 18:29:29 +000020 <parent>
21 <groupId>org.apache.felix</groupId>
Felix Meschbergereda237f2009-04-27 13:12:37 +000022 <artifactId>felix-parent</artifactId>
23 <version>1.2.0</version>
Karl Pauls589e2b32007-07-11 18:29:29 +000024 <relativePath>../pom/pom.xml</relativePath>
25 </parent>
26 <modelVersion>4.0.0</modelVersion>
27 <packaging>bundle</packaging>
28 <name>Apache Felix Declarative Services</name>
29 <description>
30 Implementation of the Declarative Services specification 1.0
31 </description>
32 <artifactId>org.apache.felix.scr</artifactId>
Felix Meschberger13f732e2009-04-29 08:58:54 +000033 <version>1.0.9-SNAPSHOT</version>
Felix Meschbergera2eafef2009-04-29 08:46:06 +000034 <scm>
Felix Meschberger13f732e2009-04-29 08:58:54 +000035 <connection>scm:svn:https://svn.apache.org/repos/asf/felix/trunk/scr</connection>
36 <developerConnection>scm:svn:https://svn.apache.org/repos/asf/felix/trunk/scr</developerConnection>
37 <url>scm:svn:https://svn.apache.org/repos/asf/felix/trunk/scr</url>
Felix Meschbergera2eafef2009-04-29 08:46:06 +000038 </scm>
Felix Meschbergerc71d0e72009-10-12 07:16:08 +000039
40 <!--
41 A Note on Testing
42 =================
43
44 This project contains two kinds of tests: regular unit tests running
45 in the test phase and integration tests based on PAX Exam running
46 in the integration-test phase.
47
48 Basically the complete project is build using Java 1.3 source and target
49 compatibility (as inherited from the parent pom). The exception are the
50 unit tests in the "integration" packages. These have to be compiled with
51 Java 5 source and target compatibility because the employ annotations
52 and generics.
53
54 For running the integration tests from the console using Maven nothing
55 special has to be done as the tests run automatically. To run the tests
56 in your IDE, the project has to be built to the "package" phase with
57 the profile "ide" enabled:
58
59 $ mvn -Pide clean package
60
61 This creates the scr.jar file in the target folder, which is used by
62 the integration tests when run from the IDE. Alternatively the
63 "project.bundle.file" system property may be set to the bundle JAR
64 in the IDE launcher.
65 -->
66
Karl Pauls589e2b32007-07-11 18:29:29 +000067 <dependencies>
68 <dependency>
Felix Meschberger21a301e2009-10-07 08:38:18 +000069 <groupId>org.osgi</groupId>
Karl Pauls589e2b32007-07-11 18:29:29 +000070 <artifactId>org.osgi.core</artifactId>
Felix Meschberger21a301e2009-10-07 08:38:18 +000071 <version>4.1.0</version>
Felix Meschbergerc8dbf482009-10-11 08:18:18 +000072 <scope>provided</scope>
Karl Pauls589e2b32007-07-11 18:29:29 +000073 </dependency>
74 <dependency>
Felix Meschberger21a301e2009-10-07 08:38:18 +000075 <groupId>org.osgi</groupId>
Karl Pauls589e2b32007-07-11 18:29:29 +000076 <artifactId>org.osgi.compendium</artifactId>
Felix Meschberger21a301e2009-10-07 08:38:18 +000077 <version>4.2.0</version>
Felix Meschbergerc8dbf482009-10-11 08:18:18 +000078 <scope>provided</scope>
Karl Pauls589e2b32007-07-11 18:29:29 +000079 </dependency>
80 <dependency>
Felix Meschbergerd25a63d2007-11-23 13:02:49 +000081 <groupId>${pom.groupId}</groupId>
82 <artifactId>org.apache.felix.shell</artifactId>
83 <version>1.0.0</version>
Felix Meschbergerc8dbf482009-10-11 08:18:18 +000084 <scope>provided</scope>
Felix Meschbergerd25a63d2007-11-23 13:02:49 +000085 </dependency>
86 <dependency>
Karl Pauls589e2b32007-07-11 18:29:29 +000087 <groupId>net.sf.kxml</groupId>
88 <artifactId>kxml2</artifactId>
89 <version>2.2.2</version>
Felix Meschbergerc8dbf482009-10-11 08:18:18 +000090 <scope>provided</scope>
Karl Pauls589e2b32007-07-11 18:29:29 +000091 </dependency>
Felix Meschberger8c64e852009-07-28 13:48:28 +000092
93 <!-- Integration Testing with Pax Exam -->
94 <dependency>
95 <groupId>junit</groupId>
96 <artifactId>junit</artifactId>
97 <version>4.6</version>
Felix Meschbergerc8dbf482009-10-11 08:18:18 +000098 <scope>test</scope>
Felix Meschberger8c64e852009-07-28 13:48:28 +000099 </dependency>
100 <dependency>
101 <groupId>org.ops4j.pax.exam</groupId>
102 <artifactId>pax-exam</artifactId>
103 <version>0.6.0</version>
104 <scope>test</scope>
105 </dependency>
106 <dependency>
107 <groupId>org.ops4j.pax.exam</groupId>
108 <artifactId>pax-exam-junit</artifactId>
109 <version>0.6.0</version>
110 <scope>test</scope>
111 </dependency>
112 <dependency>
113 <groupId>org.ops4j.pax.exam</groupId>
114 <artifactId>pax-exam-container-default</artifactId>
115 <version>0.6.0</version>
116 <scope>test</scope>
117 </dependency>
118 <dependency>
119 <groupId>org.ops4j.pax.swissbox</groupId>
120 <artifactId>pax-swissbox-tinybundles</artifactId>
121 <version>1.0.0</version>
122 <scope>test</scope>
123 </dependency>
Karl Pauls589e2b32007-07-11 18:29:29 +0000124 </dependencies>
125 <build>
126 <plugins>
127 <plugin>
128 <groupId>org.apache.felix</groupId>
129 <artifactId>maven-bundle-plugin</artifactId>
Karl Pauls589e2b32007-07-11 18:29:29 +0000130 <extensions>true</extensions>
131 <configuration>
132 <instructions>
133 <Bundle-SymbolicName>
134 ${artifactId}
135 </Bundle-SymbolicName>
Carsten Ziegeler90f0b9f2008-04-17 06:33:59 +0000136 <Bundle-Vendor>The Apache Software Foundation</Bundle-Vendor>
Felix Meschberger0062b3c2009-10-11 12:25:14 +0000137 <Bundle-DocURL>
138 http://felix.apache.org/site/apache-felix-service-component-runtime.html
139 </Bundle-DocURL>
Karl Pauls589e2b32007-07-11 18:29:29 +0000140 <Bundle-Activator>
Felix Meschbergerd25a63d2007-11-23 13:02:49 +0000141 org.apache.felix.scr.impl.Activator
Karl Pauls589e2b32007-07-11 18:29:29 +0000142 </Bundle-Activator>
143 <Export-Package>
Felix Meschbergerd25a63d2007-11-23 13:02:49 +0000144 org.apache.felix.scr;version=${pom.version},
Felix Meschberger21a301e2009-10-07 08:38:18 +0000145 org.osgi.service.component
Karl Pauls589e2b32007-07-11 18:29:29 +0000146 </Export-Package>
147 <Private-Package>
Felix Meschberger9aaf7c42009-07-09 12:34:12 +0000148 org.apache.felix.scr.impl.*,
149 org.osgi.util.tracker
Karl Pauls589e2b32007-07-11 18:29:29 +0000150 </Private-Package>
Felix Meschbergerd25a63d2007-11-23 13:02:49 +0000151 <Import-Package>
Felix Meschberger21a301e2009-10-07 08:38:18 +0000152 <!--
153 The Felix Shell support is optional
154 -->
Felix Meschberger9aaf7c42009-07-09 12:34:12 +0000155 org.apache.felix.shell; resolution:=optional,
Felix Meschberger21a301e2009-10-07 08:38:18 +0000156
157 <!--
158 Framework version 1.3 (from R4.0) is enough,
159 the Bundle.getBundleContext method is guarded
160 -->
161 org.osgi.framework;version=1.3,
162
163 <!--
164 Configuration Admin is optional and if it is
165 present, version 1.2 (from R4.0) is enough
166 -->
167 org.osgi.service.cm;version=1.2;resolution:=optional
Felix Meschbergerd25a63d2007-11-23 13:02:49 +0000168 </Import-Package>
Karl Pauls589e2b32007-07-11 18:29:29 +0000169 <DynamicImport-Package>
170 org.osgi.service.log
171 </DynamicImport-Package>
Felix Meschberger9aaf7c42009-07-09 12:34:12 +0000172 <Embed-Dependency>
173 kxml2
174 </Embed-Dependency>
Karl Pauls589e2b32007-07-11 18:29:29 +0000175 </instructions>
176 </configuration>
177 </plugin>
Felix Meschberger8c64e852009-07-28 13:48:28 +0000178
179 <!--
180 configure default compilation for Java 1.3 and integration
181 test compilation for Java 5 (since integration tests use
182 Java Annotations for Pax Exam)
183 -->
184 <plugin>
185 <artifactId>maven-compiler-plugin</artifactId>
186 <executions>
187 <execution>
188 <id>test-compile-java5</id>
189 <goals>
190 <goal>testCompile</goal>
191 </goals>
192 <configuration>
193 <source>1.5</source>
194 <target>1.5</target>
195 <testIncludes>
196 <testInclude>**/integration/**</testInclude>
197 </testIncludes>
198 <testExcludes>
199 <testExclude>**/impl/**</testExclude>
200 </testExcludes>
201 </configuration>
202 </execution>
203 </executions>
204 <configuration>
205 <testExcludes>
206 <testExclude>**/integration/**</testExclude>
207 </testExcludes>
208 </configuration>
209 </plugin>
210
211 <!--
212 Exclude Integration tests in (default) unit tests and
213 conversely enable integration tests for integration testing
214 only. Helper classes are completely excluded from testing.
215 -->
216 <plugin>
217 <artifactId>maven-surefire-plugin</artifactId>
218 <executions>
219 <execution>
220 <id>surefire-it</id>
221 <phase>integration-test</phase>
222 <goals>
223 <goal>test</goal>
224 </goals>
225 <configuration>
Felix Meschbergerc71d0e72009-10-12 07:16:08 +0000226 <systemProperties>
227 <property>
228 <name>project.bundle.file</name>
229 <value>${project.build.directory}/${project.build.finalName}.jar</value>
230 </property>
231 </systemProperties>
Felix Meschberger8c64e852009-07-28 13:48:28 +0000232 <excludes>
233 <exclude>**/components/**</exclude>
234 </excludes>
235 <includes>
236 <include>**/integration/*</include>
237 </includes>
238 </configuration>
239 </execution>
240 </executions>
241 <configuration>
242 <excludes>
243 <exclude>**/integration/**</exclude>
244 <exclude>**/components/**</exclude>
245 <exclude>**/instances/**</exclude>
246 <exclude>**/instances2/**</exclude>
247 </excludes>
248 </configuration>
249 </plugin>
Karl Pauls589e2b32007-07-11 18:29:29 +0000250 </plugins>
251 </build>
Felix Meschbergerc71d0e72009-10-12 07:16:08 +0000252
253 <profiles>
254 <!--
255 copy the package such that IDEs may easily use it without
256 setting the system property
257 -->
258 <profile>
259 <id>ide</id>
260 <build>
261 <plugins>
262 <plugin>
263 <artifactId>maven-antrun-plugin</artifactId>
264 <version>1.3</version>
265 <executions>
266 <execution>
267 <id>scr-file-create</id>
268 <phase>package</phase>
269 <goals>
270 <goal>run</goal>
271 </goals>
272 <configuration>
273 <tasks>
274 <copy file="${project.build.directory}/${project.build.finalName}.jar"
275 tofile="${project.build.directory}/scr.jar" />
276 </tasks>
277 </configuration>
278 </execution>
279 </executions>
280 </plugin>
281 </plugins>
282 </build>
283 </profile>
284 </profiles>
285
Felix Meschberger8c64e852009-07-28 13:48:28 +0000286 <!-- repositories for Pax Exam and BND tool -->
287 <repositories>
288 <repository>
289 <id>ops4j</id>
290 <name>ops4j</name>
291 <url>http://repository.ops4j.org/maven2</url>
292 <snapshots>
293 <enabled>false</enabled>
294 </snapshots>
295 </repository>
296 <repository>
297 <id>aqute</id>
298 <name>aqute</name>
299 <url>http://www.aqute.biz/repo</url>
300 <snapshots>
301 <enabled>false</enabled>
302 </snapshots>
303 </repository>
304 </repositories>
Karl Pauls589e2b32007-07-11 18:29:29 +0000305</project>