summaryrefslogtreecommitdiff
path: root/java/ant/SliceTask.java
diff options
context:
space:
mode:
authorBrent Eagles <brent@zeroc.com>2007-07-06 16:15:09 -0230
committerBrent Eagles <brent@zeroc.com>2007-07-06 16:15:09 -0230
commited6721d187392146212318fa0eef25380da0a8cb (patch)
tree1d8e0e204a6d3f7652c1db1204cf9c431386d956 /java/ant/SliceTask.java
parentAMD testing + AMD "rollback on user exception" fix (diff)
downloadice-ed6721d187392146212318fa0eef25380da0a8cb.tar.bz2
ice-ed6721d187392146212318fa0eef25380da0a8cb.tar.xz
ice-ed6721d187392146212318fa0eef25380da0a8cb.zip
Change ice.bin.dir to ice.home. Fix comments in SliceTask.getIceHome() and
change order of precedence for property vs. environment variable. The proper now takes precedence over the environment variable.
Diffstat (limited to 'java/ant/SliceTask.java')
-rw-r--r--java/ant/SliceTask.java51
1 files changed, 27 insertions, 24 deletions
diff --git a/java/ant/SliceTask.java b/java/ant/SliceTask.java
index bb2115fa591..6b401acbed0 100644
--- a/java/ant/SliceTask.java
+++ b/java/ant/SliceTask.java
@@ -308,39 +308,42 @@ public class SliceTask extends org.apache.tools.ant.Task
return dependencies;
}
-
+
+ //
+ // Query for the location of the Ice install. The Ice install
+ // location may be indicated in one of two ways:
+ //
+ // 1. Through the ice.home property
+ // 2. Through the ICE_HOME environment variable.
+ //
+ // If both the property and environment variable is specified, the
+ // property takes precedence. If neither is available, getIceHome()
+ // returns null.
+ //
protected String
getIceHome()
{
- //
- // _iceHome used to be set in the constructor. It appears that the
- // current project isn't available at that point and consequently, the
- // properties that allow us to find the ice translators based on the
- // contents the 'ice.dir' property in the ant projects aren't available
- // yet.
- //
if(_iceHome == null)
{
- //
- // Check for the presence of the ICE_HOME environment variable.
- //
- java.util.Vector env = Execute.getProcEnvironment();
- java.util.Enumeration e = env.elements();
- while(e.hasMoreElements())
+ if(getProject().getProperties().containsKey("ice.home"))
{
- String entry = (String)e.nextElement();
- if(entry.startsWith("ICE_HOME="))
- {
- _iceHome = entry.substring(entry.indexOf('=') + 1);
- break;
- }
+ _iceHome = (String)getProject().getProperties().get("ice.home");
}
-
- if(_iceHome == null)
+ else
{
- if(getProject().getProperties().containsKey("ice.bin.dir"))
+ //
+ // Check for the presence of the ICE_HOME environment variable.
+ //
+ java.util.Vector env = Execute.getProcEnvironment();
+ java.util.Enumeration e = env.elements();
+ while(e.hasMoreElements())
{
- _iceHome = (String)getProject().getProperties().get("ice.bin.dir");
+ String entry = (String)e.nextElement();
+ if(entry.startsWith("ICE_HOME="))
+ {
+ _iceHome = entry.substring(entry.indexOf('=') + 1);
+ break;
+ }
}
}
}