class MultipleResourcesProjectContributor implements ProjectContributor {

	private final PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();

	private final String rootResource;

	private final Predicate<String> executable;

	/**
	 * Create a new instance with the {@code rootResource} to use to locate resources to
	 * copy to the project structure.
	 * @param rootResource the root resource path
	 * @see PathMatchingResourcePatternResolver#getResources(String)
	 */
	public MultipleResourcesProjectContributor(String rootResource) {
		this(rootResource, (filename) -> false);
	}

	public MultipleResourcesProjectContributor(String rootResource, Predicate<String> executable) {
		this.rootResource = StringUtils.trimTrailingCharacter(rootResource, '/');
		this.executable = executable;
	}

	@Override
	public void contribute(Path projectRoot) throws IOException {<FILL_FUNCTION_BODY>}

	private String extractFileName(URI root, URI resource) {
		String candidate = resource.toString().substring(root.toString().length());
		return StringUtils.trimLeadingCharacter(candidate, '/');
	}

}

		Resource root = this.resolver.getResource(this.rootResource);
		Resource[] resources = this.resolver.getResources(this.rootResource + "/**");
		for (Resource resource : resources) {
			if (resource.isReadable()) {
				String filename = extractFileName(root.getURI(), resource.getURI());
				Path output = projectRoot.resolve(filename);
				if (!Files.exists(output)) {
					Files.createDirectories(output.getParent());
					Files.createFile(output);
				}
				FileCopyUtils.copy(resource.getInputStream(), Files.newOutputStream(output));
				// TODO Set executable using NIO
				output.toFile().setExecutable(this.executable.test(filename));
			}
		}
	
<no_super_class>