ea14609899bf97df9a3d3abf181b7128deea1189
[integration/distribution.git] / features-distribution / pom.xml
1 <?xml version="1.0"?>
2 <!-- vi: set et smarttab sw=4 tabstop=4: -->
3 <!--
4  Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
5
6  This program and the accompanying materials are made available under the
7  terms of the Eclipse Public License v1.0 which accompanies this distribution,
8  and is available at http://www.eclipse.org/legal/epl-v10.html
9 -->
10 <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/xsd/maven-4.0.0.xsd">
11     <modelVersion>4.0.0</modelVersion>
12     <parent>
13         <groupId>org.opendaylight.integration</groupId>
14         <artifactId>root</artifactId>
15         <version>0.6.0-SNAPSHOT</version>
16         <relativePath>../</relativePath>
17     </parent>
18     <artifactId>features-distribution</artifactId>
19     <packaging>jar</packaging>
20     <name>distribution:${project.artifactId}</name>
21     <description>Sub-project building features internal to distribution.</description>
22     <url>https://wiki.opendaylight.org/view/Integration/Distribution</url>
23     <licenses>
24         <license>
25             <name>Eclipse Public License v1.0</name>
26             <url>http://www.eclipse.org/legal/epl-v10.html</url>
27         </license>
28     </licenses>
29     <!-- FIXME: Add developers section -->
30     <scm>
31         <connection>scm:git:https://git.opendaylight.org/gerrit/integration/distribution.git</connection>
32         <developerConnection>scm:git:ssh://git.opendaylight.org:29418/integration/distribution.git</developerConnection>
33         <url>https://git.opendaylight.org/gerrit/gitweb?p=integration/distribution.git;a=tree;f=features-distribution;hb=HEAD</url>
34         <tag>HEAD</tag>
35     </scm>
36     <properties>
37         <features.file>features.xml</features.file>
38     </properties>
39     <dependencies>
40         <!-- version module -->
41         <dependency>
42             <groupId>${project.groupId}</groupId>
43             <artifactId>version</artifactId>
44             <version>${project.version}</version>
45         </dependency>
46         <dependency>
47             <groupId>${project.groupId}</groupId>
48             <artifactId>version</artifactId>
49             <version>${project.version}</version>
50             <type>xml</type>
51             <classifier>config</classifier>
52         </dependency>
53         <!-- dependencies on feature repos -->
54         <dependency>
55             <groupId>org.opendaylight.controller</groupId>
56             <artifactId>features-config-persister</artifactId>
57             <version>${feature.controller.config.version}</version>
58             <classifier>features</classifier>
59             <type>xml</type>
60         </dependency>
61         <!-- test to validate features.xml -->
62         <dependency>
63             <groupId>org.opendaylight.odlparent</groupId>
64             <artifactId>features-test</artifactId>
65             <version>${feature.odlparent.version}</version>
66         </dependency>
67         <dependency>
68             <groupId>junit</groupId>
69             <artifactId>junit-dep</artifactId>
70             <scope>test</scope>
71         </dependency>
72         <!-- dependency for opendaylight-karaf-empty for use by testing -->
73         <dependency>
74             <groupId>org.opendaylight.odlparent</groupId>
75             <artifactId>opendaylight-karaf-empty</artifactId>
76             <version>${feature.odlparent.version}</version>
77             <type>zip</type>
78         </dependency>
79     </dependencies>
80     <build>
81         <resources>
82             <resource>
83                 <directory>src/main/resources</directory>
84                 <filtering>true</filtering>
85             </resource>
86         </resources>
87         <plugins>
88             <plugin>
89                 <!-- This generates the META-INF/maven/dependencies.properties file
90                      which is required by the versionAsInProject() used in SingleFeatureTest -->
91                 <groupId>org.ops4j.pax.exam</groupId>
92                 <artifactId>maven-paxexam-plugin</artifactId>
93                 <executions>
94                   <execution>
95                    <id>generate-dependencies.properties-file</id>
96                    <goals>
97                      <goal>generate-depends-file</goal>
98                    </goals>
99                   </execution>
100                 </executions>
101             </plugin>
102             <plugin>
103                 <groupId>org.apache.karaf.tooling</groupId>
104                 <artifactId>karaf-maven-plugin</artifactId>
105                 <extensions>true</extensions>
106                 <executions>
107                     <execution>
108                         <id>features-create-kar</id>
109                         <goals>
110                             <goal>features-create-kar</goal>
111                         </goals>
112                         <configuration>
113                             <featuresFile>${project.build.directory}/classes/${features.file}</featuresFile>
114                         </configuration>
115                     </execution>
116                 </executions>
117                 <!-- There is no useful configuration for the kar mojo. The features-generate-descriptor mojo configuration may be useful -->
118             </plugin>
119             <plugin>
120                 <groupId>org.apache.maven.plugins</groupId>
121                 <artifactId>maven-resources-plugin</artifactId>
122                 <executions>
123                     <execution>
124                         <id>filter</id>
125                         <phase>generate-resources</phase>
126                         <goals>
127                             <goal>resources</goal>
128                         </goals>
129                     </execution>
130                 </executions>
131             </plugin>
132             <plugin>
133                 <groupId>org.codehaus.mojo</groupId>
134                 <artifactId>build-helper-maven-plugin</artifactId>
135                 <executions>
136                     <execution>
137                         <id>attach-artifacts</id>
138                         <phase>package</phase>
139                         <goals>
140                             <goal>attach-artifact</goal>
141                         </goals>
142                         <configuration>
143                             <artifacts>
144                                 <artifact>
145                                     <file>${project.build.directory}/classes/${features.file}</file>
146                                     <type>xml</type>
147                                     <classifier>features</classifier>
148                                 </artifact>
149                             </artifacts>
150                         </configuration>
151                     </execution>
152                 </executions>
153             </plugin>
154             <plugin>
155                 <groupId>org.apache.maven.plugins</groupId>
156                 <artifactId>maven-surefire-plugin</artifactId>
157                 <configuration>
158                     <systemPropertyVariables>
159                         <karaf.distro.groupId>org.opendaylight.odlparent</karaf.distro.groupId>
160                         <karaf.distro.artifactId>opendaylight-karaf-empty</karaf.distro.artifactId>
161                         <karaf.distro.version>${feature.odlparent.version}</karaf.distro.version>
162                     </systemPropertyVariables>
163                     <dependenciesToScan>
164                         <dependency>org.opendaylight.odlparent:features-test</dependency>
165                     </dependenciesToScan>
166                 </configuration>
167             </plugin>
168         </plugins>
169     </build>
170 </project>