META-INF.archetype-post-generate.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of refcodes-archetype-alt-eventbus
Show all versions of refcodes-archetype-alt-eventbus
A minimum REFCODES.ORG enabled eventbus (publish and subscribe) driven
application. Get inspired by "https://bitbucket.org/funcodez".
import java.nio.file.Files
import java.nio.file.Path
import java.nio.file.Paths
Path gitIgnorePath = Paths.get(request.outputDirectory, request.artifactId, "gitignore");
if (Files.exists(gitIgnorePath)) {
Path targetPath = gitIgnorePath.getParent().resolve(".gitignore");
try {
Files.move(gitIgnorePath, targetPath);
} catch (Exception e) {
System.err.println("Encountered a <" + e.getClass().getName() + "> exception when trying to post processing the file to <.gitignore>: " + e.getMessage());
}
}
Path gitAttributesPath = Paths.get(request.outputDirectory, request.artifactId, "gitattributes");
if (Files.exists(gitAttributesPath)) {
Path targetPath = gitAttributesPath.getParent().resolve(".gitattributes");
try {
Files.move(gitAttributesPath, targetPath);
} catch (Exception e) {
System.err.println("Encountered a <" + e.getClass().getName() + "> exception when trying to post processing the file to <.gitattributes>: " + e.getMessage());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy