My requirement is that, using waitfor condition, ant should periodically check if string "Build Successful" is displayed in log file. If the string is found, then particular action should be performed.
相关问题
- How can I have my ant task pass or fail based on t
- Ant inheriting Maven properties
- How can I zip multiple folders individually with a
- Class in jar not found at runtime, but was used to
- Regex to select last line in a multi-line string
相关文章
- Passing command line arguments to Java via ant bui
- ANT - Could not load a dependent class com/jcraft/
- library resolve to a path with no project.properti
- ant file that depends on another ant file
- android-sdk/tools/ant/build.xml:698: null returned
- ant jar's mainclass
- Integrate Ant builder into Eclipse: Error “Variabl
- How can I avoid this Ant Build error?
Here's an example of one way you might do this:
Use the
resourcecontains
condition to look for the string in the named resource - in this case the file 'build.log'. If it's not found in the allotted time, thebuild.timeout
property is set. There are two targets, one that is to be run if the string is found, the other if not. The 'target' attributesif
,unless
, anddepends
are used to make the if-else logic need. If you only need to take an action in the case of success or failure, you can simplify slightly.