@Override
  public void executeNode() throws Exception {
    Project project = getProject();

    if (FileUtil.isChild(getCacheDir(), project.getProjectDir())) {
      super.executeNode();
    } else {
      synchronized (ExecuteNpmTask.class) {
        super.executeNode();
      }
    }
  }
  @Override
  protected List<String> getCompleteArgs() {
    List<String> completeArgs = super.getCompleteArgs();

    File cacheDir = getCacheDir();

    if (cacheDir != null) {
      completeArgs.add("--cache");
      completeArgs.add(FileUtil.getAbsolutePath(cacheDir));
    }

    String logLevel = null;

    Logger logger = getLogger();

    if (logger.isTraceEnabled()) {
      logLevel = "silly";
    } else if (logger.isDebugEnabled()) {
      logLevel = "verbose";
    } else if (logger.isInfoEnabled()) {
      logLevel = "info";
    } else if (logger.isWarnEnabled()) {
      logLevel = "warn";
    } else if (logger.isErrorEnabled()) {
      logLevel = "error";
    }

    if (logLevel != null) {
      completeArgs.add("--loglevel");
      completeArgs.add(logLevel);
    }

    completeArgs.add("--progress");
    completeArgs.add(Boolean.toString(isProgress()));

    if (isInheritProxy()) {
      addProxyArg(completeArgs, "--proxy", "http");
      addProxyArg(completeArgs, "--https-proxy", "https");
    }

    String registry = getRegistry();

    if (Validator.isNotNull(registry)) {
      completeArgs.add("--registry");
      completeArgs.add(registry);
    }

    return completeArgs;
  }