Package com.alibaba.antx.expand

Examples of com.alibaba.antx.expand.ExpanderRuntimeImpl


        }

        cli = manager.parse(args);

        String charset = cli.getOptionValue(CLIManager.OPT_CHARSET);
        ExpanderRuntimeImpl runtimeImpl = new ExpanderRuntimeImpl(System.in, System.out, System.err, charset);

        runtime = runtimeImpl;

        // ��ʾ����
        if (cli.hasOption(CLIManager.OPT_HELP)) {
            manager.help(runtimeImpl.getOut());
            return 0;
        }

        if (cli.hasOption(CLIManager.OPT_VERBOSE)) {
            runtimeImpl.setVerbose();
            initLogging(true, charset);
        } else {
            initLogging(false, charset);
        }

        if (cli.hasOption(CLIManager.OPT_EXPAND_WAR)) {
            runtimeImpl.getExpander().setExpandWar(getBooleanValue(CLIManager.OPT_EXPAND_WAR));
        }

        if (cli.hasOption(CLIManager.OPT_EXPAND_RAR)) {
            runtimeImpl.getExpander().setExpandRar(getBooleanValue(CLIManager.OPT_EXPAND_RAR));
        }

        if (cli.hasOption(CLIManager.OPT_EXPAND_EJB_JAR)) {
            runtimeImpl.getExpander().setExpandEjbjar(getBooleanValue(CLIManager.OPT_EXPAND_EJB_JAR));
        }

        if (cli.hasOption(CLIManager.OPT_OVERWRITE)) {
            runtimeImpl.getExpander().setOverwrite(getBooleanValue(CLIManager.OPT_OVERWRITE));
        }

        if (cli.hasOption(CLIManager.OPT_KEEP_REDUNDANT_FILES)) {
            runtimeImpl.getExpander().setKeepRedundantFiles(getBooleanValue(CLIManager.OPT_KEEP_REDUNDANT_FILES));
        }

        args = cli.getArgs();

        if (args.length >= 1) {
            runtimeImpl.getExpander().setSrcfile(args[0]);
        }

        if (args.length >= 2) {
            runtimeImpl.getExpander().setDestdir(args[1]);
        }

        // ����antxexpand
        try {
            runtimeImpl.start();
        } catch (Exception e) {
            runtimeImpl.error(e);
        }

        return 0;
    }
View Full Code Here


            getLog().error("Dest directory or file for autoconfig does not exist: " + dest.getAbsolutePath());
        }
    }

    public void unpack(File srcfile, File destdir) throws MojoExecutionException {
        ExpanderRuntimeImpl expander = new ExpanderRuntimeImpl(System.in, System.out, System.err, charset);

        expander.getExpander().setSrcfile(srcfile.getAbsolutePath());
        expander.getExpander().setDestdir(destdir.getAbsolutePath());

        expander.start();
    }
View Full Code Here

        }

        cli = manager.parse(args);

        String charset = cli.getOptionValue(CLIManager.OPT_CHARSET);
        ExpanderRuntimeImpl runtimeImpl = new ExpanderRuntimeImpl(System.in, System.out, System.err, charset);

        runtime = runtimeImpl;

        // 显示帮助
        if (cli.hasOption(CLIManager.OPT_HELP)) {
            manager.help(runtimeImpl.getOut());
            return 0;
        }

        if (cli.hasOption(CLIManager.OPT_VERBOSE)) {
            runtimeImpl.setVerbose();
            initLogging(true, charset);
        } else {
            initLogging(false, charset);
        }

        if (cli.hasOption(CLIManager.OPT_EXPAND_WAR)) {
            runtimeImpl.getExpander().setExpandWar(getBooleanValue(CLIManager.OPT_EXPAND_WAR));
        }

        if (cli.hasOption(CLIManager.OPT_EXPAND_RAR)) {
            runtimeImpl.getExpander().setExpandRar(getBooleanValue(CLIManager.OPT_EXPAND_RAR));
        }

        if (cli.hasOption(CLIManager.OPT_EXPAND_EJB_JAR)) {
            runtimeImpl.getExpander().setExpandEjbjar(getBooleanValue(CLIManager.OPT_EXPAND_EJB_JAR));
        }

        if (cli.hasOption(CLIManager.OPT_OVERWRITE)) {
            runtimeImpl.getExpander().setOverwrite(getBooleanValue(CLIManager.OPT_OVERWRITE));
        }

        if (cli.hasOption(CLIManager.OPT_KEEP_REDUNDANT_FILES)) {
            runtimeImpl.getExpander().setKeepRedundantFiles(getBooleanValue(CLIManager.OPT_KEEP_REDUNDANT_FILES));
        }

        args = cli.getArgs();

        if (args.length >= 1) {
            runtimeImpl.getExpander().setSrcfile(args[0]);
        }

        if (args.length >= 2) {
            runtimeImpl.getExpander().setDestdir(args[1]);
        }

        // 运行antxexpand
        try {
            runtimeImpl.start();
        } catch (Exception e) {
            runtimeImpl.error(e);
        }

        return 0;
    }
View Full Code Here

            getLog().error("Dest directory or file for autoconfig does not exist: " + dest.getAbsolutePath());
        }
    }

    public void unpack(File srcfile, File destdir) throws MojoExecutionException {
        ExpanderRuntimeImpl expander = new ExpanderRuntimeImpl(System.in, System.out, System.err, charset);

        expander.getExpander().setSrcfile(srcfile.getAbsolutePath());
        expander.getExpander().setDestdir(destdir.getAbsolutePath());

        expander.start();
    }
View Full Code Here

            getLog().error("Dest directory or file for autoconfig does not exist: " + dest.getAbsolutePath());
        }
    }

    public void unpack(File srcfile, File destdir) throws MojoExecutionException {
        ExpanderRuntimeImpl expander = new ExpanderRuntimeImpl(System.in, System.out, System.err, charset);

        expander.getExpander().setSrcfile(srcfile.getAbsolutePath());
        expander.getExpander().setDestdir(destdir.getAbsolutePath());

        expander.start();
    }
View Full Code Here

        }

        cli = manager.parse(args);

        String charset = cli.getOptionValue(CLIManager.OPT_CHARSET);
        ExpanderRuntimeImpl runtimeImpl = new ExpanderRuntimeImpl(System.in, System.out, System.err, charset);

        runtime = runtimeImpl;

        // ��ʾ����
        if (cli.hasOption(CLIManager.OPT_HELP)) {
            manager.help(runtimeImpl.getOut());
            return 0;
        }

        if (cli.hasOption(CLIManager.OPT_VERBOSE)) {
            runtimeImpl.setVerbose();
            initLogging(true, charset);
        } else {
            initLogging(false, charset);
        }

        if (cli.hasOption(CLIManager.OPT_EXPAND_WAR)) {
            runtimeImpl.getExpander().setExpandWar(getBooleanValue(CLIManager.OPT_EXPAND_WAR));
        }

        if (cli.hasOption(CLIManager.OPT_EXPAND_RAR)) {
            runtimeImpl.getExpander().setExpandRar(getBooleanValue(CLIManager.OPT_EXPAND_RAR));
        }

        if (cli.hasOption(CLIManager.OPT_EXPAND_EJB_JAR)) {
            runtimeImpl.getExpander().setExpandEjbjar(getBooleanValue(CLIManager.OPT_EXPAND_EJB_JAR));
        }

        if (cli.hasOption(CLIManager.OPT_OVERWRITE)) {
            runtimeImpl.getExpander().setOverwrite(getBooleanValue(CLIManager.OPT_OVERWRITE));
        }

        if (cli.hasOption(CLIManager.OPT_KEEP_REDUNDANT_FILES)) {
            runtimeImpl.getExpander().setKeepRedundantFiles(getBooleanValue(CLIManager.OPT_KEEP_REDUNDANT_FILES));
        }

        args = cli.getArgs();

        if (args.length >= 1) {
            runtimeImpl.getExpander().setSrcfile(args[0]);
        }

        if (args.length >= 2) {
            runtimeImpl.getExpander().setDestdir(args[1]);
        }

        // ����antxexpand
        try {
            runtimeImpl.start();
        } catch (Exception e) {
            runtimeImpl.error(e);
        }

        return 0;
    }
View Full Code Here

TOP

Related Classes of com.alibaba.antx.expand.ExpanderRuntimeImpl

Copyright © 2018 www.massapicom. 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.