Skip to content

Commit fb0c712

Browse files
committed
fix(QTDI-2004): handle when classpath.jar is not provided (JobServer)
- remove `nested:` for embedded m2 repository
1 parent 9f2dd99 commit fb0c712

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

component-runtime-manager/src/main/java/org/talend/sdk/component/runtime/manager/ComponentManager.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
package org.talend.sdk.component.runtime.manager;
1717

18+
import static java.lang.String.format;
1819
import static java.util.Arrays.asList;
1920
import static java.util.Collections.emptyList;
2021
import static java.util.Collections.emptyMap;
@@ -213,11 +214,14 @@ private static ComponentManager buildNewComponentManager() {
213214
{
214215
info("ComponentManager version: " + ComponentManagerVersion.VERSION);
215216
info("Creating the contextual ComponentManager instance " + getIdentifiers());
216-
217-
parallelIf(Boolean.getBoolean("talend.component.manager.plugins.parallel"),
218-
container.getDefinedNestedPlugin().stream().filter(p -> !hasPlugin(p)))
219-
.forEach(this::addPlugin);
220-
info("Components: " + availablePlugins());
217+
try {
218+
parallelIf(Boolean.getBoolean("talend.component.manager.plugins.parallel"),
219+
container.getDefinedNestedPlugin().stream().filter(p -> !hasPlugin(p)))
220+
.forEach(this::addPlugin);
221+
info("Components: " + availablePlugins());
222+
} catch (Exception e) {
223+
info(format("Error while loading plugin found in plugins.properties: %s.", e.getMessage()));
224+
}
221225
}
222226

223227
@Override

container/container-core/src/main/java/org/talend/sdk/component/container/ContainerManager.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ public ContainerManager(final DependenciesResolutionConfiguration dependenciesRe
120120
if (PathFactory.get(System.getProperty("user.home")).resolve(".m2/repository").equals(rootRepo)) {
121121
final URL nested = classLoaderConfiguration.getParent().getResource("MAVEN-INF/repository");
122122
if (nested != null) {
123-
rootRepo = PathFactory.get(nested.getFile().replace("file:", ""));
123+
info("Nested maven repository: " + nested.getFile());
124+
rootRepo = PathFactory.get(nested.getFile().replaceAll("^(file|nested):", ""));
124125
}
125126
}
126127
this.rootRepositoryLocation = rootRepo;

0 commit comments

Comments
 (0)