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

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


   
    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

     */
    private Set searchNodeFiles() throws MojoExecutionException {
        final SuffixMapping mapping    = new SuffixMapping(".java", ".java");
        final SuffixMapping mappingCAP = new SuffixMapping(".JAVA", ".JAVA");
        final SourceInclusionScanner scanner = new StaleSourceScanner(staleMillis);
        scanner.addSourceMapping(mapping);
        scanner.addSourceMapping(mappingCAP);
        File directory = new File(nodeDirectory);
        if (nodePackage!=null && nodePackage.trim().length()!=0) {
            directory = new File(directory, nodePackage.replace('.', '/'));
        }
View Full Code Here

    private Set searchNodeFiles() throws MojoExecutionException {
        final SuffixMapping mapping    = new SuffixMapping(".java", ".java");
        final SuffixMapping mappingCAP = new SuffixMapping(".JAVA", ".JAVA");
        final SourceInclusionScanner scanner = new StaleSourceScanner(staleMillis);
        scanner.addSourceMapping(mapping);
        scanner.addSourceMapping(mappingCAP);
        File directory = new File(nodeDirectory);
        if (nodePackage!=null && nodePackage.trim().length()!=0) {
            directory = new File(directory, nodePackage.replace('.', '/'));
        }
        if (!directory.isDirectory()) {
View Full Code Here

    {
        final String        extCAP     = ext.toUpperCase();
        final SuffixMapping mapping    = new SuffixMapping(ext,    ext);
        final SuffixMapping mappingCAP = new SuffixMapping(extCAP, extCAP);
        final SourceInclusionScanner scanner = new StaleSourceScanner(staleMillis);
        scanner.addSourceMapping(mapping);
        scanner.addSourceMapping(mappingCAP);
        final File outDir = new File(timestampDirectory);
        try {
            return scanner.getIncludedSources(sourceDir, outDir);
        } catch (InclusionScanException e) {
View Full Code Here

        final String        extCAP     = ext.toUpperCase();
        final SuffixMapping mapping    = new SuffixMapping(ext,    ext);
        final SuffixMapping mappingCAP = new SuffixMapping(extCAP, extCAP);
        final SourceInclusionScanner scanner = new StaleSourceScanner(staleMillis);
        scanner.addSourceMapping(mapping);
        scanner.addSourceMapping(mappingCAP);
        final File outDir = new File(timestampDirectory);
        try {
            return scanner.getIncludedSources(sourceDir, outDir);
        } catch (InclusionScanException e) {
            throw new MojoExecutionException("Error scanning source root \"" + sourceDir.getPath() +
View Full Code Here

        }
        SourceInclusionScanner scanner = getSourceInclusionScanner( inputFileEnding );

        SourceMapping mapping = getSourceMapping( compilerConfiguration, compiler );

        scanner.addSourceMapping( mapping );

        Set<File> compileSources = new HashSet<File>();

        for ( String sourceRoot : getCompileSourceRoots() )
        {
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.