public void execute() throws BuildException {
    try {
      InetAddress localHost = InetAddress.getLocalHost();

      if (Validator.isNotNull(_hostAddressProperty)) {
        getProject().setUserProperty(_hostAddressProperty, localHost.getHostAddress());
      }

      if (Validator.isNotNull(_hostNameProperty)) {
        getProject().setUserProperty(_hostNameProperty, localHost.getHostName());
      }

      if (Validator.isNotNull(_vmId1Property)) {
        int id = GetterUtil.getInteger(StringUtil.extractDigits(localHost.getHostName()));

        getProject().setUserProperty(_vmId1Property, String.valueOf((id * 2) - 1));
      }

      if (Validator.isNotNull(_vmId2Property)) {
        int id = GetterUtil.getInteger(StringUtil.extractDigits(localHost.getHostName()));

        getProject().setUserProperty(_vmId2Property, String.valueOf((id * 2)));
      }
    } catch (UnknownHostException uhe) {
      throw new BuildException(uhe);
    }
  }