Bump karaf to 4.3.2
[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>untested-single-feature-parent</artifactId>
37         <version>9.0.2-SNAPSHOT</version>
38         <relativePath>../untested-single-feature-parent</relativePath>
39     </parent>
40
41     <artifactId>single-feature-parent</artifactId>
42     <packaging>pom</packaging>
43     <name>ODL :: odlparent :: ${project.artifactId}</name>
44
45     <properties>
46         <jacoco.skip>true</jacoco.skip>
47         <skip.karaf.featureTest>false</skip.karaf.featureTest>
48
49         <!-- We typically do not have code in feature artifacts, which throws off maven-dependency-plugin -->
50         <odlparent.dependency.skip>true</odlparent.dependency.skip>
51     </properties>
52
53     <dependencies>
54         <!-- Test the generated features.xml -->
55         <dependency>
56             <groupId>org.opendaylight.odlparent</groupId>
57             <artifactId>features-test</artifactId>
58             <version>9.0.2-SNAPSHOT</version>
59             <scope>test</scope>
60         </dependency>
61         <dependency>
62             <groupId>org.opendaylight.odlparent</groupId>
63             <artifactId>bundles-test-lib</artifactId>
64             <scope>test</scope>
65         </dependency>
66         <dependency>
67             <groupId>org.apache.karaf.bundle</groupId>
68             <artifactId>org.apache.karaf.bundle.core</artifactId>
69             <version>${karaf.version}</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         <dependency>
79             <groupId>org.osgi</groupId>
80             <!-- required due to https://jira.opendaylight.org/browse/ODLPARENT-136 -->
81             <artifactId>osgi.cmpn</artifactId>
82             <scope>test</scope>
83         </dependency>
84     </dependencies>
85
86     <build>
87         <plugins>
88             <plugin>
89                 <artifactId>maven-surefire-plugin</artifactId>
90                 <!-- Overridden to have TCP channel support -->
91                 <version>3.0.0-M5</version>
92                 <configuration>
93                     <!-- Overridden to fix corruption with SFT, where the process would hang after test -->
94                     <forkNode implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory"/>
95                     <dependenciesToScan>
96                         <dependency>org.opendaylight.odlparent:features-test</dependency>
97                     </dependenciesToScan>
98                     <additionalClasspathElements>
99                         <additionalClasspathElement>${project.build.directory}/feature</additionalClasspathElement>
100                     </additionalClasspathElements>
101                     <skip>${skip.karaf.featureTest}</skip>
102                     <systemPropertyVariables>
103                       <!-- Use the same repository for Pax Exam as is used for Maven -->
104                       <org.ops4j.pax.url.mvn.localRepository>${settings.localRepository}</org.ops4j.pax.url.mvn.localRepository>
105                     </systemPropertyVariables>
106                 </configuration>
107                 <executions>
108                     <execution>
109                         <phase>test</phase>
110                         <goals>
111                             <goal>test</goal>
112                         </goals>
113                     </execution>
114                 </executions>
115             </plugin>
116         </plugins>
117     </build>
118
119     <profiles>
120         <profile>
121             <id>disable-sft</id>
122             <activation>
123                 <!-- Karaf does not have jre.properties for JDK17+ just yet -->
124                 <jdk>[17,)</jdk>
125             </activation>
126
127             <properties>
128                 <skip.karaf.featureTest>true</skip.karaf.featureTest>
129             </properties>
130
131             <build>
132                 <plugins>
133                     <plugin>
134                         <groupId>com.github.ekryd.echo-maven-plugin</groupId>
135                         <artifactId>echo-maven-plugin</artifactId>
136                         <executions>
137                             <execution>
138                                 <id>UNTESTED-JDK</id>
139                                 <goals>
140                                     <goal>echo</goal>
141                                 </goals>
142                                 <phase>test</phase>
143                                 <configuration>
144                                     <message>Running on JDK newer than 11, which is not supported. Skipping feature tests.</message>
145                                 </configuration>
146                             </execution>
147                         </executions>
148                     </plugin>
149                 </plugins>
150             </build>
151         </profile>
152     </profiles>
153 </project>