20105f6aa580100c84051dccdfb9f7e5518527e7
[honeycomb.git] / common / api-parent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  Copyright (c) 2015 Cisco and/or its affiliates.
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at:
7
8      http://www.apache.org/licenses/LICENSE-2.0
9
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 -->
16 <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">
17   <parent>
18     <groupId>org.opendaylight.mdsal</groupId>
19     <artifactId>binding-parent</artifactId>
20     <version>0.8.2-Beryllium-SR2</version>
21     <relativePath/>
22   </parent>
23
24   <properties>
25     <nexusproxy>http://nexus.fd.io/content</nexusproxy>
26   </properties>
27
28   <modelVersion>4.0.0</modelVersion>
29   <groupId>io.fd.honeycomb.common</groupId>
30   <artifactId>api-parent</artifactId>
31   <version>1.16.12-SNAPSHOT</version>
32   <packaging>pom</packaging>
33
34   <build>
35       <pluginManagement>
36         <plugins>
37           <plugin>
38             <artifactId>maven-checkstyle-plugin</artifactId>
39             <configuration>
40               <!-- Override checkstyle configuration to fit Honeycomb coding style-->
41               <configLocation>honeycomb-checkstyle.xml</configLocation>
42               <includeTestResources>true</includeTestResources>
43               <!--TODO enable fail on violation after issues are resolved + set in as errors in checkstyle xml-->
44             </configuration>
45             <executions>
46
47               <!-- Override license check configuration to fit Honeycomb coding style-->
48               <execution>
49                 <id>check-license</id>
50                 <goals>
51                   <goal>check</goal>
52                 </goals>
53                 <phase>process-sources</phase>
54                 <configuration>
55                   <headerLocation>HONEYCOMB_LICENSE.txt</headerLocation>
56                   <failOnViolation>true</failOnViolation>
57                   <failsOnError>true</failsOnError>
58                   <outputFile>${project.build.directory}/checkstyle-license-result.xml</outputFile>
59                 </configuration>
60               </execution>
61
62               <!-- Add logging checks from yangtools -->
63               <execution>
64                 <id>check-logging</id>
65                 <goals>
66                   <goal>check</goal>
67                 </goals>
68                 <phase>process-sources</phase>
69                 <configuration>
70                   <failOnViolation>true</failOnViolation>
71                   <configLocation>honeycomb-checkstyle-logging.xml</configLocation>
72                   <consoleOutput>true</consoleOutput>
73                   <includeTestSourceDirectory>true</includeTestSourceDirectory>
74                   <sourceDirectory>${project.basedir}</sourceDirectory>
75                   <includes>**\/*.java,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat,**\/*.yang</includes>
76                   <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/src/main/yang-gen-config\/,**\/src/main/yang-gen-sal\/,**\/src/main/xtend-gen\/,**\/src/main/yang\/</excludes>
77                   <outputFile>${project.build.directory}/checkstyle-logging-result.xml</outputFile>
78                 </configuration>
79               </execution>
80               <execution>
81                 <goals>
82                   <goal>check</goal>
83                 </goals>
84                 <phase>process-sources</phase>
85               </execution>
86             </executions>
87             <dependencies>
88               <dependency>
89                 <groupId>io.fd.honeycomb.common</groupId>
90                 <artifactId>honeycomb-checkstyle</artifactId>
91                 <!-- Hardcoded version to prevent archetype generated projects to use their own project version -->
92                 <version>1.16.12-SNAPSHOT</version>
93               </dependency>
94               <!-- Necessary for logging checks -->
95               <dependency>
96                 <groupId>org.opendaylight.yangtools</groupId>
97                 <artifactId>checkstyle-logging</artifactId>
98                 <version>${yangtools.version}</version>
99               </dependency>
100             </dependencies>
101           </plugin>
102           <!-- Deactivate strict java8 checks -->
103           <!-- FIXME fix all the javadoc offenders of doclint -->
104           <plugin>
105             <groupId>org.apache.maven.plugins</groupId>
106             <artifactId>maven-javadoc-plugin</artifactId>
107             <configuration>
108               <additionalparam>-Xdoclint:none</additionalparam>
109             </configuration>
110           </plugin>
111         </plugins>
112       </pluginManagement>
113       <plugins>
114       <plugin>
115         <artifactId>maven-checkstyle-plugin</artifactId>
116       </plugin>
117       <plugin>
118         <groupId>org.apache.maven.plugins</groupId>
119         <artifactId>maven-dependency-plugin</artifactId>
120         <version>2.10</version>
121         <executions>
122           <execution>
123             <id>unpack-license</id>
124             <phase>none</phase>
125             <goals><goal>unpack</goal></goals>
126           </execution>
127         </executions>
128       </plugin>
129         <plugin>
130           <groupId>org.apache.maven.plugins</groupId>
131           <artifactId>maven-compiler-plugin</artifactId>
132           <configuration>
133             <!-- Use google's error-prone static analysis-->
134             <compilerId>javac-with-errorprone</compilerId>
135             <forceJavacCompilerUse>true</forceJavacCompilerUse>
136             <showWarnings>true</showWarnings>
137             <source>1.8</source>
138             <target>1.8</target>
139           </configuration>
140           <dependencies>
141             <dependency>
142               <groupId>org.codehaus.plexus</groupId>
143               <artifactId>plexus-compiler-javac-errorprone</artifactId>
144               <version>2.5</version>
145             </dependency>
146             <!-- override plexus-compiler-javac-errorprone's dependency on
147                  Error Prone with the latest version -->
148             <dependency>
149               <groupId>com.google.errorprone</groupId>
150               <artifactId>error_prone_core</artifactId>
151               <version>2.0.9</version>
152             </dependency>
153           </dependencies>
154         </plugin>
155     </plugins>
156   </build>
157
158   <distributionManagement>
159     <repository>
160       <id>fdio-release</id>
161       <url>${nexusproxy}/repositories/fd.io.release/</url>
162     </repository>
163     <snapshotRepository>
164       <id>fdio-snapshot</id>
165       <url>${nexusproxy}/repositories/fd.io.snapshot/</url>
166     </snapshotRepository>
167   </distributionManagement>
168 </project>