Skip to content

Instantly share code, notes, and snippets.

@BenjaminKlatt
Created October 12, 2020 21:06
Show Gist options
  • Save BenjaminKlatt/f3eb4017c3c110a528efea32f842dba5 to your computer and use it in GitHub Desktop.
Save BenjaminKlatt/f3eb4017c3c110a528efea32f842dba5 to your computer and use it in GitHub Desktop.
ArchUnit Import Options
@AnalyzeClasses(
packages = " de.viadee.architecture.archunit",
importOptions = {
ImportOption.DoNotIncludeTests.class,
ImportOption.DoNotIncludeJars.class,
ImportOption.DoNotIncludeArchives.class })
public class MyTest {
...
}
JavaClasses importedClasses =
new ClassFileImporter()
.withImportOption(ImportOption.Predefined.DO_NOT_INCLUDE_TESTS)
.withImportOption(ImportOption.Predefined.DO_NOT_INCLUDE_JARS)
.withImportOption(ImportOption.Predefined.DO_NOT_INCLUDE_ARCHIVES)
.importClasspath();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment