JCLOUDS-1496: Update maven-compiler-plugin for increased JDK compatibility (#25)
* JCLOUDS-1496: Update maven-compiler-plugin for increased JDK compatibility
* increase maven-compiler-plugin version
* A space change to trigger jenkins again
* Another space change to trigger jenkins again
diff --git a/apis/openstack-keystone/pom.xml b/apis/openstack-keystone/pom.xml
index 478be90..ae86089 100644
--- a/apis/openstack-keystone/pom.xml
+++ b/apis/openstack-keystone/pom.xml
@@ -110,6 +110,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
+ <version>3.8.0</version>
<inherited>false</inherited>
<configuration>
<source>${maven.compile.source}</source>
diff --git a/project/pom.xml b/project/pom.xml
index 2ae0a51..7bd121c 100644
--- a/project/pom.xml
+++ b/project/pom.xml
@@ -743,14 +743,95 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
<configuration>
- <compilerId>javac-with-errorprone</compilerId>
- <forceJavacCompilerUse>true</forceJavacCompilerUse>
<encoding>${project.build.sourceEncoding}</encoding>
- <source>${maven.compile.source}</source>
- <target>${maven.compile.target}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.4</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <archive>
+ <manifestEntries>
+ <Specification-Title>jclouds ${project.name}</Specification-Title>
+ <Specification-Vendor>jclouds</Specification-Vendor>
+ <Implementation-Vendor>jclouds</Implementation-Vendor>
+ <Implementation-Vendor-Id>org.jclouds</Implementation-Vendor-Id>
+ <Implementation-Version>${project.version}</Implementation-Version>
+ <X-Compile-Source-JDK>${maven.compile.source}</X-Compile-Source-JDK>
+ <X-Compile-Target-JDK>${maven.compile.target}</X-Compile-Target-JDK>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>2.3.7</version>
+ <extensions>true</extensions>
+ <configuration>
+ <obrRepository>NONE</obrRepository>
+ <instructions>
+ <Bundle-Activator>${jclouds.osgi.activator}</Bundle-Activator>
+ <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+ <Export-Package>${jclouds.osgi.export}</Export-Package>
+ <Import-Package>${guava.osgi.import},${jclouds.osgi.import}</Import-Package>
+ <DynamicImport-Package>${jclouds.osgi.dynamic}</DynamicImport-Package>
+ <Fragment-Host>${jclouds.osgi.fragment}</Fragment-Host>
+ </instructions>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.15</version>
+ <!-- configuration and dependencies set via profiles -->
+ <executions>
+ <execution>
+ <id>default</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.gaul</groupId>
+ <artifactId>modernizer-maven-plugin</artifactId>
+ <version>1.8.0</version>
+ <!-- configuration and dependencies set via profiles -->
+ <executions>
+ <execution>
+ <id>modernizer</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>modernizer</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.8.0</version>
+ <configuration>
+ <compilerId>javac-with-errorprone</compilerId>
+ <forceJavacCompilerUse>true</forceJavacCompilerUse>
+ <encoding>${project.build.sourceEncoding}</encoding>
+ <source>${maven.compile.source}</source>
+ <target>${maven.compile.target}</target>
<showDeprecation>false</showDeprecation>
<showWarnings>true</showWarnings>
<compilerArgs>
@@ -877,101 +958,20 @@
<compilerArg>-Xep:UnlockMethod:ERROR</compilerArg>
<compilerArg>-Xep:WildcardImport:ERROR</compilerArg>
</compilerArgs>
- </configuration>
- <dependencies>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-compiler-javac-errorprone</artifactId>
- <version>2.6</version>
- </dependency>
- <dependency>
- <groupId>com.google.errorprone</groupId>
- <artifactId>error_prone_core</artifactId>
- <version>2.0.5</version>
- </dependency>
- </dependencies>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.6</version>
- <configuration>
- <encoding>${project.build.sourceEncoding}</encoding>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.4</version>
- <executions>
- <execution>
- <goals>
- <goal>test-jar</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <archive>
- <manifestEntries>
- <Specification-Title>jclouds ${project.name}</Specification-Title>
- <Specification-Vendor>jclouds</Specification-Vendor>
- <Implementation-Vendor>jclouds</Implementation-Vendor>
- <Implementation-Vendor-Id>org.jclouds</Implementation-Vendor-Id>
- <Implementation-Version>${project.version}</Implementation-Version>
- <X-Compile-Source-JDK>${maven.compile.source}</X-Compile-Source-JDK>
- <X-Compile-Target-JDK>${maven.compile.target}</X-Compile-Target-JDK>
- </manifestEntries>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>2.3.7</version>
- <extensions>true</extensions>
- <configuration>
- <obrRepository>NONE</obrRepository>
- <instructions>
- <Bundle-Activator>${jclouds.osgi.activator}</Bundle-Activator>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Export-Package>${jclouds.osgi.export}</Export-Package>
- <Import-Package>${guava.osgi.import},${jclouds.osgi.import}</Import-Package>
- <DynamicImport-Package>${jclouds.osgi.dynamic}</DynamicImport-Package>
- <Fragment-Host>${jclouds.osgi.fragment}</Fragment-Host>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.15</version>
- <!-- configuration and dependencies set via profiles -->
- <executions>
- <execution>
- <id>default</id>
- <phase>verify</phase>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.gaul</groupId>
- <artifactId>modernizer-maven-plugin</artifactId>
- <version>1.8.0</version>
- <!-- configuration and dependencies set via profiles -->
- <executions>
- <execution>
- <id>modernizer</id>
- <phase>verify</phase>
- <goals>
- <goal>modernizer</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- <pluginManagement>
- <plugins>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-compiler-javac-errorprone</artifactId>
+ <version>2.6</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.errorprone</groupId>
+ <artifactId>error_prone_core</artifactId>
+ <version>2.0.5</version>
+ </dependency>
+ </dependencies>
+ </plugin>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<version>2.2</version>
@@ -1141,6 +1141,22 @@
</plugins>
</pluginManagement>
</build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <!-- When building jclouds-project, override the config to use the local file -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <configLocation>../resources/checkstyle.xml</configLocation>
+ <includeTestSourceDirectory>true</includeTestSourceDirectory>
+ <failOnViolation>true</failOnViolation>
+ <failsOnError>true</failsOnError>
+ <violationSeverity>warning</violationSeverity>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
<profiles>
<profile>
<id>live</id>
@@ -1270,6 +1286,7 @@
<plugins>
<plugin>
<!-- When building jclouds-project, override the config to use the local file -->
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>../resources/checkstyle.xml</configLocation>
diff --git a/resources/checkstyle-suppressions.xml b/resources/checkstyle-suppressions.xml
new file mode 100644
index 0000000..2857beb
--- /dev/null
+++ b/resources/checkstyle-suppressions.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+
+<!DOCTYPE suppressions PUBLIC
+ "-//Puppy Crawl//DTD Suppressions 1.0//EN"
+ "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
+<suppressions>
+ <!-- Turn off all checks for generated files -->
+ <suppress files="AutoValue_.*.java" checks=".*" />
+</suppressions>
diff --git a/resources/checkstyle.xml b/resources/checkstyle.xml
index e1d491e..c89b58b 100644
--- a/resources/checkstyle.xml
+++ b/resources/checkstyle.xml
@@ -97,4 +97,8 @@
<property name="message" value="Do not use Windows line endings"/>
<property name="fileExtensions" value="java,xml,json"/>
</module>
+
+ <module name="SuppressionFilter">
+ <property name="file" value="resources/checkstyle-suppressions.xml"/>
+ </module>
</module>