Upgrade oparent to checkstyle 8.27
[oparent.git] / oparent / pom.xml
index 6fc37e3..7e5f274 100644 (file)
@@ -2,6 +2,7 @@
 <!--
    Copyright (c) 2016-2017 Huawei Technologies Co., Ltd.
    Modifications copyright (C) 2019 AT&T Intellectual Property
+   Modifications Copyright (C) 2019 Nordix Foundation.
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
         </dependency>
       </dependencies>
     </profile>
-    <profile>
-      <activation>
-        <jdk>[1.8,)</jdk>
-      </activation>
-      <!-- overrides oparent's existing checkstyle to check java 8 code -->
-      <id>checkstyle-jdk8</id>
-      <build>
-        <plugins>
-          <plugin>
-            <!--
-              - override the original oparent checkstyle configuration to
-              - use a later version of checkstyle which is jdk8 aware, and
-              - use an updated checkstyle config that conforms to onap style and the later checkstyle format.
-              -->
-            <artifactId>maven-checkstyle-plugin</artifactId>
-            <version>3.1.0</version>
-            <dependencies>
-              <dependency>
-                <!-- because google's latest style is not supported by plugin's default  version-->
-                <groupId>com.puppycrawl.tools</groupId>
-                <artifactId>checkstyle</artifactId>
-                <version>8.24</version>
-              </dependency>
-            </dependencies>
-            <executions>
-              <execution>
-                <id>onap-license</id>
-                <configuration>
-                  <!-- this config not supported by checkstyle any more -->
-                  <sourceDirectory combine.self="override"/>
-                  <sourceDirectories>
-                    <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
-                  </sourceDirectories>
-                </configuration>
-              </execution>
-              <execution>
-                <id>onap-java-style</id>
-                <configuration>
-                  <!-- Use Google Java Style Guide:
-                     https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
-                     with minor changes -->
-                  <configLocation>onap-checkstyle/onap-java-style${maven.compiler.source}.xml</configLocation>
-                  <!-- this config not supported by checkstyle any more -->
-                  <sourceDirectory combine.self="override"/>
-                  <sourceDirectories>
-                    <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
-                  </sourceDirectories>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
   </profiles>
   <dependencyManagement>
     <dependencies>
           <artifactId>sonar-maven-plugin</artifactId>
           <version>3.2</version>
         </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-checkstyle-plugin</artifactId>
+          <version>3.1.0</version>
+          <dependencies>
+            <dependency>
+              <groupId>com.puppycrawl.tools</groupId>
+              <artifactId>checkstyle</artifactId>
+              <version>8.27</version>
+            </dependency>
+          </dependencies>
+        </plugin>
       </plugins>
     </pluginManagement>
     <plugins>
       <plugin>
         <artifactId>maven-checkstyle-plugin</artifactId>
-        <version>2.17</version>
         <dependencies>
           <dependency>
             <groupId>org.onap.oparent</groupId>
               <includeResources>false</includeResources>
               <includeTestSourceDirectory>true</includeTestSourceDirectory>
               <includeTestResources>false</includeTestResources>
-              <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+              <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
               <excludes>
               </excludes>
               <consoleOutput>true</consoleOutput>
                    https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
                    with minor changes -->
               <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
-              <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
-              <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+              <!-- <sourceDirectories> is needed so that checkstyle ignores the generated sources directory -->
+              <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
               <includeResources>true</includeResources>
               <includeTestSourceDirectory>true</includeTestSourceDirectory>
               <includeTestResources>true</includeTestResources>