Apply animal sniffer to entire build
Move animal sniffer configuration out of spring-boot-dependencies to spring-boot-parent and apply it to all projects. See gh-716
This commit is contained in:
@@ -201,12 +201,4 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>animal-sniffer-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
@@ -1671,33 +1671,6 @@
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>animal-sniffer-maven-plugin</artifactId>
|
||||
<version>1.14</version>
|
||||
<configuration>
|
||||
<signature>
|
||||
<groupId>org.codehaus.mojo.signature</groupId>
|
||||
<artifactId>java16</artifactId>
|
||||
<version>1.0</version>
|
||||
</signature>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enforce-java-6</id>
|
||||
<phase>test</phase>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<annotations>
|
||||
<annotation>org.springframework.lang.UsesJava8</annotation>
|
||||
<annotation>org.springframework.lang.UsesJava7</annotation>
|
||||
</annotations>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
|
||||
@@ -278,6 +278,11 @@
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>3.4</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>animal-sniffer-maven-plugin</artifactId>
|
||||
<version>1.14</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.cargo</groupId>
|
||||
<artifactId>cargo-maven2-plugin</artifactId>
|
||||
@@ -492,6 +497,30 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>animal-sniffer-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<signature>
|
||||
<groupId>org.codehaus.mojo.signature</groupId>
|
||||
<artifactId>java16</artifactId>
|
||||
<version>1.0</version>
|
||||
</signature>
|
||||
<annotations>
|
||||
<annotation>org.springframework.lang.UsesJava8</annotation>
|
||||
<annotation>org.springframework.lang.UsesJava7</annotation>
|
||||
</annotations>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enforce-java-6</id>
|
||||
<phase>test</phase>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
|
||||
@@ -128,6 +128,14 @@
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>animal-sniffer-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<!-- The use of SignalUtils seems to mess up animal sniffer -->
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
@@ -20,6 +20,11 @@
|
||||
</properties>
|
||||
<dependencies>
|
||||
<!-- Must never have compile/runtime time dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-core</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
|
||||
@@ -27,6 +27,7 @@ import java.util.Enumeration;
|
||||
|
||||
import org.springframework.boot.loader.jar.Handler;
|
||||
import org.springframework.boot.loader.jar.JarFile;
|
||||
import org.springframework.lang.UsesJava7;
|
||||
|
||||
/**
|
||||
* {@link ClassLoader} used by the {@link Launcher}.
|
||||
@@ -224,6 +225,7 @@ public class LaunchedURLClassLoader extends URLClassLoader {
|
||||
}
|
||||
}
|
||||
|
||||
@UsesJava7
|
||||
private static LockProvider setupLockProvider() {
|
||||
try {
|
||||
ClassLoader.registerAsParallelCapable();
|
||||
@@ -248,6 +250,7 @@ public class LaunchedURLClassLoader extends URLClassLoader {
|
||||
/**
|
||||
* Java 7 specific {@link LockProvider}.
|
||||
*/
|
||||
@UsesJava7
|
||||
private static class Java7LockProvider extends LockProvider {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -29,6 +29,7 @@ import javax.sql.XADataSource;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.lang.UsesJava7;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import bitronix.tm.resource.common.ResourceBean;
|
||||
@@ -110,6 +111,7 @@ public class PoolingDataSourceBean extends PoolingDataSource implements BeanName
|
||||
}
|
||||
|
||||
@Override
|
||||
@UsesJava7
|
||||
public Logger getParentLogger() throws SQLFeatureNotSupportedException {
|
||||
try {
|
||||
return ((DataSource) this).getParentLogger();
|
||||
@@ -166,6 +168,7 @@ public class PoolingDataSourceBean extends PoolingDataSource implements BeanName
|
||||
}
|
||||
|
||||
@Override
|
||||
@UsesJava7
|
||||
public Logger getParentLogger() throws SQLFeatureNotSupportedException {
|
||||
return this.dataSource.getParentLogger();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user