Home Bug Reports

Ant ICE_HOME and ice.bin.dir

blairblair Member Blair ZajacOrganization: Sony Pictures ImageworksProject: VnP ✭✭

In SliceTask.java, there's this comment:
// _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.
However, the code checks for the ice.bin.dir property.
if(_iceHome == null)
                _iceHome = (String)getProject().getProperties().get("ice.bin.dir");
Besides the consistency issue, I think that ice.bin.dir should be changed to
ice.dir, as currently you need to put
ice.bin.dir = /my/path/to/Ice-3.20
in your build.properties file. However, given the name ice.bin.dir, one
would expect to have
ice.bin.dir = /my/path/to/Ice-3.20/bin
But then this doesn't work in Slice2JavaTask.class:
String translator;
        if(_translator == null)
            if(getIceHome() == null)
                translator = "slice2java";
                translator = new File(getIceHome() + File.separator + "bin"
+ File.separator + "slice2java").toString();
Since it adds another bin to it.

So that's why I'm recommending that the code check for ice.dir.



  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Blair,

    Thanks for pointing out these issues; I agree with your recommendation.

Sign In or Register to comment.