Examples of addSourceMapping()


Examples of org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner.addSourceMapping()

        //
        excludes.add("imports/**");

        SourceInclusionScanner scan = new SimpleSourceInclusionScanner(includes, excludes);

        scan.addSourceMapping(mapping);
        Set grammarFiles = scan.getIncludedSources(sourceDirectory, null);

        if (grammarFiles.isEmpty()) {
            if (getLog().isInfoEnabled()) {
                getLog().info("No grammars to process");
View Full Code Here

Examples of org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner.addSourceMapping()

    this.log = log;
  }

  public List<File> computeStaleSources(List<File> compileSourceRoots, Set<String> includes, Set<String> excludes, File outputDirectory, String inputFileSuffix, String outputFileSuffix, int staleMillis) throws MojoExecutionException {
    SourceInclusionScanner scanner = createSourceInclusionScanner(includes, excludes, inputFileSuffix, staleMillis);
    scanner.addSourceMapping(new SuffixMapping(inputFileSuffix, outputFileSuffix));
    log.debug("Searching for");
    Set<File> staleSources = new LinkedHashSet<File>();

    for (File rootFile : compileSourceRoots) {
      if (!rootFile.isDirectory()) {
View Full Code Here

Examples of org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner.addSourceMapping()

        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" ) );
            }
View Full Code Here

Examples of org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner.addSourceMapping()

            {
                scanner.addSourceMapping( new SingleTargetSourceMapping( ".class", getTimestampFile().getPath() ) );
            }
            else
            {
                scanner.addSourceMapping( new SuffixMapping( ".class", ".dummy" ) );
            }

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

            if ( !classes.isEmpty() )
View Full Code Here

Examples of org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner.addSourceMapping()

            }
            scanner = new SimpleSourceInclusionScanner( includes, excludes );
        }

        // Note: we shouldn't have to do this but this is a limitation of the Plexus SimpleSourceInclusionScanner
        scanner.addSourceMapping( new SuffixMapping( "dummy", "dummy" ) );

        return scanner;
    }

    private SourceInclusionScanner getExcludesScanner()
View Full Code Here

Examples of org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner.addSourceMapping()

        {
            scanner = new SimpleSourceInclusionScanner( excludes, Collections.EMPTY_SET );
        }

        // Note: we shouldn't have to do this but this is a limitation of the Plexus SimpleSourceInclusionScanner
        scanner.addSourceMapping( new SuffixMapping( "dummy", "dummy" ) );

        return scanner;
    }

    private Map computeFiles(SourceInclusionScanner scanner)
View Full Code Here

Examples of org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner.addSourceMapping()

        SourceInclusionScanner scanner = getSourceInclusionScanner(includeStale);

        SourceMapping mapping = new SuffixMapping(".clj", new HashSet(Arrays.asList(".clj", "__init.class")));

        scanner.addSourceMapping(mapping);

        final Set<File> sourceFiles;

        try {
            sourceFiles = scanner.getIncludedSources(basePath, targetPath);
View Full Code Here

Examples of org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner.addSourceMapping()

    protected Set<File> jxmlFilesToCompile(SourceMapping mapping) throws MojoExecutionException {
        Validate.isTrue(sourceDirectory.isDirectory(), sourceDirectory.getName() + " is not a directory");

        try {
            SourceInclusionScanner scanner = new StaleSourceScanner();
            scanner.addSourceMapping(mapping);
            return scanner.getIncludedSources(sourceDirectory, outputDirectory);
        } catch (InclusionScanException e) {
            throw new MojoExecutionException("Error scanning source root: \'" + sourceDirectory + "\'.", e);
        }
    }
View Full Code Here

Examples of org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner.addSourceMapping()

   
    SourceInclusionScanner scanner = new SimpleSourceInclusionScanner(includes, excludes);

    // Note: we must declare a dummy "source mapping", or the Plexus SimpleSourceInclusionScanner won't work
    // (as per http://maven.apache.org/plugins/maven-clover-plugin/2.4/xref/org/apache/maven/plugin/clover/CloverInstrumentInternalMojo.html )
    scanner.addSourceMapping( new SuffixMapping( "dummy", "dummy" ) );

    try {
      outputManifestFile.getParentFile().mkdirs();
      outputManifestFile.createNewFile(); // create it if it doesn't yet exist
    } catch (IOException e) {
View Full Code Here

Examples of org.codehaus.plexus.compiler.util.scan.StaleSourceScanner.addSourceMapping()

        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" ) );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.