All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.archetype-post-generate.groovy Maven / Gradle / Ivy

Go to download

A minimum REFCODES.ORG enabled eventbus (publish and subscribe) driven application. Get inspired by "https://bitbucket.org/funcodez".

There is a newer version: 3.3.9
Show newest version
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