/** * Resources (stylesheets, images) etc are all stored in the * src/main/resources/reports directory. When the jar is deployed, they will * end up on the classpath. */ public void copyHTMLResourcesTo(final File targetDirectory) throws IOException { Pattern resourcePattern = allFilesInDirectory(resourceDirectory); FileResources fileResource = FileResources.from(resourceDirectory); Collection<String> reportResources = ResourceList.forResources(resourcePattern).list(); for (String resourcePath : reportResources) { if (fileResourceFromAJar(resourcePath)) { fileResource.copyResourceTo(resourcePath, targetDirectory); } else if (fileResourceFromPath(resourcePath)) { fileResource.copyResourceTo(resourcePath, targetDirectory); } } }
/** * Resources (stylesheets, images) etc are all stored in the * src/main/resources/reports directory. When the jar is deployed, they will * end up on the classpath. */ public void copyHTMLResourcesTo(final File targetDirectory) throws IOException { Pattern resourcePattern = allFilesInDirectory(resourceDirectory); FileResources fileResource = FileResources.from(resourceDirectory); Collection<String> reportResources = ResourceList.forResources(resourcePattern).list(); for (String resourcePath : reportResources) { if (fileResourceFromAJar(resourcePath)) { fileResource.copyResourceTo(resourcePath, targetDirectory); } else if (fileResourceFromPath(resourcePath)) { fileResource.copyResourceTo(resourcePath, targetDirectory); } } }