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

org.opengis.cite.gpkg12.TestRunArguments Maven / Gradle / Ivy

The newest version!
package org.opengis.cite.gpkg12;

import java.io.File;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;

import com.beust.jcommander.Parameter;

/**
 * Declares supported command line arguments that are parsed using the JCommander library.
 * All arguments are optional. The default values are as follows:
 * 
    *
  • XML properties file: ${user.home}/test-run-props.xml
  • *
  • outputDir: ${user.home}
  • *
* *

* Synopsis *

* *
 * ets-${ets-code}-${version}-aio.jar [-o|--outputDir $TMPDIR] [test-run-props.xml]
 * 
*/ public class TestRunArguments { @Parameter(description = "Properties file") private List xmlProps; @Parameter(names = { "-o", "--outputDir" }, description = "Output directory") private String outputDir; public TestRunArguments() { this.xmlProps = new ArrayList<>(); } public File getPropertiesFile() { File fileRef; if (xmlProps.isEmpty()) { fileRef = new File(System.getProperty("user.home"), "test-run-props.xml"); } else { String propsFile = xmlProps.get(0); fileRef = (propsFile.startsWith("file:")) ? new File(URI.create(propsFile)) : new File(propsFile); } return fileRef; } public String getOutputDir() { return (null != outputDir) ? outputDir : System.getProperty("user.home"); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy