Bug 33243 - Need a "meta data" facility.
Summary: Need a "meta data" facility.
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core (show other bugs)
Version: 1.7.0
Hardware: PC Windows XP
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Ant Notifications List
Depends on:
Reported: 2005-01-25 21:00 UTC by Alexey Solofnenko
Modified: 2008-11-24 03:58 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
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.  :)