File licenseTarget = layout.getLicenseFile( mymojo.getLicenseFile().getName() );
    public void execute() throws MojoExecutionException, MojoFailureException    {        // make the layout directories        File dir = new File( mymojo.getOutputDirectory(), target.getId() );        layout = new InstallationLayout( dir );        layout.mkdirs();        // copy over the read me file if present otherwise use the bundled copy        if ( mymojo.getReadmeFile().exists() )        {            File readmeTarget = layout.getReadmeFile( mymojo.getReadmeFile().getName() );            try            {                FileUtils.copyFile( mymojo.getReadmeFile(), readmeTarget );            }            catch ( IOException e )            {                throw new MojoFailureException( "Failed to copy read me file " + mymojo.getReadmeFile()                    + " into position " + readmeTarget );            }        }                // copy over the license file if present otherwise use the bundled copy        if ( mymojo.getLicenseFile().exists() )        {            File licenseTarget = layout.getLicenseFile( mymojo.getLicenseFile().getName() );            try            {                FileUtils.copyFile( mymojo.getLicenseFile(), licenseTarget );            }            catch ( IOException e )            {                throw new MojoFailureException( "Failed to copy license file " + mymojo.getLicenseFile()                    + " into position " + licenseTarget );            }        }                // copy over the license file if present otherwise use the bundled copy        File iconTarget = layout.getLogoIconFile( mymojo.getApplicationIcon().getName() );        if ( mymojo.getApplicationIcon().exists() )        {            try            {                FileUtils.copyFile( mymojo.getApplicationIcon(), iconTarget );            }            catch ( IOException e )            {                throw new MojoFailureException( "Failed to copy icon file " + mymojo.getApplicationIcon()                    + " into position " + iconTarget );            }        }        else        {            try            {                MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "logo.png" ), iconTarget );            }            catch ( IOException e )            {                throw new MojoFailureException( "Failed to copy icon file " + getClass().getResource( "logo.png" )                    + " into position " + iconTarget );            }        }                // copy over the REQUIRED bootstrapper.jar file         try        {            FileUtils.copyFile( mymojo.getBootstrapper().getFile(), layout.getBootstrapper() );        }        catch ( IOException e )        {            throw new MojoFailureException( "Failed to copy bootstrapper.jar " + mymojo.getBootstrapper().getFile()                + " into position " + layout.getBootstrapper() );        }                // copy over the REQUIRED logger artifact        try        {            FileUtils.copyFile( mymojo.getLogger().getFile(), layout.getLogger() );        }        catch ( IOException e )        {            throw new MojoFailureException( "Failed to copy logger.jar " + mymojo.getLogger().getFile()                + " into position " + layout.getLogger() );        }                // copy over the REQUIRED daemon.jar file         try        {            FileUtils.copyFile( mymojo.getDaemon().getFile(), layout.getDaemon() );        }        catch ( IOException e )        {            throw new MojoFailureException( "Failed to copy daemon.jar " + mymojo.getDaemon().getFile()                + " into position " + layout.getDaemon() );        }                // copy over the REQUIRED bootstrapper configuration file        try        {            FileUtils.copyFile( target.getBootstrapperConfiguraitonFile(), layout.getBootstrapperConfigurationFile() );        }        catch ( IOException e )        {            throw new MojoFailureException( "Failed to copy bootstrapper configuration file "                  + target.getBootstrapperConfiguraitonFile()                 + " into position " + layout.getBootstrapperConfigurationFile() );        }                // copy over the optional logging configuration file        if ( target.getLoggerConfigurationFile().exists() )        {            try            {                FileUtils.copyFile( target.getLoggerConfigurationFile(),                     layout.getLoggerConfigurationFile() );            }            catch ( IOException e )            {                mymojo.getLog().error( "Failed to copy logger configuration file "                      + target.getLoggerConfigurationFile()                     + " into position " + layout.getLoggerConfigurationFile(), e );            }        }                // copy over the optional server configuration file        if ( target.getServerConfigurationFile().exists() )        {            try            {                FileUtils.copyFile( target.getServerConfigurationFile(),                     layout.getConfigurationFile() );            }            catch ( IOException e )            {                mymojo.getLog().error( "Failed to copy server configuration file "                      + target.getServerConfigurationFile()                    + " into position " + layout.getConfigurationFile(), e );            }        }                // -------------------------------------------------------------------        // Copy OS Specific Files         // -------------------------------------------------------------------                // now copy over the jsvc executable renaming it to the applicationName         if ( target.getOsName().equals( "linux" ) &&              target.getOsArch().equals( "i386" ) )        {            File executable = new File ( layout.getBinDirectory(), mymojo.getApplicationName() );            try            {                MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "jsvc_linux_i386" ), executable );            }            catch ( IOException e )            {                throw new MojoFailureException( "Failed to copy jsvc executable file "                      + getClass().getResource( "jsvc_linux_i386" )                    + " into position " + executable.getAbsolutePath() );            }        }                // now copy over the jsvc executable renaming it to the mymojo.getApplicationName()         if ( target.getOsName().equals( "sunos" ) &&              target.getOsArch().equals( "sparc" ) )        {            File executable = new File ( layout.getBinDirectory(), mymojo.getApplicationName() );            try            {                MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "jsvc_solaris_sparc" ), executable );            }            catch ( IOException e )            {                throw new MojoFailureException( "Failed to copy jsvc executable file "                      + getClass().getResource( "jsvc_solaris_sparc" )                    + " into position " + executable.getAbsolutePath() );            }        }                // now copy over the jsvc executable renaming it to the mymojo.getApplicationName()         if ( target.getOsName().equals( "macosx" ) && target.getOsArch().equals( "ppc" ) )        {            File executable = new File ( layout.getBinDirectory(), mymojo.getApplicationName() );            try            {                MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "jsvc_macosx_ppc" ), executable );            }            catch ( IOException e )            {                throw new MojoFailureException( "Failed to copy jsvc executable file "                      + getClass().getResource( "jsvc_macosx_ppc" )                    + " into position " + executable.getAbsolutePath() );            }        }                // now copy over the Prunsrv and Prunmgr executables renaming them to the mymojo.getApplicationName() + w for mgr        if ( target.getOsFamily().equals( "windows" ) &&  target.getOsArch().equals( "x86" ) )        {            File executable = new File ( layout.getBinDirectory(), mymojo.getApplicationName() + ".exe" );            try            {                MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "prunsrv.exe" ), executable );            }            catch ( IOException e )            {                throw new MojoFailureException( "Failed to copy prunsrv executable file "                      + getClass().getResource( "prunsrv.exe" )                    + " into position " + executable.getAbsolutePath() );            }            executable = new File ( layout.getBinDirectory(), mymojo.getApplicationName() + "w.exe" );            try            {                MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "prunmgr.exe" ), executable );            }            catch ( IOException e )            {                throw new MojoFailureException( "Failed to copy prunmgr executable file "                      + getClass().getResource( "prunmgr.exe" )                    + " into position " + executable.getAbsolutePath() );            }        }                MojoHelperUtils.copyDependencies( mymojo, layout );    }