<name>Andreas Kuhtz</name>
<email>andreas.kuhtz@gmail.com</email>
</contributor>
+ <contributor>
+ <name>Casey Link</name>
+ <email>casey@outskirtslabs.com</email>
+ </contributor>
<!--
<contributor>
<name></name>
getLog().debug("Explicitly set NamingStrategy: " + namingStrategy);
try
{
+ List runtimeClasspathElements = project.getRuntimeClasspathElements();
+ URL[] runtimeUrls = new URL[runtimeClasspathElements.size()];
+ for (int i = 0; i < runtimeClasspathElements.size(); i++)
+ {
+ String element = (String) runtimeClasspathElements.get(i);
+ runtimeUrls[i] = new File(element).toURI().toURL();
+ }
+ URLClassLoader newLoader = new URLClassLoader(
+ runtimeUrls,
+ Thread.currentThread().getContextClassLoader()
+ );
@SuppressWarnings("unchecked")
- Class<NamingStrategy> namingStrategyClass = (Class<NamingStrategy>) Class.forName(namingStrategy);
+ Class<NamingStrategy> namingStrategyClass =
+ (Class<NamingStrategy>) newLoader.loadClass(namingStrategy);
config.setNamingStrategy(namingStrategyClass.newInstance());
}
catch (Exception e)