Home / Class/ JarTypeFileSpec Class — spring-boot Architecture

JarTypeFileSpec Class — spring-boot Architecture

Architecture documentation for the JarTypeFileSpec class in JarTypeFileSpec.java from the spring-boot codebase.

Entity Profile

Source Code

build-plugin/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/JarTypeFileSpec.java lines 33–51

class JarTypeFileSpec implements Spec<File> {

	private static final Set<String> EXCLUDED_JAR_TYPES = Set.of("dependencies-starter", "development-tool");

	@Override
	public boolean isSatisfiedBy(File file) {
		try (JarFile jar = new JarFile(file)) {
			String jarType = jar.getManifest().getMainAttributes().getValue("Spring-Boot-Jar-Type");
			if (jarType != null && EXCLUDED_JAR_TYPES.contains(jarType)) {
				return false;
			}
		}
		catch (Exception ex) {
			// Continue
		}
		return true;
	}

}

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free