Bug 4296: Add config subsystem file with versions
[integration/distribution.git] / features-distribution / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
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"
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    <parent>
14       <groupId>org.opendaylight.integration</groupId>
15       <artifactId>root</artifactId>
16       <version>0.5.0-SNAPSHOT</version>
17       <relativePath>../</relativePath>
18    </parent>
19    <artifactId>features-distribution</artifactId>
20    <packaging>jar</packaging>
21    <properties>
22       <features.file>features.xml</features.file>
23    </properties>
24    <dependencies>
25     <!-- version module -->
26     <dependency>
27       <groupId>${project.groupId}</groupId>
28       <artifactId>version</artifactId>
29       <version>${project.version}</version>
30     </dependency>
31     <dependency>
32       <groupId>${project.groupId}</groupId>
33       <artifactId>version</artifactId>
34       <version>${project.version}</version>
35       <type>xml</type>
36       <classifier>config</classifier>
37     </dependency>
38     <!-- dependencies on feature repos -->
39     <dependency>
40       <groupId>org.opendaylight.controller</groupId>
41       <artifactId>features-config-persister</artifactId>
42       <version>${feature.controller.config.version}</version>
43       <classifier>features</classifier>
44       <type>xml</type>
45     </dependency>
46     <!-- test to validate features.xml -->
47     <dependency>
48       <groupId>org.opendaylight.odlparent</groupId>
49       <artifactId>features-test</artifactId>
50       <version>${feature.odlparent.version}</version>
51     </dependency>
52     <dependency>
53       <groupId>junit</groupId>
54       <artifactId>junit-dep</artifactId>
55       <scope>test</scope>
56     </dependency>
57     <!-- dependency for opendaylight-karaf-empty for use by testing -->
58     <dependency>
59       <groupId>org.opendaylight.controller</groupId>
60       <artifactId>opendaylight-karaf-empty</artifactId>
61       <version>${feature.odlparent.version}</version>
62       <type>zip</type>
63     </dependency>
64    </dependencies>
65    <build>
66       <resources>
67          <resource>
68             <directory>src/main/resources</directory>
69             <filtering>true</filtering>
70          </resource>
71       </resources>
72       <plugins>
73          <plugin>
74             <groupId>org.apache.karaf.tooling</groupId>
75             <artifactId>karaf-maven-plugin</artifactId>
76             <extensions>true</extensions>
77             <executions>
78                <execution>
79                   <id>features-create-kar</id>
80                   <goals>
81                      <goal>features-create-kar</goal>
82                   </goals>
83                   <configuration>
84                      <featuresFile>${project.build.directory}/classes/${features.file}</featuresFile>
85                   </configuration>
86                </execution>
87             </executions>
88         <!-- There is no useful configuration for the kar mojo. The features-generate-descriptor mojo configuration may be useful -->
89          </plugin>
90          <plugin>
91             <groupId>org.apache.maven.plugins</groupId>
92             <artifactId>maven-resources-plugin</artifactId>
93             <executions>
94                <execution>
95                   <id>filter</id>
96                   <phase>generate-resources</phase>
97                   <goals>
98                      <goal>resources</goal>
99                   </goals>
100                </execution>
101             </executions>
102          </plugin>
103          <plugin>
104             <groupId>org.codehaus.mojo</groupId>
105             <artifactId>build-helper-maven-plugin</artifactId>
106             <executions>
107                <execution>
108                   <id>attach-artifacts</id>
109                   <phase>package</phase>
110                   <goals>
111                      <goal>attach-artifact</goal>
112                   </goals>
113                   <configuration>
114                      <artifacts>
115                         <artifact>
116                            <file>${project.build.directory}/classes/${features.file}</file>
117                            <type>xml</type>
118                            <classifier>features</classifier>
119                         </artifact>
120                      </artifacts>
121                   </configuration>
122                </execution>
123             </executions>
124          </plugin>
125          <plugin>
126             <groupId>org.apache.maven.plugins</groupId>
127             <artifactId>maven-surefire-plugin</artifactId>
128             <configuration>
129               <systemPropertyVariables>
130                 <karaf.distro.groupId>org.opendaylight.controller</karaf.distro.groupId>
131                 <karaf.distro.artifactId>opendaylight-karaf-empty</karaf.distro.artifactId>
132                 <karaf.distro.version>${feature.odlparent.version}</karaf.distro.version>
133               </systemPropertyVariables>
134               <dependenciesToScan>
135                <dependency>org.opendaylight.odlparent:features-test</dependency>
136               </dependenciesToScan>
137             </configuration>
138           </plugin>
139       </plugins>
140    </build>
141 </project>