Bug 33243

Summary: Need a "meta data" facility.
Product: Ant Reporter: Alexey Solofnenko <alexeys>
Component: CoreAssignee: Ant Notifications List <notifications>
Status: NEW ---    
Severity: enhancement    
Priority: P2    
Version: 1.7.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   

Description Alexey Solofnenko 2005-01-25 21:00:29 UTC
After some discussion I want to propose a meta data facility to specify arbitrary
parameters to any ANT objects. The need for that appeared when I started to write
a parallel executor. Often (mostly with test targets) it is necessary to specify 
that some targets should not be executed in parallel. One of the ways of 
specifying mutexes is using global properties, but it is inconvenient. The better
way is to mark each target with a list of associated mutexes, but adding yet 
another parameter into ANT core just for one executor does not make sense. 
Instead meta data tags could be used. For example:

-- one level naming schema
<?META mutexes=”test”?>
<target name=”aaa-test”/>

-- two level naming schema
<?MUTEX names=”test”?>
<target name=”aaa-test”/>

The meta data could be accessed via additional Project API:

public MetaData getMetaData(Object o); // using identity map
Comment 1 Alexey Solofnenko 2005-12-01 21:50:52 UTC
What do you think about using any namespace that starte with "meta:"? 

For example:

<project xmlns:thr="meta:/ant/threading">
  <target name="test1" thr:mutex="test" depends="build"/>
Comment 2 Matt Benson 2005-12-01 22:38:03 UTC
I personally have no objections.  :)