ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37223] New: - dynamically extend ant's classpath, i.e. from inside of a running ant
Date Mon, 24 Oct 2005 15:05:00 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37223>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37223

           Summary: dynamically extend ant's classpath, i.e. from inside of
                    a running ant
           Product: Ant
           Version: 1.6.5
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: meinc@web.de


It would be of great help if ant's run classpath could be extended
dynamically while it is already running in order to automatically
add lacking libs whose location is (solely) given in the context
of a given project. E.g. the jar cotaining a specific JDBC driver.
At least the addition of a classpath parameter (as for taskdef) to the
antcall task would be very usefull. 

At the moment it is only possible to extend the classpath (more or less) statically on the
command line by means of the "-lib" option or by
injecting the required libs into the lib directory located under ant's
home dir. The latter approach would (usually) result in a modified default
installation which may cause troubles or at least establishes
customized ant installations.

I tried to solve the problem with ant's existing means which results
in a somehow cumbersome script that isn't completely generic
since it cotains an os dependency. The sniffet from my trial looks
as follows:

  <target name="needsdriverlib">
    <sql
      driver="${driver}"
      url="${url}"
      userid="${userid}"
      password="${password}"
    >
      select * from cat
    </sql>
  </target>

  <target name="ensuresdriverlib">
    <!-- extension .bat depends on os windows -->
    <exec executable="ant.bat" spawn="false">
      <arg value="-lib"/>
      <arg value="${lib.dir}/jdbc/jars"/>
      <arg value="needsdriverlib"/>
    </exec>
  </target>


Hopefully you found this request worth to be considered
in a future version.
Thanks.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message