class WarPackagingWebStarterBuildCustomizer implements BuildCustomizer<Build> {

	private final InitializrMetadata metadata;

	private final BuildMetadataResolver buildMetadataResolver;

	public WarPackagingWebStarterBuildCustomizer(InitializrMetadata metadata) {
		this.metadata = metadata;
		this.buildMetadataResolver = new BuildMetadataResolver(metadata);
	}

	@Override
	public void customize(Build build) {<FILL_FUNCTION_BODY>}

	@Override
	public int getOrder() {
		return Ordered.LOWEST_PRECEDENCE - 10;
	}

	private Dependency determineWebDependency(InitializrMetadata metadata) {
		Dependency web = metadata.getDependencies().get("web");
		return (web != null) ? web : Dependency.createSpringBootStarter("web");
	}

}

		if (!this.buildMetadataResolver.hasFacet(build, "web")) {
			// Need to be able to bootstrap the web app
			Dependency dependency = determineWebDependency(this.metadata);
			build.dependencies().add(dependency.getId(), MetadataBuildItemMapper.toDependency(dependency));
		}
		// Add the tomcat starter in provided scope
		Dependency tomcat = Dependency.createSpringBootStarter("tomcat");
		tomcat.setScope(Dependency.SCOPE_PROVIDED);
		build.dependencies().add("tomcat", MetadataBuildItemMapper.toDependency(tomcat));
	
<no_super_class>