Carsten Ziegeler | b61fe0e | 2008-01-03 09:24:12 +0000 | [diff] [blame] | 1 | <!-- |
| 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 Ziegeler | 4fec096 | 2008-01-11 16:13:31 +0000 | [diff] [blame] | 19 | <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 Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 20 | <parent> |
| 21 | <groupId>org.apache.felix</groupId> |
Felix Meschberger | a4ad70a | 2009-04-27 13:12:37 +0000 | [diff] [blame] | 22 | <artifactId>felix-parent</artifactId> |
| 23 | <version>1.2.0</version> |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 24 | <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 Meschberger | c9f07c3 | 2009-04-29 08:58:54 +0000 | [diff] [blame] | 33 | <version>1.0.9-SNAPSHOT</version> |
Felix Meschberger | 4753fcb | 2009-04-29 08:46:06 +0000 | [diff] [blame] | 34 | <scm> |
Felix Meschberger | c9f07c3 | 2009-04-29 08:58:54 +0000 | [diff] [blame] | 35 | <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 Meschberger | 4753fcb | 2009-04-29 08:46:06 +0000 | [diff] [blame] | 38 | </scm> |
Felix Meschberger | 55e3b97 | 2009-10-12 07:16:08 +0000 | [diff] [blame] | 39 | |
| 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 Meschberger | c17fdbd | 2009-10-12 07:25:39 +0000 | [diff] [blame^] | 66 | <properties> |
| 67 | <project.bundle.file> |
| 68 | ${project.build.directory}/${project.build.finalName}.jar |
| 69 | </project.bundle.file> |
| 70 | </properties> |
| 71 | |
Felix Meschberger | 55e3b97 | 2009-10-12 07:16:08 +0000 | [diff] [blame] | 72 | |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 73 | <dependencies> |
| 74 | <dependency> |
Felix Meschberger | ca79792 | 2009-10-07 08:38:18 +0000 | [diff] [blame] | 75 | <groupId>org.osgi</groupId> |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 76 | <artifactId>org.osgi.core</artifactId> |
Felix Meschberger | ca79792 | 2009-10-07 08:38:18 +0000 | [diff] [blame] | 77 | <version>4.1.0</version> |
Felix Meschberger | bbd1e9d | 2009-10-11 08:18:18 +0000 | [diff] [blame] | 78 | <scope>provided</scope> |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 79 | </dependency> |
| 80 | <dependency> |
Felix Meschberger | ca79792 | 2009-10-07 08:38:18 +0000 | [diff] [blame] | 81 | <groupId>org.osgi</groupId> |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 82 | <artifactId>org.osgi.compendium</artifactId> |
Felix Meschberger | ca79792 | 2009-10-07 08:38:18 +0000 | [diff] [blame] | 83 | <version>4.2.0</version> |
Felix Meschberger | bbd1e9d | 2009-10-11 08:18:18 +0000 | [diff] [blame] | 84 | <scope>provided</scope> |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 85 | </dependency> |
| 86 | <dependency> |
Felix Meschberger | d25a63d | 2007-11-23 13:02:49 +0000 | [diff] [blame] | 87 | <groupId>${pom.groupId}</groupId> |
| 88 | <artifactId>org.apache.felix.shell</artifactId> |
| 89 | <version>1.0.0</version> |
Felix Meschberger | bbd1e9d | 2009-10-11 08:18:18 +0000 | [diff] [blame] | 90 | <scope>provided</scope> |
Felix Meschberger | d25a63d | 2007-11-23 13:02:49 +0000 | [diff] [blame] | 91 | </dependency> |
| 92 | <dependency> |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 93 | <groupId>net.sf.kxml</groupId> |
| 94 | <artifactId>kxml2</artifactId> |
| 95 | <version>2.2.2</version> |
Felix Meschberger | bbd1e9d | 2009-10-11 08:18:18 +0000 | [diff] [blame] | 96 | <scope>provided</scope> |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 97 | </dependency> |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 98 | |
| 99 | <!-- Integration Testing with Pax Exam --> |
| 100 | <dependency> |
| 101 | <groupId>junit</groupId> |
| 102 | <artifactId>junit</artifactId> |
| 103 | <version>4.6</version> |
Felix Meschberger | bbd1e9d | 2009-10-11 08:18:18 +0000 | [diff] [blame] | 104 | <scope>test</scope> |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 105 | </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 Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 130 | </dependencies> |
| 131 | <build> |
| 132 | <plugins> |
| 133 | <plugin> |
| 134 | <groupId>org.apache.felix</groupId> |
| 135 | <artifactId>maven-bundle-plugin</artifactId> |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 136 | <extensions>true</extensions> |
| 137 | <configuration> |
| 138 | <instructions> |
| 139 | <Bundle-SymbolicName> |
| 140 | ${artifactId} |
| 141 | </Bundle-SymbolicName> |
Carsten Ziegeler | cf6e51b | 2008-04-17 06:33:59 +0000 | [diff] [blame] | 142 | <Bundle-Vendor>The Apache Software Foundation</Bundle-Vendor> |
Felix Meschberger | 40d3e60 | 2009-10-11 12:25:14 +0000 | [diff] [blame] | 143 | <Bundle-DocURL> |
| 144 | http://felix.apache.org/site/apache-felix-service-component-runtime.html |
| 145 | </Bundle-DocURL> |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 146 | <Bundle-Activator> |
Felix Meschberger | d25a63d | 2007-11-23 13:02:49 +0000 | [diff] [blame] | 147 | org.apache.felix.scr.impl.Activator |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 148 | </Bundle-Activator> |
| 149 | <Export-Package> |
Felix Meschberger | d25a63d | 2007-11-23 13:02:49 +0000 | [diff] [blame] | 150 | org.apache.felix.scr;version=${pom.version}, |
Felix Meschberger | ca79792 | 2009-10-07 08:38:18 +0000 | [diff] [blame] | 151 | org.osgi.service.component |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 152 | </Export-Package> |
| 153 | <Private-Package> |
Felix Meschberger | 9b4e023 | 2009-07-09 12:34:12 +0000 | [diff] [blame] | 154 | org.apache.felix.scr.impl.*, |
| 155 | org.osgi.util.tracker |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 156 | </Private-Package> |
Felix Meschberger | d25a63d | 2007-11-23 13:02:49 +0000 | [diff] [blame] | 157 | <Import-Package> |
Felix Meschberger | ca79792 | 2009-10-07 08:38:18 +0000 | [diff] [blame] | 158 | <!-- |
| 159 | The Felix Shell support is optional |
| 160 | --> |
Felix Meschberger | 9b4e023 | 2009-07-09 12:34:12 +0000 | [diff] [blame] | 161 | org.apache.felix.shell; resolution:=optional, |
Felix Meschberger | ca79792 | 2009-10-07 08:38:18 +0000 | [diff] [blame] | 162 | |
| 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 Meschberger | d25a63d | 2007-11-23 13:02:49 +0000 | [diff] [blame] | 174 | </Import-Package> |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 175 | <DynamicImport-Package> |
| 176 | org.osgi.service.log |
| 177 | </DynamicImport-Package> |
Felix Meschberger | 9b4e023 | 2009-07-09 12:34:12 +0000 | [diff] [blame] | 178 | <Embed-Dependency> |
| 179 | kxml2 |
| 180 | </Embed-Dependency> |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 181 | </instructions> |
| 182 | </configuration> |
| 183 | </plugin> |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 184 | |
| 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 Meschberger | 55e3b97 | 2009-10-12 07:16:08 +0000 | [diff] [blame] | 232 | <systemProperties> |
| 233 | <property> |
| 234 | <name>project.bundle.file</name> |
Felix Meschberger | c17fdbd | 2009-10-12 07:25:39 +0000 | [diff] [blame^] | 235 | <value>${project.bundle.file}</value> |
Felix Meschberger | 55e3b97 | 2009-10-12 07:16:08 +0000 | [diff] [blame] | 236 | </property> |
| 237 | </systemProperties> |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 238 | <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 Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 256 | </plugins> |
| 257 | </build> |
Felix Meschberger | 55e3b97 | 2009-10-12 07:16:08 +0000 | [diff] [blame] | 258 | |
| 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 Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 292 | <!-- 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 Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 311 | </project> |