b750b1b52e73f02562cdc0187c0dc7ff677a8e45
[transportpce.git] / karaf / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Copyright © 2016 Orange and others. All rights reserved.
4 This program and the accompanying materials are made available under the
5 terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
7 -->
8 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
10     <modelVersion>4.0.0</modelVersion>
11
12   <parent>
13     <groupId>org.opendaylight.odlparent</groupId>
14     <artifactId>karaf4-parent</artifactId>
15     <version>3.1.0</version>
16     <relativePath/>
17   </parent>
18
19   <groupId>org.opendaylight.transportpce</groupId>
20   <artifactId>transportpce-karaf</artifactId>
21   <version>0.2.0-SNAPSHOT</version>
22   <name>${project.artifactId}</name>
23   <packaging>pom</packaging>
24
25     <properties>
26         <karaf.localFeature>odl-transportpce-ui</karaf.localFeature>
27         <device.yang.jar.extract.directory>
28             ${project.build.outputDirectory}/../yang-models/schema
29         </device.yang.jar.extract.directory>
30         <device.yang.final.directory>
31             ${project.build.outputDirectory}/../assembly/cache/schema
32         </device.yang.final.directory>
33     </properties>
34
35     <dependencyManagement>
36         <dependencies>
37             <dependency>
38                 <groupId>${project.groupId}</groupId>
39                 <artifactId>transportpce-artifacts</artifactId>
40                 <version>${project.version}</version>
41                 <type>pom</type>
42                 <scope>import</scope>
43             </dependency>
44             <dependency>
45                 <groupId>${project.groupId}.ordmodels</groupId>
46                 <artifactId>transportpce-ordmodels-device</artifactId>
47                 <version>${project.version}</version>
48                 <type>pom</type>
49                 <scope>import</scope>
50             </dependency>
51         </dependencies>
52     </dependencyManagement>
53
54     <dependencies>
55         <dependency>
56             <!-- scope is compile so all features (there is only one) are installed into startup.properties
57                 and the feature repo itself is not installed -->
58             <groupId>org.apache.karaf.features</groupId>
59             <artifactId>framework</artifactId>
60             <type>kar</type>
61         </dependency>
62
63         <dependency>
64             <groupId>${project.groupId}</groupId>
65             <artifactId>features-transportpce</artifactId>
66             <version>${project.version}</version>
67             <classifier>features</classifier>
68             <type>xml</type>
69             <scope>runtime</scope>
70         </dependency>
71     </dependencies>
72
73     <build>
74         <plugins>
75             <!-- DO NOT deploy the karaf artifact -->
76             <plugin>
77                 <groupId>org.apache.maven.plugins</groupId>
78                 <artifactId>maven-deploy-plugin</artifactId>
79                 <configuration>
80                     <skip>true</skip>
81                 </configuration>
82             </plugin>
83             <plugin>
84                 <groupId>org.apache.maven.plugins</groupId>
85                 <artifactId>maven-install-plugin</artifactId>
86                 <configuration>
87                     <skip>true</skip>
88                 </configuration>
89             </plugin>
90             <plugin>
91                 <groupId>org.apache.maven.plugins</groupId>
92                 <artifactId>maven-dependency-plugin</artifactId>
93                 <executions>
94                     <execution>
95                         <id>unpack</id>
96                         <phase>generate-resources</phase>
97                         <goals>
98                             <goal>unpack</goal>
99                         </goals>
100                         <configuration>
101                             <artifactItems>
102                                 <artifactItem>
103                                     <groupId>${project.groupId}.ordmodels</groupId>
104                                     <artifactId>transportpce-ordmodels-common</artifactId>
105                                 </artifactItem>
106                                 <artifactItem>
107                                     <groupId>${project.groupId}.ordmodels</groupId>
108                                     <artifactId>transportpce-ordmodels-device</artifactId>
109                                 </artifactItem>
110                             </artifactItems>
111                             <outputDirectory>${device.yang.jar.extract.directory}</outputDirectory>
112                             <includes>**/*.yang</includes>
113                         </configuration>
114                     </execution>
115                 </executions>
116             </plugin>
117             <plugin>
118                 <groupId>org.apache.maven.plugins</groupId>
119                 <artifactId>maven-antrun-plugin</artifactId>
120                 <executions>
121                     <execution>
122                         <id>copy-yang-files</id>
123                         <phase>package</phase>
124                         <goals>
125                             <goal>run</goal>
126                         </goals>
127                         <configuration>
128                             <target>
129                                 <copy todir="${device.yang.final.directory}" flatten="true">
130                                     <fileset dir="${device.yang.jar.extract.directory}/META-INF/yang">
131                                         <include name="**/*.yang" />
132                                     </fileset>
133                                 </copy>
134                             </target>
135                         </configuration>
136                     </execution>
137                 </executions>
138             </plugin>
139         </plugins>
140     </build>
141 </project>