Monthly Archives: November 2011

MySQL how to display the character set for a table

Needing the character set details on various tables within a MySQL Database:

SHOW TABLE STATUS

Have a look the MySQL documentation: http://dev.mysql.com/doc/refman/5.1/en/show-table-status.html

Executing a class using the Maven Exec Plugin

Today, in a java maven built webapp, I needed to have a way to execute a class from the commandline. As maven was already building package into a war, I needed something extra.

Bring in the Maven Exec Plugin: http://mojo.codehaus.org/exec-maven-plugin/index.html

Pretty useful as I was able to define a specific profile for this class and now execute it by:

mvn compile -P run_my_class

Have a look at the documentation.

Also a good quick overview is provided by http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven