All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.googlecode.openbox.maventools.CommandMain Maven / Gradle / Ivy

There is a newer version: 2.1.6
Show newest version
package com.googlecode.openbox.maventools;

import com.googlecode.openbox.common.ToolUtils;

public class CommandMain {
	public static void main(String... args) {

		int requiredArgs = 2;

		if (args.length < requiredArgs) {
			ToolUtils.printUsage();
			return;
		}
		String pomPath = args[0].trim();
		String jarsLocation = args[1].trim();
		boolean needDownload = false;
		try {
			if (args.length == requiredArgs + 1) {
				needDownload = Boolean.parseBoolean(args[2].trim());
			}
		} catch (Exception e) {
			ToolUtils.printUsage();
			return;
		}
		String pomFilePath = pomPath;
		String downloadLocation = jarsLocation;
		PomJarsDownloader pomDownloader = new PomJarsDownloader(pomFilePath,
				downloadLocation);
		if (needDownload) {
			pomDownloader.downloadAllJars();
		} else {
			pomDownloader.installJarsBaseOnPomOnly();
		}
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy