1 16 package com.ibatis.db.sqlmap.upgrade; 17 18 import com.ibatis.common.exception.NestedRuntimeException; 19 20 import java.io.IOException ; 21 22 public class SqlMapUpgradeTool { 23 24 private static final SqlMapXmlConverter CONVERTER = new SqlMapXmlConverter(); 25 26 private SqlMapUpgradeTool() { 27 } 28 29 public static void main(String [] args) { 30 try { 31 if (args.length < 2 || args.length > 3) { 32 System.out.println("Usage:\n\njava " + SqlMapUpgradeTool.class.getName() + " [InputXMLFile] [OutputXMLFile]\n\n"); 33 return; 34 } else if (args.length == 2) { 35 CONVERTER.convertFile(args[0], args[1]); 36 } else if (args.length == 3) { 37 CONVERTER.convertFile(args[1], args[2]); 39 } 40 } catch (IOException e) { 41 throw new NestedRuntimeException("Error running SQL Map Upgrade Tool. Cause: " + e, e); 42 } 43 } 44 45 46 } 47 | Popular Tags |