Browse Source

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
pull/2783/head
Phillip Webb 11 years ago
parent
commit
8143d1f36d
  1. 8
      spring-boot-actuator/pom.xml
  2. 27
      spring-boot-dependencies/pom.xml
  3. 29
      spring-boot-parent/pom.xml
  4. 8
      spring-boot-tools/spring-boot-loader-tools/pom.xml
  5. 5
      spring-boot-tools/spring-boot-loader/pom.xml
  6. 3
      spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/LaunchedURLClassLoader.java
  7. 3
      spring-boot/src/main/java/org/springframework/boot/jta/bitronix/PoolingDataSourceBean.java

8
spring-boot-actuator/pom.xml

@ -201,12 +201,4 @@ @@ -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>

27
spring-boot-dependencies/pom.xml

@ -1671,33 +1671,6 @@ @@ -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>

29
spring-boot-parent/pom.xml

@ -278,6 +278,11 @@ @@ -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 @@ @@ -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>

8
spring-boot-tools/spring-boot-loader-tools/pom.xml

@ -128,6 +128,14 @@ @@ -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>

5
spring-boot-tools/spring-boot-loader/pom.xml

@ -20,6 +20,11 @@ @@ -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>

3
spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/LaunchedURLClassLoader.java

@ -27,6 +27,7 @@ import java.util.Enumeration; @@ -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 { @@ -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 { @@ -248,6 +250,7 @@ public class LaunchedURLClassLoader extends URLClassLoader {
/**
* Java 7 specific {@link LockProvider}.
*/
@UsesJava7
private static class Java7LockProvider extends LockProvider {
@Override

3
spring-boot/src/main/java/org/springframework/boot/jta/bitronix/PoolingDataSourceBean.java

@ -29,6 +29,7 @@ import javax.sql.XADataSource; @@ -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 @@ -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 @@ -166,6 +168,7 @@ public class PoolingDataSourceBean extends PoolingDataSource implements BeanName
}
@Override
@UsesJava7
public Logger getParentLogger() throws SQLFeatureNotSupportedException {
return this.dataSource.getParentLogger();
}

Loading…
Cancel
Save