arguments

Python: Parsing command line arguments with argparse

Especially when writing small Python utility programs, it can be tempting to use sys.argv to retrieve a small list of positional parameters from the command line.  But small utilities turn into successful tools over time, and manually parsing optional parameters and switches will quickly overwhelm your code logic. In this article I will show how Python: Parsing command line arguments with argparse

Java: Using Maven from the console for running classes, unit tests, checking dependencies

In this short article, I’ll provide some Maven commands that I’ve found helpful.   Run single class from src/main/java mvn exec:java -Dexec.mainClass=this.is.MyClass -Dexec.args=”myarg1 ‘my second arg’ myarg3″ Run unit test from src/test/java, all methods decorated with @Test mvn test -Dtest=this.is.MyTestClass Run unit test from src/test/java, only methods decorated with @Test and that start with ‘testDatabase’ Java: Using Maven from the console for running classes, unit tests, checking dependencies