Package org.codehaus.plexus.compiler.util.scan

Examples of org.codehaus.plexus.compiler.util.scan.StaleSourceScanner


  private boolean includeStale;

  public void execute() throws MojoExecutionException, MojoFailureException {

    SourceInclusionScanner scanner = includeStale
            ? new StaleSourceScanner(1024, Collections.singleton("**/*." + extension), Collections.<String>emptySet())
            : new SimpleSourceInclusionScanner(Collections.singleton("**/*." + extension), Collections.<String>emptySet());

    scanner.addSourceMapping(new SuffixMapping("." + extension, "." + extension));

    MustacheFactory mustacheFactory = new DefaultMustacheFactory();
View Full Code Here


    }

    protected SourceInclusionScanner getSourceInclusionScanner(boolean includeStale) {
        return includeStale
                ? new SimpleSourceInclusionScanner(Collections.singleton("**/*"), Collections.EMPTY_SET)
                : new StaleSourceScanner(1024);
    }
View Full Code Here

    {
        SourceInclusionScanner scanner = null;

        if ( testIncludes.isEmpty() && testExcludes.isEmpty() )
        {
            scanner = new StaleSourceScanner( staleMillis );
        }
        else
        {
            if ( testIncludes.isEmpty() )
            {
                testIncludes.add( "**/*.java" );
            }
            scanner = new StaleSourceScanner( staleMillis, testIncludes, testExcludes );
        }

        return scanner;
    }
View Full Code Here

    {
        SourceInclusionScanner scanner = null;

        if ( includes.isEmpty() && excludes.isEmpty() )
        {
            scanner = new StaleSourceScanner( staleMillis );
        }
        else
        {
            if ( includes.isEmpty() )
            {
                includes.add( "**/*.java" );
            }
            scanner = new StaleSourceScanner( staleMillis, includes, excludes );
        }

        return scanner;
    }
View Full Code Here

     */
    private Set excludes = new HashSet();

    protected SourceInclusionScanner getSourceInclusionScanner()
    {
        StaleSourceScanner scanner = null;

        if ( includes.isEmpty() )
        {
            includes.add( "**/*.java" );
        }

        if ( isForce() )
        {
            return new AllSourcesInclusionScanner( includes, excludes );
        }

        scanner = new StaleSourceScanner( getStaleMillis(), includes, excludes );
        if ( getTargetFiles() != null && getTargetFiles().size() > 0 )
        {
            for ( Iterator it = getTargetFiles().iterator() ; it.hasNext() ;)
            {
                String file = (String) it.next();
                scanner.addSourceMapping( new SingleTargetSourceMapping( ".java", file ) );
            }
        }
        else
        {
            scanner.addSourceMapping( new SuffixMapping( ".java", ".class" ) );
        }
        return scanner;
    }
View Full Code Here

        return aptSourceRoots;
    }

    protected SourceInclusionScanner getSourceInclusionScanner()
    {
        StaleSourceScanner scanner = null;

        if ( testIncludes.isEmpty() )
        {
            testIncludes.add( "**/*.java" );

        }
        if ( isForce() )
        {
            return new AllSourcesInclusionScanner( testIncludes, testExcludes );
        }
        scanner = new StaleSourceScanner( getStaleMillis(), testIncludes, testExcludes );
        if ( getTargetFiles() != null && getTargetFiles().size() > 0 )
        {
            for ( Iterator it = getTargetFiles().iterator() ; it.hasNext() ;)
            {
                String file = (String) it.next();
                scanner.addSourceMapping( new SingleTargetSourceMapping( ".java", file ) );
            }
        }
        else
        {
            scanner.addSourceMapping( new SuffixMapping( ".java", ".class" ) );
        }
        return scanner;
    }
View Full Code Here

    protected SourceInclusionScanner getSourceInclusionScanner(int staleMillis)
    {
        SourceInclusionScanner scanner = null;

        if (includes.isEmpty() && excludes.isEmpty()) {
            scanner = new StaleSourceScanner(staleMillis);
        } else {
            if (includes.isEmpty()) {
                includes.add("**/*.cs");
            }
            scanner = new StaleSourceScanner(staleMillis, includes, excludes);
        }

        return scanner;
    }
View Full Code Here

    {
        SourceInclusionScanner scanner = null;

        if ( includes.isEmpty() && excludes.isEmpty() )
        {
            scanner = new StaleSourceScanner( staleMillis );
        }
        else
        {
            if ( includes.isEmpty() )
            {
                includes.add( "**/*.java" );
            }
            scanner = new StaleSourceScanner( staleMillis, includes, excludes );
        }

        return scanner;
    }
View Full Code Here

    {
        getClassDirectory().mkdirs();

        try
        {
            SourceInclusionScanner scanner = new StaleSourceScanner( staleMillis, getIncludes(), excludes );
            if ( getTimestampDirectory().exists() )
            {
                scanner.addSourceMapping( new SingleTargetSourceMapping( ".class", getTimestampFile().getPath() ) );
            }
            else
            {
                scanner.addSourceMapping( new SuffixMapping( ".class", ".dummy" ) );
            }

            Set classes = scanner.getIncludedSources( getClassDirectory(), getTimestampDirectory() );

            if ( !classes.isEmpty() )
            {
                Set files = new HashSet();
                for ( Iterator i = classes.iterator(); i.hasNext(); )
View Full Code Here

     */
    private Set excludes = new HashSet();

    protected SourceInclusionScanner getSourceInclusionScanner()
    {
        StaleSourceScanner scanner = null;

        if ( includes.isEmpty() )
        {
            includes.add( "**/*.java" );
        }

        if ( isForce() )
        {
            return new AllSourcesInclusionScanner( includes, excludes );
        }

        scanner = new StaleSourceScanner( getStaleMillis(), includes, excludes );
        if ( getTargetFiles() != null && getTargetFiles().size() > 0 )
        {
            for ( Iterator it = getTargetFiles().iterator() ; it.hasNext() ;)
            {
                String file = (String) it.next();
                scanner.addSourceMapping( new SingleTargetSourceMapping( ".java", file ) );
            }
        }
        else
        {
            scanner.addSourceMapping( new SuffixMapping( ".java", ".class" ) );
        }
        return scanner;
    }
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.compiler.util.scan.StaleSourceScanner

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.