.importDirectory(pomFile.getBuildOutputDirectory()).as(JavaArchive.class);
archive = archive.merge(classes);
}
JarPluginConfiguration jarConfiguration = new JarPluginConfiguration(pomFile);
// add resources
for (Resource resource : pomFile.getResources()) {
archive.addAsResource(resource.getSource(), resource.getTargetPath());
}
// set manifest
Manifest manifest = jarConfiguration.getArchiveConfiguration().asManifest();
archive.setManifest(new ManifestAsset(manifest));
// construct new archive via applying includes/excludes
archive = ArchiveFilteringUtils.filterArchiveContent(archive, JavaArchive.class, jarConfiguration.getIncludes(),
jarConfiguration.getExcludes());
return this;
}