Remove yang-test
[controller.git] / opendaylight / config / config-parent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Copyright (c) 2014 Cisco Systems, 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" 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">
10   <parent>
11     <groupId>org.opendaylight.mdsal</groupId>
12     <artifactId>binding-parent</artifactId>
13     <version>0.13.0-SNAPSHOT</version>
14     <relativePath/>
15   </parent>
16
17   <modelVersion>4.0.0</modelVersion>
18   <groupId>org.opendaylight.controller</groupId>
19   <artifactId>config-parent</artifactId>
20   <version>0.9.0-SNAPSHOT</version>
21   <packaging>pom</packaging>
22
23   <properties>
24     <config.version>0.9.0-SNAPSHOT</config.version>
25     <mdsal.version>1.8.0-SNAPSHOT</mdsal.version>
26     <yangtools.version>2.0.5</yangtools.version>
27     <jmxGeneratorPath>${project.build.directory}/generated-sources/config-binding</jmxGeneratorPath>
28     <config.file>src/main/config/default-config.xml</config.file>
29   </properties>
30
31   <dependencyManagement>
32     <dependencies>
33       <!-- project specific dependencies -->
34       <dependency>
35         <groupId>org.opendaylight.controller</groupId>
36         <artifactId>config-artifacts</artifactId>
37         <version>${config.version}</version>
38         <type>pom</type>
39         <scope>import</scope>
40       </dependency>
41       <dependency>
42         <groupId>org.opendaylight.controller</groupId>
43         <artifactId>mdsal-artifacts</artifactId>
44         <version>${mdsal.version}</version>
45         <type>pom</type>
46         <scope>import</scope>
47       </dependency>
48       <dependency>
49         <groupId>org.opendaylight.yangtools</groupId>
50         <artifactId>yangtools-artifacts</artifactId>
51         <version>2.0.5</version>
52         <type>pom</type>
53         <scope>import</scope>
54       </dependency>
55       <dependency>
56         <groupId>org.opendaylight.mdsal</groupId>
57         <artifactId>mdsal-artifacts</artifactId>
58         <version>2.5.0-SNAPSHOT</version>
59         <type>pom</type>
60         <scope>import</scope>
61       </dependency>
62     </dependencies>
63   </dependencyManagement>
64
65   <dependencies>
66     <dependency>
67       <groupId>org.opendaylight.yangtools</groupId>
68       <artifactId>yang-common</artifactId>
69     </dependency>
70     <dependency>
71       <groupId>org.opendaylight.controller</groupId>
72       <artifactId>config-api</artifactId>
73     </dependency>
74   </dependencies>
75   <build>
76     <pluginManagement>
77       <plugins>
78         <plugin>
79           <groupId>org.opendaylight.yangtools</groupId>
80           <artifactId>yang-maven-plugin</artifactId>
81           <version>2.0.5</version>
82           <dependencies>
83             <dependency>
84               <groupId>org.opendaylight.controller</groupId>
85               <artifactId>yang-jmx-generator-plugin</artifactId>
86               <version>${config.version}</version>
87             </dependency>
88           </dependencies>
89           <executions>
90             <execution>
91               <id>config</id>
92               <goals>
93                 <goal>generate-sources</goal>
94               </goals>
95               <configuration>
96                 <codeGenerators>
97                   <generator>
98                     <codeGeneratorClass>org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator</codeGeneratorClass>
99                     <outputBaseDir>${jmxGeneratorPath}</outputBaseDir>
100                     <additionalConfiguration>
101                       <namespaceToPackage1>urn:opendaylight:params:xml:ns:yang:controller==org.opendaylight.controller.config.yang</namespaceToPackage1>
102                     </additionalConfiguration>
103                   </generator>
104                 </codeGenerators>
105                 <inspectDependencies>true</inspectDependencies>
106               </configuration>
107             </execution>
108           </executions>
109         </plugin>
110         <plugin>
111           <artifactId>maven-clean-plugin</artifactId>
112           <configuration>
113             <filesets>
114               <fileset>
115                 <directory>${jmxGeneratorPath}</directory>
116                 <includes>
117                   <include>**</include>
118                 </includes>
119               </fileset>
120               <fileset>
121                 <directory>${salGeneratorPath}</directory>
122                 <includes>
123                   <include>**</include>
124                 </includes>
125               </fileset>
126             </filesets>
127           </configuration>
128         </plugin>
129         <plugin>
130           <groupId>org.codehaus.mojo</groupId>
131           <artifactId>build-helper-maven-plugin</artifactId>
132           <executions>
133             <execution>
134               <id>add-yang-sources</id>
135               <phase>generate-sources</phase>
136               <goals>
137                 <goal>add-source</goal>
138               </goals>
139               <configuration>
140                 <sources>
141                   <source>${jmxGeneratorPath}</source>
142                   <source>${salGeneratorPath}</source>
143                 </sources>
144               </configuration>
145             </execution>
146           </executions>
147         </plugin>
148
149         <!-- This has to match the definition in odlparent and exists only
150              because for some reason PMD does not understand wildcards. -->
151         <plugin>
152           <groupId>org.apache.maven.plugins</groupId>
153           <artifactId>maven-pmd-plugin</artifactId>
154           <executions>
155             <execution>
156               <id>cpd</id>
157               <phase>process-sources</phase>
158               <goals>
159                 <goal>cpd-check</goal>
160               </goals>
161               <configuration>
162                 <excludeRoots>
163                   <excludeRoot>${jmxGeneratorPath}</excludeRoot>
164                   <excludeRoot>${salGeneratorPath}</excludeRoot>
165                 </excludeRoots>
166               </configuration>
167             </execution>
168           </executions>
169         </plugin>
170       </plugins>
171     </pluginManagement>
172   </build>
173   <profiles>
174     <profile>
175       <id>attach-config-without-filtering</id>
176       <activation>
177         <file>
178           <exists>${config.file}</exists>
179         </file>
180       </activation>
181       <build>
182         <pluginManagement>
183           <plugins>
184             <plugin>
185               <groupId>org.codehaus.mojo</groupId>
186               <artifactId>build-helper-maven-plugin</artifactId>
187               <executions>
188                 <execution>
189                   <id>attach-artifacts</id>
190                   <goals>
191                     <goal>attach-artifact</goal>
192                   </goals>
193                   <phase>package</phase>
194                   <configuration>
195                     <artifacts>
196                       <artifact>
197                         <file>${config.file}</file>
198                         <type>xml</type>
199                         <classifier>config</classifier>
200                       </artifact>
201                     </artifacts>
202                   </configuration>
203                 </execution>
204               </executions>
205             </plugin>
206           </plugins>
207         </pluginManagement>
208         <plugins>
209           <plugin>
210             <groupId>org.codehaus.mojo</groupId>
211             <artifactId>build-helper-maven-plugin</artifactId>
212           </plugin>
213         </plugins>
214       </build>
215     </profile>
216   </profiles>
217 </project>