Java Doc for ExecuteOn.java in  » Build » ANT » org » apache » tools » ant » taskdefs » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Build » ANT » org.apache.tools.ant.taskdefs 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.tools.ant.taskdefs.ExecTask
   org.apache.tools.ant.taskdefs.ExecuteOn

All known Subclasses:   org.apache.tools.ant.taskdefs.Transform,  org.apache.tools.ant.taskdefs.optional.unix.AbstractAccessTask,  org.apache.tools.ant.taskdefs.optional.windows.Attrib,  org.apache.tools.ant.taskdefs.Chmod,
ExecuteOn
public class ExecuteOn extends ExecTask (Code)
Executes a given command, supplying a set of files as arguments.
since:
   Ant 1.2

Inner Class :public static class FileDirBoth extends EnumeratedAttribute

Field Summary
protected  FiledestDir
    
protected  Vectorfilesets
    
protected  FileNameMappermapper
    
protected  MappermapperElement
    
protected  Commandline.MarkersrcFilePos
    
protected  booleansrcIsFirst
    
protected  Commandline.MarkertargetFilePos
    
protected  Stringtype
    


Method Summary
public  voidadd(ResourceCollection rc)
     Add a collection of resources upon which to operate.
public  voidadd(FileNameMapper fileNameMapper)
     Add a nested FileNameMapper.
public  voidaddDirset(DirSet set)
     Add a set of directories upon which to operate.
public  voidaddFilelist(FileList list)
     Add a list of source files upon which to operate.
public  voidaddFileset(FileSet set)
     Add a set of files upon which to operate.
protected  voidcheckConfiguration()
     Check the configuration of this ExecuteOn instance.
protected  ExecuteStreamHandlercreateHandler()
     Create the ExecuteStreamHandler instance that will be used during execution.
public  MappercreateMapper()
     Create a nested Mapper element to use for mapping source files to target files.
public  Commandline.MarkercreateSrcfile()
     Create a placeholder indicating where on the command line the name of the source file should be inserted.
public  Commandline.MarkercreateTargetfile()
     Create a placeholder indicating where on the command line the name of the target file should be inserted.
protected  String[]getCommandline(String[] srcFiles, File[] baseDirs)
     Construct the command line for parallel execution.
Parameters:
  srcFiles - The filenames to add to the commandline.
Parameters:
  baseDirs - filenames are relative to this dir.
protected  String[]getCommandline(String srcFile, File baseDir)
     Construct the command line for serial execution.
Parameters:
  srcFile - The filename to add to the commandline.
Parameters:
  baseDir - filename is relative to this dir.
protected  String[]getDirs(File baseDir, DirectoryScanner ds)
     Return the list of Directories from this DirectoryScanner that should be included on the command line.
Parameters:
  baseDir - the File base directory.
Parameters:
  ds - the DirectoryScanner to use for file scanning.
protected  String[]getFiles(File baseDir, DirectoryScanner ds)
     Return the list of files from this DirectoryScanner that should be included on the command line.
Parameters:
  baseDir - the File base directory.
Parameters:
  ds - the DirectoryScanner to use for file scanning.
protected  String[]getFilesAndDirs(FileList list)
     Return the list of files or directories from this FileList that should be included on the command line.
Parameters:
  list - the FileList to check.
protected  voidrunExec(Execute exe)
     Run the specified Execute object.
protected  voidrunParallel(Execute exe, Vector fileNames, Vector baseDirs)
     Run the command in "parallel" mode, making sure that at most maxParallel sourcefiles get passed on the command line.
public  voidsetAddsourcefile(boolean b)
     Set whether to send the source file name on the command line.
public  voidsetDest(File destDir)
     Specify the directory where target files are to be placed.
public  voidsetForce(boolean b)
     Set whether to bypass timestamp comparisons for target files.
public  voidsetForwardslash(boolean forwardSlash)
     Set whether the source and target file names on Windows and OS/2 must use the forward slash as file separator.
public  voidsetIgnoremissing(boolean b)
     Set whether to ignore nonexistent files from filelists.
public  voidsetMaxParallel(int max)
     Limit the command line length by passing at maximum this many sourcefiles at once to the command.
public  voidsetParallel(boolean parallel)
     Set whether to execute in parallel mode. If true, run the command only once, appending all files as arguments. If false, command will be executed once for every file.
public  voidsetRelative(boolean relative)
     Set whether the filenames should be passed on the command line as absolute or relative pathnames.
public  voidsetSkipEmptyFilesets(boolean skip)
     Set whether empty filesets will be skipped.
public  voidsetType(FileDirBoth type)
     Set whether the command works only on files, directories or both.
public  voidsetVerbose(boolean b)
     Set whether to operate in verbose mode.
protected  voidsetupRedirector()
     Set up the I/O Redirector.

Field Detail
destDir
protected File destDir(Code)



filesets
protected Vector filesets(Code)



mapper
protected FileNameMapper mapper(Code)



mapperElement
protected Mapper mapperElement(Code)



srcFilePos
protected Commandline.Marker srcFilePos(Code)



srcIsFirst
protected boolean srcIsFirst(Code)
Has <srcfile> been specified before <targetfile>



targetFilePos
protected Commandline.Marker targetFilePos(Code)



type
protected String type(Code)





Method Detail
add
public void add(ResourceCollection rc)(Code)
Add a collection of resources upon which to operate.
Parameters:
  rc - resource collection to add.
since:
   Ant 1.7



add
public void add(FileNameMapper fileNameMapper)(Code)
Add a nested FileNameMapper.
Parameters:
  fileNameMapper - the mapper to add.
since:
   Ant 1.6.3



addDirset
public void addDirset(DirSet set)(Code)
Add a set of directories upon which to operate.
Parameters:
  set - the DirSet to add.
since:
   Ant 1.6



addFilelist
public void addFilelist(FileList list)(Code)
Add a list of source files upon which to operate.
Parameters:
  list - the FileList to add.



addFileset
public void addFileset(FileSet set)(Code)
Add a set of files upon which to operate.
Parameters:
  set - the FileSet to add.



checkConfiguration
protected void checkConfiguration()(Code)
Check the configuration of this ExecuteOn instance.



createHandler
protected ExecuteStreamHandler createHandler() throws BuildException(Code)
Create the ExecuteStreamHandler instance that will be used during execution. ExecuteStreamHandler.
throws:
  BuildException - on error.



createMapper
public Mapper createMapper() throws BuildException(Code)
Create a nested Mapper element to use for mapping source files to target files. Mapper.
throws:
  BuildException - if more than one mapper is defined.



createSrcfile
public Commandline.Marker createSrcfile()(Code)
Create a placeholder indicating where on the command line the name of the source file should be inserted. Commandline.Marker.



createTargetfile
public Commandline.Marker createTargetfile()(Code)
Create a placeholder indicating where on the command line the name of the target file should be inserted. Commandline.Marker.



getCommandline
protected String[] getCommandline(String[] srcFiles, File[] baseDirs)(Code)
Construct the command line for parallel execution.
Parameters:
  srcFiles - The filenames to add to the commandline.
Parameters:
  baseDirs - filenames are relative to this dir. the command line in the form of a String[].



getCommandline
protected String[] getCommandline(String srcFile, File baseDir)(Code)
Construct the command line for serial execution.
Parameters:
  srcFile - The filename to add to the commandline.
Parameters:
  baseDir - filename is relative to this dir. the command line in the form of a String[].



getDirs
protected String[] getDirs(File baseDir, DirectoryScanner ds)(Code)
Return the list of Directories from this DirectoryScanner that should be included on the command line.
Parameters:
  baseDir - the File base directory.
Parameters:
  ds - the DirectoryScanner to use for file scanning. a String[] containing the directory names.



getFiles
protected String[] getFiles(File baseDir, DirectoryScanner ds)(Code)
Return the list of files from this DirectoryScanner that should be included on the command line.
Parameters:
  baseDir - the File base directory.
Parameters:
  ds - the DirectoryScanner to use for file scanning. a String[] containing the filenames.



getFilesAndDirs
protected String[] getFilesAndDirs(FileList list)(Code)
Return the list of files or directories from this FileList that should be included on the command line.
Parameters:
  list - the FileList to check. a String[] containing the directory names.
since:
   Ant 1.6.2



runExec
protected void runExec(Execute exe) throws BuildException(Code)
Run the specified Execute object.
Parameters:
  exe - the Execute instance representing the external process.
throws:
  BuildException - on error



runParallel
protected void runParallel(Execute exe, Vector fileNames, Vector baseDirs) throws IOException, BuildException(Code)
Run the command in "parallel" mode, making sure that at most maxParallel sourcefiles get passed on the command line.
Parameters:
  exe - the Executable to use.
Parameters:
  fileNames - the Vector of filenames.
Parameters:
  baseDirs - the Vector of base directories corresponding to fileNames.
throws:
  IOException - on I/O errors.
throws:
  BuildException - on other errors.
since:
   Ant 1.6



setAddsourcefile
public void setAddsourcefile(boolean b)(Code)
Set whether to send the source file name on the command line.

Defaults to true.
Parameters:
  b - whether to add the source file to the command line.
since:
   Ant 1.6




setDest
public void setDest(File destDir)(Code)
Specify the directory where target files are to be placed.
Parameters:
  destDir - the File object representing the destination directory.



setForce
public void setForce(boolean b)(Code)
Set whether to bypass timestamp comparisons for target files.
Parameters:
  b - whether to bypass timestamp comparisons.
since:
   Ant 1.6.3



setForwardslash
public void setForwardslash(boolean forwardSlash)(Code)
Set whether the source and target file names on Windows and OS/2 must use the forward slash as file separator.
Parameters:
  forwardSlash - whether the forward slash will be forced.



setIgnoremissing
public void setIgnoremissing(boolean b)(Code)
Set whether to ignore nonexistent files from filelists.
Parameters:
  b - whether to ignore missing files.
since:
   Ant 1.6.2



setMaxParallel
public void setMaxParallel(int max)(Code)
Limit the command line length by passing at maximum this many sourcefiles at once to the command.

Set to <= 0 for unlimited - this is the default.


Parameters:
  max - int maximum number of sourcefilespassed to the executable.
since:
   Ant 1.6



setParallel
public void setParallel(boolean parallel)(Code)
Set whether to execute in parallel mode. If true, run the command only once, appending all files as arguments. If false, command will be executed once for every file. Defaults to false.
Parameters:
  parallel - whether to run in parallel.



setRelative
public void setRelative(boolean relative)(Code)
Set whether the filenames should be passed on the command line as absolute or relative pathnames. Paths are relative to the base directory of the corresponding fileset for source files or the dest attribute for target files.
Parameters:
  relative - whether to pass relative pathnames.



setSkipEmptyFilesets
public void setSkipEmptyFilesets(boolean skip)(Code)
Set whether empty filesets will be skipped. If true and no source files have been found or are newer than their corresponding target files, the command will not be run.
Parameters:
  skip - whether to skip empty filesets.



setType
public void setType(FileDirBoth type)(Code)
Set whether the command works only on files, directories or both.
Parameters:
  type - a FileDirBoth EnumeratedAttribute.



setVerbose
public void setVerbose(boolean b)(Code)
Set whether to operate in verbose mode. If true, a verbose summary will be printed after execution.
Parameters:
  b - whether to operate in verbose mode.
since:
   Ant 1.6



setupRedirector
protected void setupRedirector()(Code)
Set up the I/O Redirector.



Fields inherited from org.apache.tools.ant.taskdefs.ExecTask
protected Commandline cmdl(Code)(Java Doc)
protected boolean failOnError(Code)(Java Doc)
protected boolean newEnvironment(Code)(Java Doc)
protected Redirector redirector(Code)(Java Doc)
protected RedirectorElement redirectorElement(Code)(Java Doc)

Methods inherited from org.apache.tools.ant.taskdefs.ExecTask
public void addConfiguredRedirector(RedirectorElement redirectorElement)(Code)(Java Doc)
public void addEnv(Environment.Variable var)(Code)(Java Doc)
protected void checkConfiguration() throws BuildException(Code)(Java Doc)
public Commandline.Argument createArg()(Code)(Java Doc)
protected ExecuteStreamHandler createHandler() throws BuildException(Code)(Java Doc)
protected ExecuteWatchdog createWatchdog() throws BuildException(Code)(Java Doc)
public void execute() throws BuildException(Code)(Java Doc)
public boolean getResolveExecutable()(Code)(Java Doc)
protected boolean isValidOs()(Code)(Java Doc)
protected void logFlush()(Code)(Java Doc)
protected void maybeSetResultPropertyValue(int result)(Code)(Java Doc)
protected Execute prepareExec() throws BuildException(Code)(Java Doc)
protected String resolveExecutable(String exec, boolean mustSearchPath)(Code)(Java Doc)
protected void runExec(Execute exe) throws BuildException(Code)(Java Doc)
final protected void runExecute(Execute exe) throws IOException(Code)(Java Doc)
public void setAppend(boolean append)(Code)(Java Doc)
public void setCommand(Commandline cmdl)(Code)(Java Doc)
public void setDir(File d)(Code)(Java Doc)
public void setError(File error)(Code)(Java Doc)
public void setErrorProperty(String errorProperty)(Code)(Java Doc)
public void setExecutable(String value)(Code)(Java Doc)
public void setFailIfExecutionFails(boolean flag)(Code)(Java Doc)
public void setFailonerror(boolean fail)(Code)(Java Doc)
public void setInput(File input)(Code)(Java Doc)
public void setInputString(String inputString)(Code)(Java Doc)
public void setLogError(boolean logError)(Code)(Java Doc)
public void setNewenvironment(boolean newenv)(Code)(Java Doc)
public void setOs(String os)(Code)(Java Doc)
public void setOsFamily(String osFamily)(Code)(Java Doc)
public void setOutput(File out)(Code)(Java Doc)
public void setOutputproperty(String outputProp)(Code)(Java Doc)
public void setResolveExecutable(boolean resolveExecutable)(Code)(Java Doc)
public void setResultProperty(String resultProperty)(Code)(Java Doc)
public void setSearchPath(boolean searchPath)(Code)(Java Doc)
public void setSpawn(boolean spawn)(Code)(Java Doc)
public void setTimeout(Long value)(Code)(Java Doc)
public void setTimeout(Integer value)(Code)(Java Doc)
public void setVMLauncher(boolean vmLauncher)(Code)(Java Doc)
protected void setupRedirector()(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.