protected void execute(CommandLine cmdLine)
            throws MojoFailureException, MojoExecutionException
        {
        try
            {
            DefaultExecutor executor = new DefaultExecutor();
            executor.setWorkingDirectory(workingDir);
            executor.setStreamHandler(new PumpStreamHandler(System.out, System.err, System.in));

            executor.execute(cmdLine);
            }
        catch (ExecuteException e)
            {
            throw new MojoFailureException("npm failure", e);
            }
        catch (IOException e)
            {
            throw new MojoExecutionException("Error executing NPM", e);
            }
        }
protected void execute ( CommandLine cmdLine ) throws MojoFailureException , MojoExecutionException { try { DefaultExecutor executor = new DefaultExecutor ( ) ; executor . setWorkingDirectory ( workingDir ) ; executor . setStreamHandler ( new PumpStreamHandler ( System . out , System . err , System . in ) ) ; executor . execute ( cmdLine ) ; } catch ( ExecuteException e ) { throw new MojoFailureException ( "npm failure" , e ) ; } catch ( IOException e ) { throw new MojoExecutionException ( "Error executing NPM" , e ) ; } }
---- helpers ---------------------------------------------------------