View Javadoc

1   /**
2    * Copyright 2011 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10   * software distributed under the License is distributed on an "AS IS"
11   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing
13   * permissions and limitations under the License.
14   */
15  
16  package org.kuali.common.impex.util;
17  
18  import org.kuali.common.impex.spring.XmlSchemaCompareConfig;
19  import org.kuali.common.jdbc.JdbcProjectContext;
20  import org.kuali.common.util.ProjectContext;
21  import org.kuali.common.util.execute.SpringExecutable;
22  import org.kuali.common.util.spring.SpringUtils;
23  
24  public class XmlSchemaCompareUtility {
25  
26  	public static void main(String[] args) {
27  
28  		if (args.length != 1) {
29  			printHelpAndExit();
30  		}
31  
32  		String propertiesLocation = args[0];
33  
34  		try {
35  			// Reset the db using annotated config
36  			ProjectContext project = new JdbcProjectContext();
37  			SpringExecutable executable = SpringUtils.getSpringExecutable(project, propertiesLocation, XmlSchemaCompareConfig.class);
38  			executable.execute();
39  		} catch (Exception e) {
40  			e.printStackTrace();
41  		}
42  
43  	}
44  
45  	private static void printHelpAndExit() {
46  		System.out.println("Expects one argument, a property file location.");
47  		System.exit(1);
48  	}
49  
50  }