ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Williams <mi...@cortexebusiness.com.au>
Subject Re: <script> needs a classpath param
Date Mon, 06 Aug 2001 23:27:42 GMT
  >>> On 06 Aug 2001 10:01:12 +0200,
  >>> "Stefan" == Stefan Bodewig <bodewig@apache.org> wrote:

  Stefan> Sounds like a similar problem we have in <junit>, either you put all
  Stefan> stuff required to run the tests (i.e. junit.jar and the task) into the
  Stefan> system classloader, or nothing at all) - the difference here is that
  Stefan> Ant is responsible for loading the test classes, so it can take
  Stefan> advantage of a classloader of its own.

Okay, here's an idea.  There are a number of optional tasks that required
support from external libs.  How about EXCLUDING these tasks by default,
and requiring that they be explicitly declared in the build.xml, where a
classpath can be provided.  For eg.

    <taskdef name="junit" 
             classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
        <classpath>
            <pathelement location="${optional.class.path}" />
            <pathelement location="${junit.home}/junit.jar" />
        </classpath>
    </taskdef>        

Wouldn't that solve the problem?
    
-- 
Mike


Mime
View raw message