Make ModifiedClassPathExtension package private
Meta-annotate `ClassPathExclusions` and `ClassPathOverrides` with so that the `ModifiedClassPathExtension` no longer needs to be used directly. See gh-17491
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
package org.springframework.boot.autoconfigure.batch;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import org.springframework.batch.core.configuration.annotation.BatchConfigurer;
|
||||
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;
|
||||
@@ -29,7 +28,6 @@ import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
|
||||
@@ -41,7 +39,6 @@ import static org.mockito.Mockito.mock;
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@ExtendWith(ModifiedClassPathExtension.class)
|
||||
@ClassPathExclusions("spring-jdbc-*.jar")
|
||||
class BatchAutoConfigurationWithoutJdbcTests {
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ package org.springframework.boot.autoconfigure.batch;
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import org.springframework.batch.core.JobParameters;
|
||||
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;
|
||||
@@ -34,7 +33,6 @@ import org.springframework.boot.autoconfigure.transaction.TransactionAutoConfigu
|
||||
import org.springframework.boot.jdbc.DataSourceInitializationMode;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
|
||||
@@ -45,7 +43,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@ExtendWith(ModifiedClassPathExtension.class)
|
||||
@ClassPathExclusions("hibernate-jpa-*.jar")
|
||||
class BatchAutoConfigurationWithoutJpaTests {
|
||||
|
||||
|
||||
@@ -41,7 +41,6 @@ import org.infinispan.configuration.cache.ConfigurationBuilder;
|
||||
import org.infinispan.jcache.embedded.JCachingProvider;
|
||||
import org.infinispan.spring.embedded.provider.SpringEmbeddedCacheManager;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import org.springframework.beans.factory.BeanCreationException;
|
||||
import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||
@@ -50,7 +49,6 @@ import org.springframework.boot.autoconfigure.cache.support.MockCachingProvider;
|
||||
import org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration;
|
||||
import org.springframework.boot.test.context.assertj.AssertableApplicationContext;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
|
||||
import org.springframework.cache.Cache;
|
||||
import org.springframework.cache.CacheManager;
|
||||
import org.springframework.cache.annotation.CachingConfigurerSupport;
|
||||
@@ -87,7 +85,6 @@ import static org.mockito.Mockito.verify;
|
||||
* @author Mark Paluch
|
||||
* @author Ryon Day
|
||||
*/
|
||||
@ExtendWith(ModifiedClassPathExtension.class)
|
||||
@ClassPathExclusions("hazelcast-client-*.jar")
|
||||
class CacheAutoConfigurationTests extends AbstractCacheAutoConfigurationTests {
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package org.springframework.boot.autoconfigure.cache;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.autoconfigure.cache.CacheAutoConfigurationTests.DefaultCacheAndCustomizersConfiguration;
|
||||
@@ -25,7 +24,6 @@ import org.springframework.boot.autoconfigure.cache.CacheAutoConfigurationTests.
|
||||
import org.springframework.boot.autoconfigure.cache.CacheAutoConfigurationTests.EhCacheCustomCacheManager;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
|
||||
import org.springframework.cache.ehcache.EhCacheCacheManager;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
@@ -36,7 +34,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* @author Stephane Nicoll
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@ExtendWith(ModifiedClassPathExtension.class)
|
||||
@ClassPathExclusions("ehcache-3*.jar")
|
||||
class EhCache2CacheAutoConfigurationTests extends AbstractCacheAutoConfigurationTests {
|
||||
|
||||
|
||||
@@ -18,11 +18,9 @@ package org.springframework.boot.autoconfigure.cache;
|
||||
|
||||
import org.ehcache.jsr107.EhcacheCachingProvider;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import org.springframework.boot.autoconfigure.cache.CacheAutoConfigurationTests.DefaultCacheConfiguration;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
|
||||
import org.springframework.cache.jcache.JCacheCacheManager;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.core.io.Resource;
|
||||
@@ -35,7 +33,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* @author Stephane Nicoll
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@ExtendWith(ModifiedClassPathExtension.class)
|
||||
@ClassPathExclusions("ehcache-2*.jar")
|
||||
class EhCache3CacheAutoConfigurationTests extends AbstractCacheAutoConfigurationTests {
|
||||
|
||||
|
||||
@@ -17,11 +17,9 @@
|
||||
package org.springframework.boot.autoconfigure.condition;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
|
||||
import org.springframework.cache.caffeine.CaffeineCacheManager;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -35,7 +33,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* @author Stephane Nicoll
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@ExtendWith(ModifiedClassPathExtension.class)
|
||||
@ClassPathExclusions("spring-context-support-*.jar")
|
||||
class ConditionalOnMissingBeanWithFilteredClasspathTests {
|
||||
|
||||
|
||||
@@ -18,11 +18,9 @@ package org.springframework.boot.autoconfigure.condition;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import org.springframework.boot.autoconfigure.condition.OnBeanCondition.BeanTypeDeductionException;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -38,7 +36,6 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@ExtendWith(ModifiedClassPathExtension.class)
|
||||
@ClassPathExclusions("jackson-core-*.jar")
|
||||
class OnBeanConditionTypeDeductionFailureTests {
|
||||
|
||||
|
||||
@@ -17,14 +17,12 @@
|
||||
package org.springframework.boot.autoconfigure.data.redis;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.redis.connection.jedis.JedisClientConfiguration.JedisClientConfigurationBuilder;
|
||||
@@ -38,7 +36,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* @author Mark Paluch
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@ExtendWith(ModifiedClassPathExtension.class)
|
||||
@ClassPathExclusions("lettuce-core-*.jar")
|
||||
class RedisAutoConfigurationJedisTests {
|
||||
|
||||
|
||||
@@ -17,13 +17,11 @@
|
||||
package org.springframework.boot.autoconfigure.hateoas;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
|
||||
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebApplicationContext;
|
||||
import org.springframework.mock.web.MockServletContext;
|
||||
|
||||
@@ -32,7 +30,6 @@ import org.springframework.mock.web.MockServletContext;
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@ExtendWith(ModifiedClassPathExtension.class)
|
||||
@ClassPathExclusions("jackson-*.jar")
|
||||
class HypermediaAutoConfigurationWithoutJacksonTests {
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ import com.hazelcast.config.QueueConfig;
|
||||
import com.hazelcast.core.Hazelcast;
|
||||
import com.hazelcast.core.HazelcastInstance;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import org.springframework.beans.factory.BeanCreationException;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
@@ -31,7 +30,6 @@ import org.springframework.boot.test.context.assertj.AssertableApplicationContex
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.test.context.runner.ContextConsumer;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
@@ -43,7 +41,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@ExtendWith(ModifiedClassPathExtension.class)
|
||||
@ClassPathExclusions("hazelcast-client-*.jar")
|
||||
class HazelcastAutoConfigurationServerTests {
|
||||
|
||||
|
||||
@@ -17,12 +17,10 @@
|
||||
package org.springframework.boot.autoconfigure.http;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -32,7 +30,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@ExtendWith(ModifiedClassPathExtension.class)
|
||||
@ClassPathExclusions("jackson-*.jar")
|
||||
class HttpMessageConvertersAutoConfigurationWithoutJacksonTests {
|
||||
|
||||
|
||||
@@ -17,13 +17,11 @@
|
||||
package org.springframework.boot.autoconfigure.jdbc;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import org.springframework.beans.factory.BeanCreationException;
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.diagnostics.FailureAnalysis;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.mock.env.MockEnvironment;
|
||||
@@ -36,7 +34,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* @author Andy Wilkinson
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@ExtendWith(ModifiedClassPathExtension.class)
|
||||
@ClassPathExclusions({ "h2-*.jar", "hsqldb-*.jar" })
|
||||
class DataSourceBeanCreationFailureAnalyzerTests {
|
||||
|
||||
|
||||
@@ -19,12 +19,10 @@ package org.springframework.boot.autoconfigure.jsonb;
|
||||
import javax.json.bind.Jsonb;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -33,7 +31,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@ExtendWith(ModifiedClassPathExtension.class)
|
||||
@ClassPathExclusions("johnzon-jsonb-*.jar")
|
||||
class JsonbAutoConfigurationWithNoProviderTests {
|
||||
|
||||
|
||||
@@ -18,14 +18,12 @@ package org.springframework.boot.autoconfigure.orm.jpa;
|
||||
|
||||
import org.ehcache.jsr107.EhcacheCachingProvider;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@@ -36,7 +34,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@ExtendWith(ModifiedClassPathExtension.class)
|
||||
@ClassPathExclusions("ehcache-2*.jar")
|
||||
class Hibernate2ndLevelCacheIntegrationTests {
|
||||
|
||||
|
||||
@@ -17,12 +17,10 @@
|
||||
package org.springframework.boot.autoconfigure.session;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
|
||||
import org.springframework.session.web.http.DefaultCookieSerializer;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
@@ -33,7 +31,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Vedran Pavic
|
||||
*/
|
||||
@ExtendWith(ModifiedClassPathExtension.class)
|
||||
@ClassPathExclusions("spring-security-*")
|
||||
class SessionAutoConfigurationWithoutSecurityTests extends AbstractSessionAutoConfigurationTests {
|
||||
|
||||
|
||||
@@ -19,12 +19,10 @@ package org.springframework.boot.autoconfigure.validation;
|
||||
import javax.validation.Validator;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
|
||||
import org.springframework.validation.beanvalidation.MethodValidationPostProcessor;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
@@ -35,7 +33,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@ExtendWith(ModifiedClassPathExtension.class)
|
||||
@ClassPathExclusions({ "tomcat-embed-el-*.jar", "el-api-*.jar" })
|
||||
class ValidationAutoConfigurationWithHibernateValidatorMissingElImplTests {
|
||||
|
||||
|
||||
@@ -19,12 +19,10 @@ package org.springframework.boot.autoconfigure.validation;
|
||||
import javax.validation.Validator;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
|
||||
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
|
||||
import org.springframework.validation.beanvalidation.MethodValidationPostProcessor;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
@@ -34,7 +32,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@ExtendWith(ModifiedClassPathExtension.class)
|
||||
@ClassPathExclusions("hibernate-validator-*.jar")
|
||||
class ValidationAutoConfigurationWithoutValidatorTests {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user