Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -999,11 +999,9 @@ private int run() throws Exception {
.collect(Collectors.toSet());

for (PluginExporter exporter : exporters) {
addDependencies(exporter.getDependencies(runtime)
.stream()
.filter(dependency -> !dependency.startsWith("mvn@test")) // filter test scoped dependencies
.collect(Collectors.toSet())
.toArray(String[]::new));
if (exporter.contributeRuntimeDependencies()) {
addDependencies(exporter.getDependencies(runtime).toArray(String[]::new));
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ default boolean isEnabled() {
return true;
}

/**
* Whether this plugin exporter should contribute its dependencies when running Camel integrations via the run
* command. By default, plugin exporters do not contribute dependencies at runtime. Override this method to return
* true if the plugin needs its dependencies available at runtime.
*
* @return true if dependencies should be added during run, false otherwise.
*/
default boolean contributeRuntimeDependencies() {
return false;
}

/**
* Add plugin specific source files to the exported project.
*/
Expand Down
Loading