BUG-6652: generate features.xml with karaf-maven-plugin
[odlparent.git] / single-feature-parent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  Copyright © 2016 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     <build>
48         <plugins>
49             <plugin>
50                 <groupId>org.apache.karaf.tooling</groupId>
51                 <artifactId>karaf-maven-plugin</artifactId>
52                 <version>3.0.8</version>
53                 <extensions>true</extensions>
54             </plugin>
55         </plugins>
56     </build>
57
58     <profiles>
59         <profile>
60             <id>sft</id>
61             <activation>
62                 <activeByDefault>false</activeByDefault>
63             </activation>
64             <dependencies>
65                 <!-- Test the generated features.xml -->
66                 <dependency>
67                     <groupId>org.opendaylight.odlparent</groupId>
68                     <artifactId>features-test</artifactId>
69                     <version>1.8.0-SNAPSHOT</version>
70                     <scope>test</scope>
71                 </dependency>
72                 <!-- Force SLF4J to test scope -->
73                 <dependency>
74                     <groupId>org.slf4j</groupId>
75                     <artifactId>slf4j-api</artifactId>
76                     <scope>test</scope>
77                 </dependency>
78             </dependencies>
79             <build>
80                 <plugins>
81                     <plugin>
82                         <artifactId>maven-surefire-plugin</artifactId>
83                         <version>${maven.surefire.version}</version>
84                         <configuration>
85                             <dependenciesToScan>
86                                 <dependency>org.opendaylight.odlparent:features-test</dependency>
87                             </dependenciesToScan>
88                             <additionalClasspathElements>
89                                 <additionalClasspathElement>${project.build.directory}/feature</additionalClasspathElement>
90                             </additionalClasspathElements>
91                         </configuration>
92                         <executions>
93                             <execution>
94                                 <phase>test</phase>
95                                 <goals>
96                                     <goal>test</goal>
97                                 </goals>
98                             </execution>
99                         </executions>
100                     </plugin>
101                 </plugins>
102             </build>
103         </profile>
104     </profiles>
105
106     <!--
107         Maven Site Configuration
108
109         The following configuration is necessary for maven-site-plugin to
110         correctly identify the correct deployment path for OpenDaylight Maven
111         sites.
112     -->
113     <url>${odl.site.url}/${project.groupId}/${stream}/${project.artifactId}/</url>
114
115     <distributionManagement>
116         <site>
117             <id>opendaylight-site</id>
118             <url>${nexus.site.url}/${project.artifactId}/</url>
119         </site>
120     </distributionManagement>
121
122 </project>