Cargo : Container Classpath
This page last changed on Sep 03, 2011 by alitokmen.
DefinitionHow to configure the executing container's classpath
ExplanationThis topic is not about the classpath requirements to run Cargo (see the Installation page for this); it's about configuring the classpath for the executing container. You can therefore add custom JARs (code instrumentation, DataSource JARs, security-related libraries, etc.) to the container's execution classpath as shown below. Note that some containers also support adding custom JARs to the applications' classpath only: see Application Classpath for details. Example using the Java APIStarting Orion 1.x with Clover jar added to its classpath. For example if you have instrumented your source code with Clover you'll need to add the Clover jar to the classpath. InstalledLocalContainer container = new Orion1xInstalledLocalContainer( new OrionStandaloneLocalConfiguration("target/orion1x")); container.setHome("c:/apps/orion-1.6.0b"); container.setExtraClasspath(new String[] { "libs/clover.jar" }); container.start(); Example using the Ant APIStarting Orion 1.x with some additional classpath entries: <cargo containerId="orion1x" home="c:/apps/orion-1.6.0b" action="start"> <extraClasspath> <pathelement location="libs/clover.jar"/> </extraClasspath> </cargo> Example using the Maven 2 PluginSee Starting and stopping a container - Adding jars to a container's classpath |
![]() |
Document generated by Confluence on Dec 03, 2011 14:37 |