public void generateArchetypesFromGitRepoList(File file, File outputDir, List<String> dirs) throws IOException {
        File cloneParentDir = new File(outputDir, "../git-clones");
        if (cloneParentDir.exists()) {
            Files.recursiveDelete(cloneParentDir);
        }

        Properties properties = new Properties();
        try (FileInputStream is = new FileInputStream(file)) {
            properties.load(is);
        }

        for (Map.Entry<Object, Object> entry : properties.entrySet()) {
            LinkedList<String> values = new LinkedList<>(Arrays.asList(((String) entry.getValue()).split("\\|")));
            String gitrepo = values.removeFirst();
            String tag = values.isEmpty() ? null : values.removeFirst();
            generateArchetypeFromGitRepo(outputDir, dirs, cloneParentDir, (String)entry.getKey(), gitrepo, tag);
        }
    }
public void generateArchetypesFromGitRepoList ( File file , File outputDir , List < String > dirs ) throws IOException { File cloneParentDir = new File ( outputDir , "../git-clones" ) ; if ( cloneParentDir . exists ( ) ) { Files . recursiveDelete ( cloneParentDir ) ; } Properties properties = new Properties ( ) ; try ( FileInputStream is = new FileInputStream ( file ) ) { properties . load ( is ) ; } for ( Map . Entry < Object , Object > entry : properties . entrySet ( ) ) { LinkedList < String > values = new LinkedList < > ( Arrays . asList ( ( ( String ) entry . getValue ( ) ) . split ( "\\|" ) ) ) ; String gitrepo = values . removeFirst ( ) ; String tag = values . isEmpty ( ) ? null : values . removeFirst ( ) ; generateArchetypeFromGitRepo ( outputDir , dirs , cloneParentDir , ( String ) entry . getKey ( ) , gitrepo , tag ) ; } }
Iterates through all projects in the given properties file adn generate an archetype for it