code: @Override
      public void execute()
              throws MojoExecutionException, MojoFailureException
          {
          boolean fExplicit = this.script != null;
          String  script    = fExplicit
                              ? this.script
                              : execution.getLifecyclePhase();
  
          String SCRIPT_NOT_FOUND = "Script '" + script + "' is not defined in package.json";
  
          Package pkg = getPackage();
          if (fExplicit && !pkg.hasScript(script))
              {
              getLog().error(SCRIPT_NOT_FOUND);
              throw new MojoFailureException(SCRIPT_NOT_FOUND);
              }
          else if (pkg.hasScript(script))
              {
              if (!fExplicit && script.endsWith("test") && skipTests)
                  {
                  getLog().info("Tests are skipped.");
                  }
              else
                  {
                  CommandLine cmdLine = getNpmCommand();
                  addCommand(cmdLine);
                  cmdLine.addArgument(script);
                  addArguments(cmdLine);
  
                  execute(cmdLine);
                  }
              }
          else
              {
              getLog().info(SCRIPT_NOT_FOUND);
              }
          }
docs: ---- Mojo interface --------------------------------------------------