ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject ReferenceHelper - interceptor
Date Wed, 22 Jan 2003 16:55:01 GMT

I'm still here with my ReferenceHelper waiting for a generic enough to
show.

What about an interceptor that creates a classpath from the jars in a
dir lazily?

For example, usually we do something like:

      <classpath id="project.classpath">
        <fileset dir="lib">
          <include name="**/*.jar"/>
          <include name="**/*.zip"/>
        </fileset>
        <pathelement location="classes"/>
      </classpath>

    <javac srcdir="${src}"
           destdir="${build}"
           fork="true"
           classpathref="project.classpath"
    />

But with a "jardir" interceptor, we could do:


     <javac srcdir="${src}"
           destdir="${build}"
           fork="true"
           classpathref="jardir:lib"
     />

Basically it gives a reference from a classpath created on-the-fly.

Now, is this something we want?

Without this interceptor, we could do:

     <javac srcdir="${src}"
           destdir="${build}"
           fork="true"
           classpathref="${jardir:lib}"
     />

The PropertyHelper would create the classpath, give it id="jardir:lib",
and then the reference system would use that to get it.

Basically we would have most of the functionality without having to make
specialized hooks.

If there are other compelling use-cases I'd be happy to see them.
In the meantime, MHO is that to KISS maybe not having reference
interceptors could be ok.

Opinions?


-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message