After the change to ProjectHelper2, [embed] shouldn't be
used with ant1.6, only with ant1.5 as a mechanism to use the
new tasks and semantics with the stable branch.
The build file for Ant1.6 should be the same ( and work the same)
as the build file for ant1.5.1+embed.
This is not the case at the moment, because embed supports import
and few other features that are not yet in the main branch.
Import and the system loader can be supported now as regular tasks.
( preferably moved into HEAD, but they can work as an antlib )
Dynamic properties and ProjectComponentFactory still need to be
discussed and merged to HEAD ( or replaced with whatever gets
in the HEAD ).
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273665 13f79535-47bb-0310-9956-ffa450edef68
Since embed should run in ant1.5 - I duplicated some of the new
methods in ant16. If ProjectHelper2 will move to the main branch
this needs to be removed ( and some other stuff too )
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273648 13f79535-47bb-0310-9956-ffa450edef68
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
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
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