Using Java Classes

Scripts can use Java classes. To include custom classes to be available to the script define a classpath which contains additional artifacts to included in the scripts classloader.

This is the prefered mechanism to extend a scripts classpath instead of adding dependencies to the plugin, which may cause problems if the classpath needs to be different on more than one plugin execution or when it differs between usage in more than one module in a multi-module build.

Artifact definitions will pick up missing details from the pom's dependencyManagement section.