ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: [Thanks]Re: Best way to run Ant without installing it?
Date Fri, 17 Sep 2004 17:08:21 GMT
> The only thing missing might be the ant.home property,
> as I don't think the launcher sets it (the scripts do).
> I use this property in my build script to reference XSL
> stylesheets for example, so without it the build would fail.
> 
> The launcher could be changed to set it, if it's not set
> (assuming it doesn't do it already). --DD


Should be set by the Launcher ...

Jan

...Launcher:0100:     private void run(String[] args) throws
LaunchException, MalformedURLException {
...Launcher:0101:         String antHomeProperty =
System.getProperty(ANTHOME_PROPERTY);
...Launcher:0102:         File antHome = null;
...Launcher:0103: 
...Launcher:0104:         File sourceJar =
Locator.getClassSource(getClass());
...Launcher:0105:         File jarDir = sourceJar.getParentFile();
...Launcher:0106: 
...Launcher:0107:         if (antHomeProperty != null) {
...Launcher:0108:             antHome = new File(antHomeProperty);
...Launcher:0109:         }
...Launcher:0110: 
...Launcher:0111:         if (antHome == null || !antHome.exists()) {
...Launcher:0112:             antHome = jarDir.getParentFile();
...Launcher:0113:             System.setProperty(ANTHOME_PROPERTY,
antHome.getAbsolutePath());
...Launcher:0114:         }

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message