Package com.google.code.mojo.license.util

Examples of com.google.code.mojo.license.util.Selection


        return properties;
    }

    protected final Document[] selectedDocuments()
    {
        Selection selection = newSelection(basedir, includes, buildExcludes(), useDefaultExcludes);
        debug("From: %s", basedir);
        debug("Including: %s", deepToString(selection.getIncluded()));
        debug("Excluding: %s", deepToString(selection.getExcluded()));
        Document[] documents = newDocumentFactory(basedir, buildMapping(), encoding).wrap(selection.getSelectedFiles());
        for(Document document : documents)
        {
            debug("Selected file: %s [type=%s]", document.getFile(), document.getDocumentType());
        }
        return documents;
View Full Code Here


        return properties;
    }

    protected final Document[] selectedDocuments()
    {
        Selection selection = newSelection(basedir, includes, buildExcludes(), useDefaultExcludes);
        debug("From: %s", basedir);
        debug("Including: %s", deepToString(selection.getIncluded()));
        debug("Excluding: %s", deepToString(selection.getExcluded()));
        Document[] documents = newDocumentFactory(basedir, buildMapping(), encoding).wrap(selection.getSelectedFiles());
        for(Document document : documents)
        {
            debug("Selected file: %s [type=%s]", document.getFile(), document.getDocumentType());
        }
        return documents;
View Full Code Here

        return properties;
    }

    protected final Document[] selectedDocuments()
    {
        Selection selection = newSelection(basedir, includes, buildExcludes(), useDefaultExcludes);
        debug("From: %s", basedir);
        debug("Including: %s", deepToString(selection.getIncluded()));
        debug("Excluding: %s", deepToString(selection.getExcluded()));
        Document[] documents = newDocumentFactory(basedir, buildMapping()).wrap(selection.getSelectedFiles());
        for(Document document : documents)
        {
            debug("Selected file: %s [type=%s]", document.getFile(), document.getDocumentType());
        }
        return documents;
View Full Code Here

        mojo.execute();
    }

    @Test
    public void test_selection() throws Exception {
        Selection sel = Selection.newSelection(new File("."), null, null, true);
        assertEquals(sel.getBasedir(), new File("."));
        assertTrue(sel.getExcluded().length >= 1);
        assertEquals(sel.getIncluded(), new String[]{"**"});
    }
View Full Code Here

        return properties;
    }

    protected final Document[] selectedDocuments()
    {
        Selection selection = newSelection(basedir, includes, buildExcludes(), useDefaultExcludes);
        debug("From: %s", basedir);
        debug("Including: %s", deepToString(selection.getIncluded()));
        debug("Excluding: %s", deepToString(selection.getExcluded()));
        Document[] documents = newDocumentFactory(basedir, buildMapping()).wrap(selection.getSelectedFiles());
        for(Document document : documents)
        {
            debug("Selected file: %s [type=%s]", document.getFile(), document.getDocumentType());
        }
        return documents;
View Full Code Here

        assertEquals(sel.getIncluded(), new String[]{"**"});
    }

    @Test
    public void test_selection_2() throws Exception {
        Selection sel = Selection.newSelection(new File("src/test/project"), new String[]{"*"}, new String[]{"documents/**", "target/*", ".svn/*"}, false);
        assertEquals(sel.getBasedir(), new File("src/test/project"));
        assertEquals(sel.getExcluded(), new String[]{"documents/**", "target/*", ".svn/*"});
        assertEquals(sel.getIncluded(), new String[]{"*"});

        assertEquals(sel.getSelectedFiles(), new String[]{"pom.xml"});
        assertEquals(sel.getSelectedFiles(), new String[]{"pom.xml"});
    }
View Full Code Here

        }
        return props;
    }

    protected final String[] listSelectedFiles() throws MojoFailureException {
        Selection selection = new Selection(basedir, includes, buildExcludes(), useDefaultExcludes);
        debug("From: %s", basedir);
        debug("Including: %s", deepToString(selection.getIncluded()));
        debug("Excluding: %s", deepToString(selection.getExcluded()));
        return selection.getSelectedFiles();
    }
View Full Code Here

        }
        return properties;
    }

    protected final Document[] selectedDocuments() throws MojoFailureException {
        Selection selection = new Selection(basedir, includes, buildExcludes(), useDefaultExcludes);
        debug("From: %s", basedir);
        debug("Including: %s", deepToString(selection.getIncluded()));
        debug("Excluding: %s", deepToString(selection.getExcluded()));
        Document[] documents = new DocumentFactory(basedir, buildMapping(), buildHeaderDefinitions(), encoding, keywords)
                .createDocuments(selection.getSelectedFiles());
        for (Document document : documents) {
            debug("Selected file: %s [header style: %s]", document.getFile(), document.getHeaderDefinition());
        }
        return documents;
    }
View Full Code Here

        mojo.execute();
    }

    @Test
    public void test_selection() throws Exception {
        Selection sel = Selection.newSelection(new File("."), null, null, true);
        assertEquals(sel.getBasedir(), new File("."));
        assertTrue(sel.getExcluded().length >= 1);
        assertEquals(sel.getIncluded(), new String[]{"**"});
    }
View Full Code Here

        assertEquals(sel.getIncluded(), new String[]{"**"});
    }

    @Test
    public void test_selection_2() throws Exception {
        Selection sel = Selection.newSelection(new File("src/test/project"), new String[]{"*"}, new String[]{"documents/**", "target/*", ".svn/*", "*.iml"}, false);
        assertEquals(sel.getBasedir(), new File("src/test/project"));
        assertEquals(sel.getExcluded(), new String[]{"documents/**", "target/*", ".svn/*", "*.iml"});
        assertEquals(sel.getIncluded(), new String[]{"*"});

        assertEquals(sel.getSelectedFiles(), new String[]{"pom.xml"});
        assertEquals(sel.getSelectedFiles(), new String[]{"pom.xml"});
    }
View Full Code Here

TOP

Related Classes of com.google.code.mojo.license.util.Selection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.