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 @@ -39,4 +39,5 @@
* First version this plugin was released.
*/
String firstVersion();

}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ public interface Plugin {
*/
void customize(CommandLine commandLine, CamelJBangMain main);

/**
* Custom classloader that was used when downloading additional dependencies.
*/
default void setClassLoader(ClassLoader classLoader) {
// noop
}

/**
* The plugin may provide an optional project exporter implementation that is able to participate in an export
* performed by Camel JBang. Project exporter implementations may add properties and dependencies to the generated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ private static Optional<Plugin> downloadPlugin(
DefaultClassResolver resolver = new DefaultClassResolver();
Class<?> pluginClass = resolver.resolveClass(pluginClassName, ddlcl);
instance = Optional.of(Plugin.class.cast(ObjectHelper.newInstance(pluginClass)));
instance.ifPresent(plugin -> plugin.setClassLoader(ddlcl));
} else {
String gav = String.join(":", group, "camel-jbang-plugin-" + command, version);
printer.printf(String.format("ERROR: Failed to read file %s in dependency %s%n", path, gav));
Expand Down
69 changes: 69 additions & 0 deletions dsl/camel-jbang/camel-jbang-plugin-tui/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jbang-parent</artifactId>
<version>4.19.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>camel-jbang-plugin-tui</artifactId>

<name>Camel :: JBang :: Plugin :: TUI</name>
<description>Camel JBang TUI Plugin - Terminal UI dashboards for monitoring Camel integrations</description>

<properties>
<firstVersion>4.19.0</firstVersion>
<label>jbang</label>
<supportLevel>Preview</supportLevel>
<camel-prepare-component>false</camel-prepare-component>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jbang-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-catalog</artifactId>
</dependency>
<dependency>
<groupId>dev.tamboui</groupId>
<artifactId>tamboui-tui</artifactId>
<version>0.1.0</version>
</dependency>
<dependency>
<groupId>dev.tamboui</groupId>
<artifactId>tamboui-widgets</artifactId>
<version>0.1.0</version>
</dependency>
<dependency>
<groupId>dev.tamboui</groupId>
<artifactId>tamboui-jline3-backend</artifactId>
<version>0.1.0</version>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Generated by camel build tools - do NOT edit this file!
class=org.apache.camel.dsl.jbang.core.commands.tui.TuiPlugin
Loading