gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen McConnell <>
Subject Re: heresy - a controversial or unorthodox opinion or doctrine
Date Mon, 12 Jul 2004 10:48:30 GMT
Stefan Bodewig wrote:

> On Sat, 10 Jul 2004, Adam R. B. Jack <> wrote:
>>Nothing slightly heretic (unless you are talking about Ant religion
>>not Gump religion).
> 8-)
> In my experience then Ant crew isn't as dogmatic as it gets colored
> sometimes, we tend to embrace heretics.
> Humor asside, the main issue I see is thar Magic uses Ant under the
> covers.  Anybody using Magic in essence uses Ant.  AFAIU I can mix the
> magic antlib with other Ant tasks freely.  If I do so without setting
> build.sysclasspath "properly", those other tasks may end up using
> "bad" classpaths.  But maybe I'm not understanding Magic completely.

Your assumptions are correct.  Magic is an antlib and anyone can 
customize build behavior by using pure ant directives.  On the 
other-hand, the only reason someone will be using magic is to control 
over version management.  So basically I agree - Magic is exposing a 
potential for abuse but at the same time it is very questionable why 
someone would invest time into setup and usage of magic with that in 
mind - ant's <exec> would be a much quicker solution.

Magic users have two options when dealing with things like external 
tasks - they can include a reference to the jar in Magic's index.xml. 
The following example (taken from the Directory project) shows the usage 
of the antlr preprocessor as an external task:

   <target name="grammars" depends="standard.prepare">
     <x:property name="antlr" key="antlr" feature="path"/>
     <antlr target="target/build/etc/antlr/schema.g"
         <pathelement path="${magic.cache}/${antlr}"/>

The important line in the above is:

     <x:property name="antlr" key="antlr" feature="path"/>

This is retrieving the location of the antlr from magic.  Normally Magic 
will return the path relative to the centralized index (i.e. 
antlr/jars/antlr-2.7.2.jar).  In the case of gump magic will ensure that 
the filename maps to the gump generated antlr.  Magic also includes a 
"plugin" notion that allows association of multiple jars with a set of 
task definitions that are loaded into a separate classloader at build time.

But the point remains - nothing is stopping someone from doing the 

      <pathelement path="${magic.cache}/antlr/jars/antlr-2.7.2.jar"/>

Clearly this circumvents the benefits provided by gump and also goes 
against the first principals of magic.

Hence our placeholder page:

Nothing there yet but this is where we will be documenting bad practices 
in our valiant efforts to hold back evil.

Cheers, Steve.


| Magic by Merlin                       |
| Production by Avalon                  |
|                                       |
|              |

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message