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 | --> |
| 66 | |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 67 | <dependencies> |
| 68 | <dependency> |
Felix Meschberger | ca79792 | 2009-10-07 08:38:18 +0000 | [diff] [blame] | 69 | <groupId>org.osgi</groupId> |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 70 | <artifactId>org.osgi.core</artifactId> |
Felix Meschberger | ca79792 | 2009-10-07 08:38:18 +0000 | [diff] [blame] | 71 | <version>4.1.0</version> |
Felix Meschberger | bbd1e9d | 2009-10-11 08:18:18 +0000 | [diff] [blame] | 72 | <scope>provided</scope> |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 73 | </dependency> |
| 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.compendium</artifactId> |
Felix Meschberger | ca79792 | 2009-10-07 08:38:18 +0000 | [diff] [blame] | 77 | <version>4.2.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 | d25a63d | 2007-11-23 13:02:49 +0000 | [diff] [blame] | 81 | <groupId>${pom.groupId}</groupId> |
| 82 | <artifactId>org.apache.felix.shell</artifactId> |
| 83 | <version>1.0.0</version> |
Felix Meschberger | bbd1e9d | 2009-10-11 08:18:18 +0000 | [diff] [blame] | 84 | <scope>provided</scope> |
Felix Meschberger | d25a63d | 2007-11-23 13:02:49 +0000 | [diff] [blame] | 85 | </dependency> |
| 86 | <dependency> |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 87 | <groupId>net.sf.kxml</groupId> |
| 88 | <artifactId>kxml2</artifactId> |
| 89 | <version>2.2.2</version> |
Felix Meschberger | bbd1e9d | 2009-10-11 08:18:18 +0000 | [diff] [blame] | 90 | <scope>provided</scope> |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 91 | </dependency> |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 92 | |
| 93 | <!-- Integration Testing with Pax Exam --> |
| 94 | <dependency> |
| 95 | <groupId>junit</groupId> |
| 96 | <artifactId>junit</artifactId> |
| 97 | <version>4.6</version> |
Felix Meschberger | bbd1e9d | 2009-10-11 08:18:18 +0000 | [diff] [blame] | 98 | <scope>test</scope> |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 99 | </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 Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 124 | </dependencies> |
| 125 | <build> |
| 126 | <plugins> |
| 127 | <plugin> |
| 128 | <groupId>org.apache.felix</groupId> |
| 129 | <artifactId>maven-bundle-plugin</artifactId> |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 130 | <extensions>true</extensions> |
| 131 | <configuration> |
| 132 | <instructions> |
| 133 | <Bundle-SymbolicName> |
| 134 | ${artifactId} |
| 135 | </Bundle-SymbolicName> |
Carsten Ziegeler | cf6e51b | 2008-04-17 06:33:59 +0000 | [diff] [blame] | 136 | <Bundle-Vendor>The Apache Software Foundation</Bundle-Vendor> |
Felix Meschberger | 40d3e60 | 2009-10-11 12:25:14 +0000 | [diff] [blame] | 137 | <Bundle-DocURL> |
| 138 | http://felix.apache.org/site/apache-felix-service-component-runtime.html |
| 139 | </Bundle-DocURL> |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 140 | <Bundle-Activator> |
Felix Meschberger | d25a63d | 2007-11-23 13:02:49 +0000 | [diff] [blame] | 141 | org.apache.felix.scr.impl.Activator |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 142 | </Bundle-Activator> |
| 143 | <Export-Package> |
Felix Meschberger | d25a63d | 2007-11-23 13:02:49 +0000 | [diff] [blame] | 144 | org.apache.felix.scr;version=${pom.version}, |
Felix Meschberger | ca79792 | 2009-10-07 08:38:18 +0000 | [diff] [blame] | 145 | org.osgi.service.component |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 146 | </Export-Package> |
| 147 | <Private-Package> |
Felix Meschberger | 9b4e023 | 2009-07-09 12:34:12 +0000 | [diff] [blame] | 148 | org.apache.felix.scr.impl.*, |
| 149 | org.osgi.util.tracker |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 150 | </Private-Package> |
Felix Meschberger | d25a63d | 2007-11-23 13:02:49 +0000 | [diff] [blame] | 151 | <Import-Package> |
Felix Meschberger | ca79792 | 2009-10-07 08:38:18 +0000 | [diff] [blame] | 152 | <!-- |
| 153 | The Felix Shell support is optional |
| 154 | --> |
Felix Meschberger | 9b4e023 | 2009-07-09 12:34:12 +0000 | [diff] [blame] | 155 | org.apache.felix.shell; resolution:=optional, |
Felix Meschberger | ca79792 | 2009-10-07 08:38:18 +0000 | [diff] [blame] | 156 | |
| 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 Meschberger | d25a63d | 2007-11-23 13:02:49 +0000 | [diff] [blame] | 168 | </Import-Package> |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 169 | <DynamicImport-Package> |
| 170 | org.osgi.service.log |
| 171 | </DynamicImport-Package> |
Felix Meschberger | 9b4e023 | 2009-07-09 12:34:12 +0000 | [diff] [blame] | 172 | <Embed-Dependency> |
| 173 | kxml2 |
| 174 | </Embed-Dependency> |
Karl Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 175 | </instructions> |
| 176 | </configuration> |
| 177 | </plugin> |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 178 | |
| 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 Meschberger | 55e3b97 | 2009-10-12 07:16:08 +0000 | [diff] [blame^] | 226 | <systemProperties> |
| 227 | <property> |
| 228 | <name>project.bundle.file</name> |
| 229 | <value>${project.build.directory}/${project.build.finalName}.jar</value> |
| 230 | </property> |
| 231 | </systemProperties> |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 232 | <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 Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 250 | </plugins> |
| 251 | </build> |
Felix Meschberger | 55e3b97 | 2009-10-12 07:16:08 +0000 | [diff] [blame^] | 252 | |
| 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 Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 286 | <!-- 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 Pauls | 589e2b3 | 2007-07-11 18:29:29 +0000 | [diff] [blame] | 305 | </project> |