This allows Script tasks to work in most cases- and any other task that
requires Task in the tree.
It is the current behavior - but I think it is not the best solution.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273618 13f79535-47bb-0310-9956-ffa450edef68
I doubt this is complete and there should probably be some tweaks
to do as it will remove some br formatting (and I did not test yet under
Forrest, only from the top of my head). Not perfect, but this should
somewhat ease the conversion by doing most of the borring work.
cya
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273608 13f79535-47bb-0310-9956-ffa450edef68
Remove the reference to the task after the task execution.
Next time the task is called a new instance will be created.
This avoids excessive memory usage and potential leaks in large
programs. All the memory that is used by the task - i.e. the
task itself and all the object it creates - are beeing hold in
memory and prevented from GC by this reference.
I hope this will remove some OutOfMemory errors for large build
files.
Nicola - please let me know if you see any problems after this change !
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273574 13f79535-47bb-0310-9956-ffa450edef68
Removed some stuff that was not used.
If the dynamic properties are adopted in the main tree, we
can remove ( or move out ) the optional implementations.
I also removed the jmx stuff - there is no need to have them
tied to embed or ant1.6. Some functional ( but not complete )
jmx tasks are already in jakarta-commons/modeler ( including
code to control tomcat5 using jmx )
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273573 13f79535-47bb-0310-9956-ffa450edef68
Remove the attempted merge with UnknownElement - while it
would be nice, it's not possible without affecting backward compat
( since tasks could use both of them ).
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273449 13f79535-47bb-0310-9956-ffa450edef68
Added an experimental TaskDiscovery that will use commons-discovery
to find tasks using the ProjectComponentFactory hook.
This is just to play with different antlib mechanisms.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273439 13f79535-47bb-0310-9956-ffa450edef68
I commented out for now the special case that does imediate
creation of task, and changed the behavior to all-lazy.
This seems to pass the gump test, and doesn't seem to
create any major problem. Given that lazy creation was allways
a possibility, I would think it is a task bug if a task that can't deal with
that.
After this settles down I'll eliminate the latest special case for
nested elements ( now it'll all be dealt only by UnknownElement ).
Also, added more code to deal with namespaces. The logic should
be in UnknownElement/RuntimeConfigrable - we should just pass
the info ( in the case that an XML source is used )
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273438 13f79535-47bb-0310-9956-ffa450edef68
Again - this is a proposal and an experiment, all features will
eventually get to a majority vote and removed or moved out
of ant if it doesn't pass.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273437 13f79535-47bb-0310-9956-ffa450edef68
stores to implement their own policy.
This feature will not work in ant15 ( for now ).
Also changed Project to Object - and use it as a context. This makes
the callback more generic and the hooks less dependent of ant.
The only major issue on dynamic properties for me is the JNDI stuff.
I think the Context interface could be a better abstraction, but
on the other side it is much more complex. I also want to finalize
the JNDI property source and abstract the properties via JNDI
so tasks can be created without any dep on ant, but still accessing
properties and refs.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273434 13f79535-47bb-0310-9956-ffa450edef68
I would like to extend it a bit more in the future - to support
properties like "${property}" without a string conversion.
In other workds, if a dynamic property is used ( which return an
object ), the object should be used as such in the introspection.
That would greatly simplify tasks and allow more flexibility.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273433 13f79535-47bb-0310-9956-ffa450edef68
behavior and control the creation.
This will work for all code that checks instanceof, but
will obviously fail if any code explicitely looks at the class
name ( which is very unlikely - so far no code did that in the
gump run or otherwise ).
The UnknownElement2/RuntimeConfigurable2 will be further refactored
to make them more independent of the XML representation and
have a cleaner API. All behavior will be moved out of the XML
processor and into this pair. Of course, full backward compat will
be provided.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273432 13f79535-47bb-0310-9956-ffa450edef68
Full backward compatibility is provided - the project
is used to create tasks. The mechanism allows full
flexibility in implementing any kind of antlib policy,
and allows applications embeding ant to integrate in the
component creation process.
Probably a good improvement would be to move the 'default'
behavior in a separate plugin ( DefaultComponentFactory - to
use the project component storage ), and deprecate the use
of Project for project component management.
After more feedback is received I'll propose this for the
main branch.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273430 13f79535-47bb-0310-9956-ffa450edef68
It adds support for multiple values.
( I am not sure if this is the right place - I would try to
return a vector/enumeration/[] - and then have a generic solution
that would turn this into a string. Until I find a better solution
I'll leave the code unchanged )
Bug 11789
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273269 13f79535-47bb-0310-9956-ffa450edef68
XMLDOC is a typedes that can be used in the embed proposal.
It loads an xml file as a DOM, thus making it available to jxpath.
Note:
This is different from the XML task that loads each element
as a property. Eventually we should merge the 2 - after 'embed'
is proposed for the main branch and if it is accepted.
Note2: It would be interesting to explore the other side of
jxpath, i.e. setting. And then saving the xml file.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273217 13f79535-47bb-0310-9956-ffa450edef68
beans are turned into tasks - it allows to specify the method name.
It'll also be extended to support mbeans or other types of tasks.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273177 13f79535-47bb-0310-9956-ffa450edef68
The next major step for this will be a set of hooks to allow ant to
be more JMX friendly - one very straightforward way to embed ant
is by using MBeans to represent the components.
In addition ant should be able to use MBeans as tasks and in
the build process.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273165 13f79535-47bb-0310-9956-ffa450edef68
AntContext.
Started the cleanup process.
The reason for 'stateless' model is not performance, but having a cleaner
model. It is very hard to track things on the stack or in different
handlers.
The next major step will be to try to reorganize the DataType/Task/UnknownTask
creation.
So far all features ( sax2, import, dynamic prop, classloader ) seem to work
fine with 1.5 - at least on all projects I'm working on.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273164 13f79535-47bb-0310-9956-ffa450edef68
Implement the 'projectName.target' instead of super. I'm still trying
to find a way to allow Import task to hook in and support whatever
policy it wants.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273141 13f79535-47bb-0310-9956-ffa450edef68