diff --git a/src/main/java/com/netflix/nebula/hollow/ApiGeneratorTask.java b/src/main/java/com/netflix/nebula/hollow/ApiGeneratorTask.java index 72b8994..fa9d9ad 100644 --- a/src/main/java/com/netflix/nebula/hollow/ApiGeneratorTask.java +++ b/src/main/java/com/netflix/nebula/hollow/ApiGeneratorTask.java @@ -185,7 +185,7 @@ private void initClassLoader() throws MalformedURLException { for (int i=0; i < compiledClassesPaths.length; i++){ urls[i]= new File(compiledClassesPaths[i]).toURI().toURL() ; } - urlClassLoader = new URLClassLoader(urls); + urlClassLoader = new URLClassLoader(urls, Thread.currentThread().getContextClassLoader()); } private void validatePluginConfiguration(ApiGeneratorExtension extension) { diff --git a/src/test/groovy/com/netflix/nebula/hollow/ApiGeneratorIntegrationSpec.groovy b/src/test/groovy/com/netflix/nebula/hollow/ApiGeneratorIntegrationSpec.groovy index 8a2420c..bdacad9 100644 --- a/src/test/groovy/com/netflix/nebula/hollow/ApiGeneratorIntegrationSpec.groovy +++ b/src/test/groovy/com/netflix/nebula/hollow/ApiGeneratorIntegrationSpec.groovy @@ -147,7 +147,9 @@ public class Actor { '/core/SetOfActorTypeAPI.java', '/core/ActorDelegateLookupImpl.java', '/core/MovieAPIFactory.java', - '/index/MovieAPIHashIndex.java' + '/index/MovieAPIHashIndex.java', + '/index/MoviePrimaryKeyIndex.java', + '/index/MovieUniqueKeyIndex.java' ].forEach { fileName -> assert getFile(destinationSrcFolder, fileName).exists() }