LocalConfiguration configuration = new Tomcat6xStandaloneLocalConfiguration("target/tomcat6x");
Deployable war = new WAR("target/war/grails-example-without-libs.war");
configuration.addDeployable(war);
InstalledLocalContainer container = new Tomcat6xInstalledLocalContainer(configuration);
container.setHome("/srv/tomcat/catalina-home");
List<String> jars = new List<String>();
for (File jar : new File("/opt/grails").listFiles())
{
if (jar.isFile())
{
jars.add(jar.getAbsolutePath());
}
}
container.setSharedClasspath(jars.toArray());
container.start();