001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.tools.seleniumbuilder;
016    
017    import com.liferay.portal.tools.ArgumentsUtil;
018    import com.liferay.portal.util.InitUtil;
019    
020    import java.util.Map;
021    
022    /**
023     * @author Michael Hashimoto
024     */
025    public class SeleniumBuilder {
026    
027            public static void main(String[] args) throws Exception {
028                    InitUtil.initWithSpring();
029    
030                    new SeleniumBuilder(args);
031            }
032    
033            public SeleniumBuilder(String[] args) throws Exception {
034                    Map<String, String> arguments = ArgumentsUtil.parseArguments(args);
035    
036                    String baseDir = arguments.get("selenium.base.dir");
037                    String types = arguments.get("selenium.types");
038    
039                    System.out.println(types);
040    
041                    SeleniumBuilderContext seleniumBuilderContext =
042                            new SeleniumBuilderContext(baseDir);
043    
044                    System.out.println(seleniumBuilderContext);
045            }
046    
047    }