For example, HeadFilter can be added to filterset as this:
<filterreaderset>
<filterreader classname="org.apache.tools.ant.HeadFilter">
<param name="lines" value="3"/>
</filterreader>
</filterreaderset>
or this:
<filterreaderset>
<headfilter lines="3"/>
</filterreaderset>
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271580 13f79535-47bb-0310-9956-ffa450edef68
* Added FileSelector interface.
* <v-fileset> now takes file selectors, instead of include and exclude patterns.
* Added a bunch of file selector implementations:
* <and>, <or>, <not> for combining selectors.
* <name>, <basename>, <url> for testing bits of the file name against
an Ant 1 style pattern, or a regular expression.
* <is-file>, <is-folder>, <exists> for testing file type.
* Added <flat-fileset>, which combines nested file sets and paths into a
single directory. This allows explicit path -> fileset conversion.
* Added <filtered-path>, which applies selectors to nested file sets and paths.
* Added <list-fileset> debug task.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271577 13f79535-47bb-0310-9956-ffa450edef68
This is not organized as a 'project' - the files here needs to replace
the ones in the main tree. I'll probably import the rest of the core
and make it a standalone replacement, so it's easy to review.
The goals are to:
- make ant more 'embeddable'
- integrate it better in other tools
- support SAX2 and namespaces
- support pluggable behavior for the XML reader
- support pluggable task factories - the factory will have full control
over the class loader
- better support and integration with existing java beans.
All that while maintaining full compatibility with ant1.4 - all
the code here is just an additional set of hooks, with the previous
behavior preserved and remaining as default.
Eventually this can be refactored into a standalone component
that will implement a task engine for ant1.x.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271572 13f79535-47bb-0310-9956-ffa450edef68
Many other tasks have been modified similarly (only ones with different task names than classnames have the name="...") - but only committing this one until full approval.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271571 13f79535-47bb-0310-9956-ffa450edef68
* No longer implements Configurable, uses a set() method instead.
* The property value can be included as the text content of
the <property> element.
* Added test-cases.
* Added some alternative executeTarget() methods to
AbstractProjectTest, to expect a particular set of log messages,
or a particular failure.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271567 13f79535-47bb-0310-9956-ffa450edef68
include patterns - even children that are themselves directories.
Throw in a check that the thing we want to transform is not a
directory and an attribute to avoid this non-standard (among directory
based tasks) behavior.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271564 13f79535-47bb-0310-9956-ffa450edef68
Minor optimization of PropertyFileInputHandler.
Use magic property name ant.input.properties instead of
input.properties to conform with our unofficial magic property naming
convention.
Use valid choices in prompt (DefaultInputHandler only) if we have a
MultipleChoiceInputRequest.
Port old <input> testcase over to this proposal.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271557 13f79535-47bb-0310-9956-ffa450edef68
As Stefan noted, the context classloader is probably causing trouble with JAXP.
Disabled for now just to see the result of the next run.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271549 13f79535-47bb-0310-9956-ffa450edef68
When this is complete, whole source tree should JavaDoc (with 1.4)
with no warnings. (With JDK1.3.1 the 1.4-regexp stuff generates
warnings, but that's all.)
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271545 13f79535-47bb-0310-9956-ffa450edef68
When this is complete, whole source tree should JavaDoc (with 1.4)
with no warnings. (With JDK1.3.1 the 1.4-regexp stuff generates
warnings, but that's all.)
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271544 13f79535-47bb-0310-9956-ffa450edef68
When this is complete, whole source tree should JavaDoc (with 1.4)
with no warnings. (With JDK1.3.1 the 1.4-regexp stuff generates
warnings, but that's all.)
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271543 13f79535-47bb-0310-9956-ffa450edef68
on encodings different than the platform's default as well.
PR: Christopher Taylor <cstaylor@nanshu.com>
some year 2002 fixes.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271540 13f79535-47bb-0310-9956-ffa450edef68
* Moved read-only property and resolve methods from TaskContext to new Context
interface. TaskContext now extends the new Context interface.
* Changed the Configurer methods to use the new Context. Both implementations
use the supplied Context to do property resolution.
* Renamed TaskContext.getPropertys() -> getProperties().
* Moved PropertyUtil from configurer to workspace package, as that is now
the only place it is used.
* Changed PropertyUtil to work with the new Context.
RoleManager:
* A default implementation for a role can now be specified. Currently
can only do this programatically.
DefaultMasterConverter:
* Removed MasterConverter interface. It is now identified by the Converter
role.
* Now caches the converter instances.
* Changed the converter search algorithm to traverse the *source* class
hierarchy, including all interfaces. Chooses the most specialised
conversion, and fails if there is more than one such choice.
DefaultConfigurer:
* Attempts to convert references, if the type does not match the expected type.
* Changed handling of nested elements, for named adders/setters:
* If the method type can be mapped to a role, and that role has a default
implementation, then use that default implementation.
* Otherwise, if the method type is an interface, fail.
* Otherwise, create an instance using no-args constructor.
* Changed handling of nested elements, for typed adders/setters:
* If the method type can be mapped to a role, and the element name is
a type of that role, then use that role to create the instance.
* Otherwise, use the type factory for the generic data-type role.
* Attempt to convert the instance if it is not of the expected type.
* Added a bunch of test cases for new functionality.
* Renamed all the ConfigTest classes to have descriptive names.
Misc:
* Renamed package framework.factorys -> framework.factories.
* Made tests work when fork = false.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271539 13f79535-47bb-0310-9956-ffa450edef68
Note that the comments for setProject say that only Project should use this method - whereas there are *lots* of uses outside Project...
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271532 13f79535-47bb-0310-9956-ffa450edef68