File tree 1 file changed +9
-11
lines changed
cobigen/cobigen-core/src/main/java/com/devonfw/cobigen/impl/generator
1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -279,17 +279,15 @@ private ClassLoader prependTemplatesClassloader(ClassLoader inputProjectClassLoa
279
279
}
280
280
281
281
if (Files .exists (pomFile )) {
282
- String pomFileHash = MavenUtil .generatePomFileHash (pomFile , MavenUtil .determineMavenRepositoryPath ());
283
-
284
- if (!this .configurationHolder .isTemplateSetConfiguration ()) {
285
- if (this .configurationHolder .isJarConfig ()) {
286
- cpCacheFile = configLocation
287
- .resolveSibling (String .format (MavenConstants .CLASSPATH_CACHE_FILE , pomFileHash ));
288
- } else {
289
- cpCacheFile = configLocation .resolve (String .format (MavenConstants .CLASSPATH_CACHE_FILE , pomFileHash ));
290
- }
291
- } else {
292
- cpCacheFile = configLocation .resolve (String .format (MavenConstants .CLASSPATH_CACHE_FILE , pomFileHash ));
282
+ String pomFileHash = MavenUtil .generatePomFileHash (pomFile , MavenUtil .determineMavenRepositoryPath ());
283
+
284
+ // gets classpath cache file within template-sets folder
285
+ cpCacheFile = configLocation .resolve (String .format (MavenConstants .CLASSPATH_CACHE_FILE , pomFileHash ));
286
+
287
+ // gets classpath cache file from parent directory of configuration location of monolithic template jar
288
+ if (!this .configurationHolder .isTemplateSetConfiguration () && this .configurationHolder .isJarConfig ()) {
289
+ cpCacheFile = configLocation
290
+ .resolveSibling (String .format (MavenConstants .CLASSPATH_CACHE_FILE , pomFileHash ));
293
291
}
294
292
295
293
combinedClassLoader = MavenUtil .addURLsFromCachedClassPathsFile (cpCacheFile , pomFile , combinedClassLoader );
You can’t perform that action at this time.
0 commit comments