blob: 899990de9b6ebead4ea7a8e64ea87c45beb6d379 [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<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">
<parent>
<groupId>org.apache.felix</groupId>
<artifactId>felix-parent</artifactId>
<version>2.1</version>
<relativePath/>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>bundle</packaging>
<name>Apache Felix Declarative Services</name>
<description>
Implementation of the Declarative Services specification 1.1
</description>
<artifactId>org.apache.felix.scr</artifactId>
<version>1.6.1-SNAPSHOT</version>
<scm>
<connection>scm:svn:https://svn.apache.org/repos/asf/felix/trunk/scr</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/felix/trunk/scr</developerConnection>
<url>scm:svn:https://svn.apache.org/repos/asf/felix/trunk/scr</url>
</scm>
<!--
A Note on Testing
=================
This project contains two kinds of tests: regular unit tests running
in the test phase and integration tests based on PAX Exam running
in the integration-test phase.
Basically the complete project is build using Java 1.3 source and target
compatibility (as inherited from the parent pom). The exception are the
unit tests in the "integration" packages. These have to be compiled with
Java 5 source and target compatibility because the employ annotations
and generics.
For running the integration tests from the console using Maven nothing
special has to be done as the tests run automatically. To run the tests
in your IDE, the project has to be built to the "package" phase with
the profile "ide" enabled:
$ mvn -Pide clean package
This creates the scr.jar file in the target folder, which is used by
the integration tests when run from the IDE. Alternatively the
"project.bundle.file" system property may be set to the bundle JAR
in the IDE launcher.
-->
<properties>
<bundle.build.name>
${basedir}/target
</bundle.build.name>
<bundle.file.name>
${bundle.build.name}/${project.build.finalName}.jar
</bundle.file.name>
</properties>
<dependencies>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<version>4.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
<version>4.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.shell</artifactId>
<version>1.0.0</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.apache.felix</groupId>
<artifactId>org.osgi.core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.gogo.runtime</artifactId>
<version>0.6.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.sf.kxml</groupId>
<artifactId>kxml2</artifactId>
<version>2.2.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>concurrent</groupId>
<artifactId>concurrent</artifactId>
<version>1.3.4</version>
<scope>provided</scope>
</dependency>
<!-- Integration Testing with Pax Exam -->
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-container-forked</artifactId>
<version>2.4.0.RC1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-junit4</artifactId>
<version>2.4.0.RC1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-link-mvn</artifactId>
<version>2.4.0.RC1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.url</groupId>
<artifactId>pax-url-aether</artifactId>
<version>1.4.0.RC1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.url</groupId>
<artifactId>pax-url-wrap</artifactId>
<version>1.4.0.RC1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.logging</groupId>
<artifactId>pax-logging-api</artifactId>
<version>1.6.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.logging</groupId>
<artifactId>pax-logging-service</artifactId>
<version>1.6.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>0.9.29</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>0.9.29</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-atinject_1.0_spec</artifactId>
<version>1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit</groupId>
<artifactId>com.springsource.org.junit</artifactId>
<version>4.9.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.base</groupId>
<artifactId>ops4j-base-lang</artifactId>
<version>1.2.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.ops4j.base</groupId>
<artifactId>ops4j-base-net</artifactId>
<version>1.2.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.tinybundles</groupId>
<artifactId>tinybundles</artifactId>
<version>1.0.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<directory>${bundle.build.name}</directory>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.7</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Category>osgi</Bundle-Category>
<Bundle-SymbolicName>
${project.artifactId}
</Bundle-SymbolicName>
<Bundle-Vendor>The Apache Software Foundation</Bundle-Vendor>
<Bundle-DocURL>
http://felix.apache.org/site/apache-felix-service-component-runtime.html
</Bundle-DocURL>
<Bundle-Activator>
org.apache.felix.scr.impl.Activator
</Bundle-Activator>
<Export-Package>
org.apache.felix.scr;version=1.7,
org.apache.felix.scr.component;version=1.0;
mandatory:="status"; status="provisional",
org.osgi.service.component
</Export-Package>
<Private-Package>
org.apache.felix.scr.impl.*,
org.osgi.util.tracker
</Private-Package>
<Import-Package>
<!--
optional import for Gogo annotations
-->
org.apache.felix.service.command;resolution:=optional,
<!--
The Felix Shell support is optional
-->
org.apache.felix.shell;provide:=true;resolution:=optional,
<!--
Framework version 1.4 (from R4.1) is required
because we depend on ServiceReference being
Comparable and Bundle.getBundleContext method
being available.
-->
org.osgi.framework;version="[1.4,2)",
<!--
LogService is optional but if present the
R4.0 version 1.3 is sufficient.
-->
org.osgi.service.log;version="[1.3,2)";resolution:=optional,
<!--
PackageAdmin is used to find reference types if
the component's bundle does not import it.
See BindMethod.getParameterClass(Class) for details.
R4.0 version 1.2 is sufficient.
-->
org.osgi.service.packageadmin;version="[1.2,2)";resolution:=optional,
<!--
SCR API is required (we also export it) and must
be of the same minor version as we export, because
we implement that exact version. This import is
only used if the framework decides to wire the
bundle to another API provider.
-->
org.osgi.service.component;provide:=true,
<!--
SCR Admin API is required (we also export it) and
must be of the same minor version as we export,
because we implement that exact version. This
import is only used if the framework decides to
wire the bundle to another API provider.
-->
org.apache.felix.scr;provide:=true
</Import-Package>
<DynamicImport-Package>
<!--
Configuration Admin version 1.2 (from R4.0) is enough
-->
org.osgi.service.cm;version="[1.2,2)",
<!--
Metatype is optional and if it is
present, version 1.1 (from R4.1) is enough
-->
org.osgi.service.metatype;version="[1.1,2)"
</DynamicImport-Package>
<Embed-Dependency>
kxml2;inline=org/kxml2/io/KXmlParser.class|org/xmlpull/v1/XmlPull**,
concurrent;inline=EDU/oswego/cs/dl/util/concurrent/ReentrantLock.class|EDU/oswego/cs/dl/util/concurrent/Sync.class
</Embed-Dependency>
</instructions>
</configuration>
</plugin>
<!--
Configure default compilation for Java 1.3 and integration
test compilation for Java 5 (since integration tests use
Java Annotations for Pax Exam).
Also configure the compilation of the Gogo Command class
(using Java 5 annotations) with Java 5 target.
-->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>compile-java5</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<source>1.5</source>
<target>1.5</target>
<excludes>
<exclude>dummy-to-overwrite-global-config</exclude>
</excludes>
<includes>
<include>**/ScrGogoCommand.java</include>
</includes>
</configuration>
</execution>
<execution>
<id>test-compile-java5</id>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<source>1.5</source>
<target>1.5</target>
<testIncludes>
<testInclude>**/integration/**</testInclude>
</testIncludes>
<testExcludes>
<testExclude>**/impl/**</testExclude>
</testExcludes>
</configuration>
</execution>
</executions>
<configuration>
<testExcludes>
<testExclude>**/integration/**</testExclude>
</testExcludes>
<excludes>
<exclude>**/ScrGogoCommand.java</exclude>
</excludes>
</configuration>
</plugin>
<!-- plain unit tests -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/integration/**</exclude>
<exclude>**/components/**</exclude>
<exclude>**/instances/**</exclude>
<exclude>**/instances2/**</exclude>
</excludes>
</configuration>
</plugin>
<!-- integration tests run with pax-exam -->
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.12</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<systemProperties>
<property>
<name>project.bundle.file</name>
<value>${bundle.file.name}</value>
</property>
</systemProperties>
<excludes>
<exclude>**/components/**</exclude>
</excludes>
<includes>
<include>**/integration/**</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<excludePackageNames>*.impl</excludePackageNames>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<!--
copy the package such that IDEs may easily use it without
setting the system property
-->
<profile>
<id>ide</id>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>scr-file-create</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<copy file="${project.build.directory}/${project.build.finalName}.jar" tofile="${project.build.directory}/scr.jar" />
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>felix</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<dependencies>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.framework</artifactId>
<version>4.0.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>equinox</id>
<dependencies>
<dependency>
<groupId>org.eclipse</groupId>
<artifactId>osgi</artifactId>
<version>3.7.1.R37x_v20110808-1106</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
</profiles>
<repositories>
<!-- springsource junit wrapping -->
<repository>
<id>com.springsource.repository.bundles.external</id>
<name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name>
<url>http://repository.springsource.com/maven/bundles/external</url>
</repository>
</repositories>
</project>