Examples of TokenFilterReader


Examples of sonia.maven.util.TokenFilterReader

            }

            Reader reader = new FileReader( shellScriptTemplate );
            if ( libexecPath != null )
            {
                reader = new TokenFilterReader( reader, new SimpleRegexTokenResolver( "^WRAPPER_CMD=.*$", "WRAPPER_CMD=\"" + libexecPath + "\"") );
            }

            writeFilteredFile( request, daemon, reader, new File( outputDirectory, "bin" + File.separator + daemon.getId() ), context );

            File batchScriptTemplate = new File( jswDirectory, "src" + File.separator + "bin" + File.separator + "AppCommand.bat.in" );
            if ( ! batchScriptTemplate.exists() )
            {
                throw new DaemonGeneratorException( "Could not load shell script template." );
            }

            if ( libexec != null )
            {
                SimpleRegexTokenResolver resolver = new SimpleRegexTokenResolver( "^set\\ _WRAPPER_BASE=.*?\\r$", "set _WRAPPER_BASE=" + libexecPath);
                Reader batchReader = new TokenFilterReader( new FileReader( batchScriptTemplate ), resolver );
                writeFile( new File( outputDirectory, "bin" + File.separator + daemon.getId() + ".bat" ),
                       batchReader );
            }
            else
            {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.