public void ensureStarted()
        throws MojoExecutionException
    {
        synchronized ( lock )
        {
            if ( started || starting )
            {
                return;
            }
            starting = true;
            started = false;
            finished = false;
            finishing = false;
        }
        Thread worker = new Thread( new Worker(), "FileSystemServer[" + name + "]" );
        worker.setDaemon( true );
        worker.start();
        try
        {
            synchronized ( lock )
            {
                while ( starting && !started && !finished && !finishing )
                {
                    lock.wait();
                }
                if ( problem != null )
                {
                    throw problem;
                }
            }
        }
        catch ( Exception e )
        {
            throw new MojoExecutionException( e.getMessage(), e );
        }
    }
public void ensureStarted ( ) throws MojoExecutionException { synchronized ( lock ) { if ( started || starting ) { return ; } starting = true ; started = false ; finished = false ; finishing = false ; } Thread worker = new Thread ( new Worker ( ) , "FileSystemServer[" + name + "]" ) ; worker . setDaemon ( true ) ; worker . start ( ) ; try { synchronized ( lock ) { while ( starting && ! started && ! finished && ! finishing ) { lock . wait ( ) ; } if ( problem != null ) { throw problem ; } } } catch ( Exception e ) { throw new MojoExecutionException ( e . getMessage ( ) , e ) ; } }
Ensures that the file system server is started (if already starting, will block until started, otherwise starts
the file system server and blocks until started)

@throws MojoExecutionException if the file system server could not be started.