Add single features wrapping karaf features
[odlparent.git] / single-feature-parent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  Copyright © 2016, 2017 Red Hat, Inc. and others.  All rights reserved.
4
5  This program and the accompanying materials are made available under the
6  terms of the Eclipse Public License v1.0 which accompanies this distribution,
7  and is available at http://www.eclipse.org/legal/epl-v10.html
8  -->
9 <project xmlns="http://maven.apache.org/POM/4.0.0"
10          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
11          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
12     <modelVersion>4.0.0</modelVersion>
13
14     <!--
15          Base parent POM for building and packaging single Karaf features.
16          Karaf features are generated based on the POM dependencies; they can be supplemented by a base
17          feature.xml file in src/main/feature.
18
19          By default, such single features aren't tested for loadability; they're supposed to be aggregated
20          in a feature repository (see feature-repo-parent), which is tested using SingleFeatureTest. The
21          sft profile can be used to enforce SingleFeatureTest on single features too.
22
23          Single features which aren't part of a repository can not be considered part of a project's API.
24          In any case, refer to each project's declared features to determine their API and future
25          availability.
26
27          Users should do the following:
28
29          - specify this as their parent
30          - make sure the packaging is set to feature
31          - setup projects <dependencies/> as needed for their features
32     -->
33
34     <parent>
35         <groupId>org.opendaylight.odlparent</groupId>
36         <artifactId>odlparent</artifactId>
37         <version>1.8.0-SNAPSHOT</version>
38         <relativePath>../odlparent</relativePath>
39     </parent>
40
41     <groupId>org.opendaylight.odlparent</groupId>
42     <artifactId>single-feature-parent</artifactId>
43     <version>1.8.0-SNAPSHOT</version>
44     <packaging>pom</packaging>
45     <name>ODL :: odlparent :: ${project.artifactId}</name>
46
47     <properties>
48         <karaf.version>${karaf4.version}</karaf.version>
49         <jacoco.skip>true</jacoco.skip>
50     </properties>
51
52     <build>
53         <plugins>
54             <plugin>
55                 <!-- This generates the META-INF/maven/dependencies.properties file
56                      which is required by the versionAsInProject() used in SingleFeatureTest -->
57                 <groupId>org.apache.servicemix.tooling</groupId>
58                 <artifactId>depends-maven-plugin</artifactId>
59             </plugin>
60             <plugin>
61                 <groupId>org.apache.karaf.tooling</groupId>
62                 <artifactId>karaf-maven-plugin</artifactId>
63                 <version>${karaf4.plugin.version}</version>
64                 <extensions>true</extensions>
65                 <configuration>
66                     <simplifyBundleDependencies>true</simplifyBundleDependencies>
67                     <excludedArtifactIds>
68                         <!-- These artifacts are provided by our Karaf distribution -->
69                         <!-- Aries Blueprint -->
70                         <excludedArtifactId>org.apache.aries.blueprint.api</excludedArtifactId>
71                         <excludedArtifactId>org.apache.aries.blueprint.core</excludedArtifactId>
72                         <!-- Aries Quiesce -->
73                         <excludedArtifactId>org.apache.aries.quiesce.api</excludedArtifactId>
74                         <!-- jline -->
75                         <excludedArtifactId>jline</excludedArtifactId>
76                         <!-- SLF4J -->
77                         <excludedArtifactId>slf4j-api</excludedArtifactId>
78                         <excludedArtifactId>jcl-over-slf4j</excludedArtifactId>
79                         <!-- sshd -->
80                         <excludedArtifactId>sshd-core</excludedArtifactId>
81                         <!-- Karaf artifacts -->
82                         <!-- TODO Rework this once Karaf supports wildcards here -->
83                         <excludedArtifactId>org.apache.karaf.jaas.config</excludedArtifactId>
84                         <excludedArtifactId>org.apache.karaf.jaas.modules</excludedArtifactId>
85                         <excludedArtifactId>org.apache.karaf.shell.console</excludedArtifactId>
86                         <excludedArtifactId>org.apache.karaf.shell.core</excludedArtifactId>
87                     </excludedArtifactIds>
88                 </configuration>
89             </plugin>
90         </plugins>
91     </build>
92
93     <profiles>
94         <profile>
95             <id>sft</id>
96             <activation>
97                 <activeByDefault>false</activeByDefault>
98             </activation>
99             <dependencies>
100                 <!-- Test the generated features.xml -->
101                 <dependency>
102                     <groupId>org.opendaylight.odlparent</groupId>
103                     <artifactId>features4-test</artifactId>
104                     <version>1.8.0-SNAPSHOT</version>
105                     <scope>test</scope>
106                 </dependency>
107                 <!-- Force SLF4J to test scope -->
108                 <dependency>
109                     <groupId>org.slf4j</groupId>
110                     <artifactId>slf4j-api</artifactId>
111                     <scope>test</scope>
112                 </dependency>
113             </dependencies>
114             <build>
115                 <plugins>
116                     <plugin>
117                         <artifactId>maven-surefire-plugin</artifactId>
118                         <version>${maven.surefire.version}</version>
119                         <configuration>
120                             <dependenciesToScan>
121                                 <dependency>org.opendaylight.odlparent:features4-test</dependency>
122                             </dependenciesToScan>
123                             <additionalClasspathElements>
124                                 <additionalClasspathElement>${project.build.directory}/feature</additionalClasspathElement>
125                             </additionalClasspathElements>
126                         </configuration>
127                         <executions>
128                             <execution>
129                                 <phase>test</phase>
130                                 <goals>
131                                     <goal>test</goal>
132                                 </goals>
133                             </execution>
134                         </executions>
135                     </plugin>
136                 </plugins>
137             </build>
138         </profile>
139     </profiles>
140
141     <!--
142         Maven Site Configuration
143
144         The following configuration is necessary for maven-site-plugin to
145         correctly identify the correct deployment path for OpenDaylight Maven
146         sites.
147     -->
148     <url>${odl.site.url}/${project.groupId}/${stream}/${project.artifactId}/</url>
149
150     <distributionManagement>
151         <site>
152             <id>opendaylight-site</id>
153             <url>${nexus.site.url}/${project.artifactId}/</url>
154         </site>
155     </distributionManagement>
156
157 </project>