Package org.apache.maven.shared.model.fileset.util

Examples of org.apache.maven.shared.model.fileset.util.FileSetManager


        File workingDirectory = workingDirectoryService.getWorkingDirectory( project );

        if ( workingDirectory.exists() )
        {
            FileSetManager fileSetManager = new FileSetManager();
            FileSet fileSet = new FileSet();
            fileSet.setDirectory( workingDirectory.getPath() );
            fileSet.addInclude( "**/**" );
            // TODO : this with a configuration option somewhere ?
            fileSet.setFollowSymlinks( false );
            fileSetManager.delete( fileSet );
        }
    }
View Full Code Here


            fileSet.setIncludes( set.getIncludes() );

            fileSet.setExcludes( set.getExcludes() );
            fileSet.setUseDefaultExcludes( true );

            FileSetManager fsm = new FileSetManager( logger );
            String[] files = fsm.getIncludedFiles( fileSet );

            // if we don't have anything to process, let's just skip all of this mess.
            if ( ( files == null ) || ( files.length == 0 ) )
            {
                logger.info( "No files selected for line-ending conversion or filtering. Skipping: " + fileSet.getDirectory() );
View Full Code Here

        if ( includes.isEmpty() &&  excludes.isEmpty() )
        {
            return;
        }

        FileSetManager fileSetManager = new FileSetManager();

        FileSet fileset = new FileSet();
        fileset.setDirectory( checkoutDirectory.getAbsolutePath() );
        fileset.setIncludes( excludes );//revert the order to do the delete
        fileset.setExcludes( includes );
        fileset.setUseDefaultExcludes( false );

        try
        {
            fileSetManager.delete( fileset );
        }
        catch ( IOException e )
        {
            throw new MojoExecutionException( "Error found while cleaning up output directory base on excludes/includes configurations.", e );
        }
View Full Code Here

            }
        }

        if(wsdlsets != null && wsdlsets.length > 0)
        {
            FileSetManager fileSetManager = new FileSetManager();
            for(FileSet wsdlset : wsdlsets)
            {
                String[] includedFiles = fileSetManager.getIncludedFiles(wsdlset);
                for(String includedFile : includedFiles)
                {
                    File wsdl = new File(wsdlset.getDirectory() + "/" + includedFile);
                    wsdl2android.addWSDL(wsdl);
                }
View Full Code Here

    }
  }

  private String[] getIncludedFiles(String absPath, String[] excludes,
      String[] includes) {
    FileSetManager fileSetManager = new FileSetManager();
    FileSet fs = new FileSet();
    fs.setDirectory(absPath);
    fs.setFollowSymlinks(false);
   
    //exclude imports directory since it has already been compiled.
    if (imports != null) {
      String importExclude = null;

      for (String importFile : this.imports) {
        File file = new File(importFile);

        if (file.isDirectory()) {
          importExclude = file.getName() + "/**";
        } else if (file.isFile()) {
          importExclude = "**/" + file.getName();
        }

        fs.addExclude(importExclude);
      }
    }
    for (String include : includes) {
      fs.addInclude(include);
    }
    for (String exclude : excludes) {
      fs.addExclude(exclude);
    }
    return fileSetManager.getIncludedFiles(fs);
  }
View Full Code Here

    save(loader);
  }

  private void load(final ExecFileLoader loader)
      throws MojoExecutionException {
    final FileSetManager fileSetManager = new FileSetManager(getLog());
    for (final FileSet fileSet : fileSets) {
      for (final String includedFilename : fileSetManager
          .getIncludedFiles(fileSet)) {
        final File inputFile = new File(fileSet.getDirectory(),
            includedFilename);
        if (inputFile.isDirectory()) {
          continue;
View Full Code Here

        File workingDirectory = workingDirectoryService.getWorkingDirectory( project );

        if ( workingDirectory.exists() )
        {
            FileSetManager fileSetManager = new FileSetManager();
            FileSet fileSet = new FileSet();
            fileSet.setDirectory( workingDirectory.getPath() );
            fileSet.addInclude( "**/**" );
            // TODO : this with a configuration option somewhere ?
            fileSet.setFollowSymlinks( false );
            fileSetManager.delete( fileSet );
        }
    }
View Full Code Here

        File workingDirectory = workingDirectoryService.getWorkingDirectory( project );

        if ( workingDirectory.exists() )
        {
            FileSetManager fileSetManager = new FileSetManager();
            FileSet fileSet = new FileSet();
            fileSet.setDirectory( workingDirectory.getPath() );
            fileSet.addInclude( "**/**" );
            // TODO : this with a configuration option somewhere ?
            fileSet.setFollowSymlinks( false );
            fileSetManager.delete( fileSet );
        }
    }
View Full Code Here

    }
  }

  private String[] getIncludedFiles(String absPath, String[] excludes,
      String[] includes) {
    FileSetManager fileSetManager = new FileSetManager();
    FileSet fs = new FileSet();
    fs.setDirectory(absPath);
    fs.setFollowSymlinks(false);
    for (String include : includes) {
      fs.addInclude(include);
    }
    for (String exclude : excludes) {
      fs.addExclude(exclude);
    }
    return fileSetManager.getIncludedFiles(fs);
  }
View Full Code Here

    if(coverageFiles.getIncludes().size() == 0){
      getLog().info("No coverage includes specified, using the default (**/coverage.ser)");
      coverageFiles.setIncludes(asList("**/coverage.ser"));
    }

    FileSetManager fileSetManager = new FileSetManager();

    Set<String> includedFiles = new HashSet<String>(
        asList(fileSetManager.getIncludedFiles(coverageFiles)));
    Set<String> excludedFiles = new HashSet<String>(
        asList(fileSetManager.getExcludedFiles(coverageFiles)));
    includedFiles.removeAll(excludedFiles);

   
    if(includedFiles.size() == 0){
      getLog().info("No files found to merge.");
View Full Code Here

TOP

Related Classes of org.apache.maven.shared.model.fileset.util.FileSetManager

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.