com.github.fridujo.junit.extension.classpath.ModifiedClasspath Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of classpath-junit-extension Show documentation
Show all versions of classpath-junit-extension Show documentation
JUnit5 extension to run tests with classpath customizations
The newest version!
package com.github.fridujo.junit.extension.classpath;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.junit.jupiter.api.extension.ExtendWith;
/**
* Modify the current classpath before running the marked test.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Documented
@ExtendWith(ModifiedClasspathExtension.class)
public @interface ModifiedClasspath {
/**
* Will remove Jars matching the given GAV (groupId:artifactId:version).
*
* Gav can have the following structures:
*
* - artifactId : aka JAR name
* - groupId:artifactId
* - groupId:artifactId:version
*
*
* If the matching Jars are in a Maven repository, their dependencies (transitive or not) will also be excluded.
*/
String[] excludeGavs() default {};
/**
* Will remove Jars matching the given GAV (groupId:artifactId:version).
*
* Gav can have the following structures:
*
* - artifactId: aka JAR name
* - groupId:artifactId
* - groupId:artifactId:version
*
*
*
* In opposition to {@link #excludeGavs()}, their will be no attempt to list and exclude dependencies.
*/
String[] excludeJars() default {};
}