docs: @Override
     public void execute() throws BuildException
     {
        try
        {
           DirectoryScanner dsc = fileset.getDirectoryScanner(getProject());
           File baseDir = dsc.getBasedir();
           String[] files = dsc.getIncludedFiles();
           for (int i = 0; i < files.length; i++)
           {
              String currentFile = files[i];
              File moduleXml = new File(baseDir, currentFile);
              String modulePath = currentFile.substring(0, currentFile.lastIndexOf(File.separator));
              File libDir = new File(targetDir, modulePath);
              File destFile = new File(targetDir, currentFile);
              System.out.println("Processing descriptor for module " + modulePath);
              System.out.println("* Source module descriptor: " + moduleXml);
              System.out.println("* Destination module descriptor: " + destFile);
              String c = readFileContents(moduleXml);
              if (libDir.exists())
              {
                 String[] libs = libDir.list(new FilenameFilter()
                 {
                    @Override
                    public boolean accept(File dir, String name)
                    {
                       return name.endsWith(".jar") || name.endsWith(".ear") || name.endsWith(".sar")
                             || name.endsWith(".war");
                    }
                 });
                 BufferedWriter out = new BufferedWriter(new FileWriter(destFile));
                 out.write(updateContents(c, libs));
                 out.close();
              }
              else
              {
                 libDir.mkdirs();
                 BufferedWriter out = new BufferedWriter(new FileWriter(destFile));
                 out.write(c);
                 out.close();
              }
           }
        }
        catch (Exception e)
        {
           e.printStackTrace();
           throw new BuildException(e);
        }
     }