View Javadoc

1   /*--------------------------------------------------------------------------
2    *  Copyright 2008 utgenome.org
3    *
4    *  Licensed under the Apache License, Version 2.0 (the "License");
5    *  you may not use this file except in compliance with the License.
6    *  You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *  Unless required by applicable law or agreed to in writing, software
11   *  distributed under the License is distributed on an "AS IS" BASIS,
12   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *  See the License for the specific language governing permissions and
14   *  limitations under the License.
15   *--------------------------------------------------------------------------*/
16  //--------------------------------------
17  // utgb-shell Project
18  //
19  // GWTCompile.java
20  // Since: 2010/04/30
21  //
22  // $URL$ 
23  // $Author$
24  //--------------------------------------
25  package org.utgenome.shell;
26  
27  import org.utgenome.shell.Maven.CommandExecutor;
28  import org.xerial.util.log.Logger;
29  
30  public class GWTCompile extends UTGBShellCommand {
31  
32  	private static Logger _logger = Logger.getLogger(GWTCompile.class);
33  
34  	@Override
35  	public void execute(String[] args) throws Exception {
36  
37  		maven("-q dependency:build-classpath -Dmdep.outputFile=target/classpath");
38  
39  		_logger.info("executing java task...");
40  
41  		CommandExecutor exec = new CommandExecutor();
42  		exec.execCommand("java -version", null, null);
43  
44  		_logger.info("done.");
45  	}
46  
47  	@Override
48  	public String getOneLinerDescription() {
49  		return "(BETA) compile GWT codes (Java) into JavaScript";
50  	}
51  
52  	@Override
53  	public String name() {
54  		return "gwt-compile";
55  	}
56  
57  }