blob: 92e0feaceff514c8810ead3b2800710eceaea44d [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 Meschbergera4ad70a2009-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 Meschbergerc9f07c32009-04-29 08:58:54 +000033 <version>1.0.9-SNAPSHOT</version>
Felix Meschberger4753fcb2009-04-29 08:46:06 +000034 <scm>
Felix Meschbergerc9f07c32009-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 Meschberger4753fcb2009-04-29 08:46:06 +000038 </scm>
Felix Meschberger55e3b972009-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 -->
Felix Meschbergerc17fdbd2009-10-12 07:25:39 +000066 <properties>
67 <project.bundle.file>
68 ${project.build.directory}/${project.build.finalName}.jar
69 </project.bundle.file>
70 </properties>
71
Felix Meschberger55e3b972009-10-12 07:16:08 +000072
Karl Pauls589e2b32007-07-11 18:29:29 +000073 <dependencies>
74 <dependency>
Felix Meschbergerca797922009-10-07 08:38:18 +000075 <groupId>org.osgi</groupId>
Karl Pauls589e2b32007-07-11 18:29:29 +000076 <artifactId>org.osgi.core</artifactId>
Felix Meschbergerca797922009-10-07 08:38:18 +000077 <version>4.1.0</version>
Felix Meschbergerbbd1e9d2009-10-11 08:18:18 +000078 <scope>provided</scope>
Karl Pauls589e2b32007-07-11 18:29:29 +000079 </dependency>
80 <dependency>
Felix Meschbergerca797922009-10-07 08:38:18 +000081 <groupId>org.osgi</groupId>
Karl Pauls589e2b32007-07-11 18:29:29 +000082 <artifactId>org.osgi.compendium</artifactId>
Felix Meschbergerca797922009-10-07 08:38:18 +000083 <version>4.2.0</version>
Felix Meschbergerbbd1e9d2009-10-11 08:18:18 +000084 <scope>provided</scope>
Karl Pauls589e2b32007-07-11 18:29:29 +000085 </dependency>
86 <dependency>
Felix Meschbergerd25a63d2007-11-23 13:02:49 +000087 <groupId>${pom.groupId}</groupId>
88 <artifactId>org.apache.felix.shell</artifactId>
89 <version>1.0.0</version>
Felix Meschbergerbbd1e9d2009-10-11 08:18:18 +000090 <scope>provided</scope>
Felix Meschbergerd25a63d2007-11-23 13:02:49 +000091 </dependency>
92 <dependency>
Karl Pauls589e2b32007-07-11 18:29:29 +000093 <groupId>net.sf.kxml</groupId>
94 <artifactId>kxml2</artifactId>
95 <version>2.2.2</version>
Felix Meschbergerbbd1e9d2009-10-11 08:18:18 +000096 <scope>provided</scope>
Karl Pauls589e2b32007-07-11 18:29:29 +000097 </dependency>
Felix Meschberger47eb0372009-07-28 13:48:28 +000098
99 <!-- Integration Testing with Pax Exam -->
100 <dependency>
101 <groupId>junit</groupId>
102 <artifactId>junit</artifactId>
103 <version>4.6</version>
Felix Meschbergerbbd1e9d2009-10-11 08:18:18 +0000104 <scope>test</scope>
Felix Meschberger47eb0372009-07-28 13:48:28 +0000105 </dependency>
106 <dependency>
107 <groupId>org.ops4j.pax.exam</groupId>
108 <artifactId>pax-exam</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-junit</artifactId>
115 <version>0.6.0</version>
116 <scope>test</scope>
117 </dependency>
118 <dependency>
119 <groupId>org.ops4j.pax.exam</groupId>
120 <artifactId>pax-exam-container-default</artifactId>
121 <version>0.6.0</version>
122 <scope>test</scope>
123 </dependency>
124 <dependency>
125 <groupId>org.ops4j.pax.swissbox</groupId>
126 <artifactId>pax-swissbox-tinybundles</artifactId>
127 <version>1.0.0</version>
128 <scope>test</scope>
129 </dependency>
Karl Pauls589e2b32007-07-11 18:29:29 +0000130 </dependencies>
131 <build>
132 <plugins>
133 <plugin>
134 <groupId>org.apache.felix</groupId>
135 <artifactId>maven-bundle-plugin</artifactId>
Karl Pauls589e2b32007-07-11 18:29:29 +0000136 <extensions>true</extensions>
137 <configuration>
138 <instructions>
139 <Bundle-SymbolicName>
140 ${artifactId}
141 </Bundle-SymbolicName>
Carsten Ziegelercf6e51b2008-04-17 06:33:59 +0000142 <Bundle-Vendor>The Apache Software Foundation</Bundle-Vendor>
Felix Meschberger40d3e602009-10-11 12:25:14 +0000143 <Bundle-DocURL>
144 http://felix.apache.org/site/apache-felix-service-component-runtime.html
145 </Bundle-DocURL>
Karl Pauls589e2b32007-07-11 18:29:29 +0000146 <Bundle-Activator>
Felix Meschbergerd25a63d2007-11-23 13:02:49 +0000147 org.apache.felix.scr.impl.Activator
Karl Pauls589e2b32007-07-11 18:29:29 +0000148 </Bundle-Activator>
149 <Export-Package>
Felix Meschbergerd25a63d2007-11-23 13:02:49 +0000150 org.apache.felix.scr;version=${pom.version},
Felix Meschbergerca797922009-10-07 08:38:18 +0000151 org.osgi.service.component
Karl Pauls589e2b32007-07-11 18:29:29 +0000152 </Export-Package>
153 <Private-Package>
Felix Meschberger9b4e0232009-07-09 12:34:12 +0000154 org.apache.felix.scr.impl.*,
155 org.osgi.util.tracker
Karl Pauls589e2b32007-07-11 18:29:29 +0000156 </Private-Package>
Felix Meschbergerd25a63d2007-11-23 13:02:49 +0000157 <Import-Package>
Felix Meschbergerca797922009-10-07 08:38:18 +0000158 <!--
159 The Felix Shell support is optional
160 -->
Felix Meschberger9b4e0232009-07-09 12:34:12 +0000161 org.apache.felix.shell; resolution:=optional,
Felix Meschbergerca797922009-10-07 08:38:18 +0000162
163 <!--
164 Framework version 1.3 (from R4.0) is enough,
165 the Bundle.getBundleContext method is guarded
166 -->
167 org.osgi.framework;version=1.3,
168
169 <!--
170 Configuration Admin is optional and if it is
171 present, version 1.2 (from R4.0) is enough
172 -->
173 org.osgi.service.cm;version=1.2;resolution:=optional
Felix Meschbergerd25a63d2007-11-23 13:02:49 +0000174 </Import-Package>
Karl Pauls589e2b32007-07-11 18:29:29 +0000175 <DynamicImport-Package>
176 org.osgi.service.log
177 </DynamicImport-Package>
Felix Meschberger9b4e0232009-07-09 12:34:12 +0000178 <Embed-Dependency>
179 kxml2
180 </Embed-Dependency>
Karl Pauls589e2b32007-07-11 18:29:29 +0000181 </instructions>
182 </configuration>
183 </plugin>
Felix Meschberger47eb0372009-07-28 13:48:28 +0000184
185 <!--
186 configure default compilation for Java 1.3 and integration
187 test compilation for Java 5 (since integration tests use
188 Java Annotations for Pax Exam)
189 -->
190 <plugin>
191 <artifactId>maven-compiler-plugin</artifactId>
192 <executions>
193 <execution>
194 <id>test-compile-java5</id>
195 <goals>
196 <goal>testCompile</goal>
197 </goals>
198 <configuration>
199 <source>1.5</source>
200 <target>1.5</target>
201 <testIncludes>
202 <testInclude>**/integration/**</testInclude>
203 </testIncludes>
204 <testExcludes>
205 <testExclude>**/impl/**</testExclude>
206 </testExcludes>
207 </configuration>
208 </execution>
209 </executions>
210 <configuration>
211 <testExcludes>
212 <testExclude>**/integration/**</testExclude>
213 </testExcludes>
214 </configuration>
215 </plugin>
216
217 <!--
218 Exclude Integration tests in (default) unit tests and
219 conversely enable integration tests for integration testing
220 only. Helper classes are completely excluded from testing.
221 -->
222 <plugin>
223 <artifactId>maven-surefire-plugin</artifactId>
224 <executions>
225 <execution>
226 <id>surefire-it</id>
227 <phase>integration-test</phase>
228 <goals>
229 <goal>test</goal>
230 </goals>
231 <configuration>
Felix Meschberger55e3b972009-10-12 07:16:08 +0000232 <systemProperties>
233 <property>
234 <name>project.bundle.file</name>
Felix Meschbergerc17fdbd2009-10-12 07:25:39 +0000235 <value>${project.bundle.file}</value>
Felix Meschberger55e3b972009-10-12 07:16:08 +0000236 </property>
237 </systemProperties>
Felix Meschberger47eb0372009-07-28 13:48:28 +0000238 <excludes>
239 <exclude>**/components/**</exclude>
240 </excludes>
241 <includes>
242 <include>**/integration/*</include>
243 </includes>
244 </configuration>
245 </execution>
246 </executions>
247 <configuration>
248 <excludes>
249 <exclude>**/integration/**</exclude>
250 <exclude>**/components/**</exclude>
251 <exclude>**/instances/**</exclude>
252 <exclude>**/instances2/**</exclude>
253 </excludes>
254 </configuration>
255 </plugin>
Karl Pauls589e2b32007-07-11 18:29:29 +0000256 </plugins>
257 </build>
Felix Meschberger55e3b972009-10-12 07:16:08 +0000258
259 <profiles>
260 <!--
261 copy the package such that IDEs may easily use it without
262 setting the system property
263 -->
264 <profile>
265 <id>ide</id>
266 <build>
267 <plugins>
268 <plugin>
269 <artifactId>maven-antrun-plugin</artifactId>
270 <version>1.3</version>
271 <executions>
272 <execution>
273 <id>scr-file-create</id>
274 <phase>package</phase>
275 <goals>
276 <goal>run</goal>
277 </goals>
278 <configuration>
279 <tasks>
280 <copy file="${project.build.directory}/${project.build.finalName}.jar"
281 tofile="${project.build.directory}/scr.jar" />
282 </tasks>
283 </configuration>
284 </execution>
285 </executions>
286 </plugin>
287 </plugins>
288 </build>
289 </profile>
290 </profiles>
291
Felix Meschberger47eb0372009-07-28 13:48:28 +0000292 <!-- repositories for Pax Exam and BND tool -->
293 <repositories>
294 <repository>
295 <id>ops4j</id>
296 <name>ops4j</name>
297 <url>http://repository.ops4j.org/maven2</url>
298 <snapshots>
299 <enabled>false</enabled>
300 </snapshots>
301 </repository>
302 <repository>
303 <id>aqute</id>
304 <name>aqute</name>
305 <url>http://www.aqute.biz/repo</url>
306 <snapshots>
307 <enabled>false</enabled>
308 </snapshots>
309 </repository>
310 </repositories>
Karl Pauls589e2b32007-07-11 18:29:29 +0000311</project>