Skip to content

Commit 2a5dc0e

Browse files
committed
implement PluginExecAware to expose plugin commands
1 parent ed4913b commit 2a5dc0e

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/main/groovy/provider/plugin/TestNfCommandsPlugin.groovy

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,24 @@
1717
package provider.plugin
1818

1919
import groovy.transform.CompileStatic
20+
import nextflow.cli.Launcher
21+
import nextflow.cli.PluginExecAware
2022
import nextflow.plugin.BasePlugin
2123
import org.pf4j.PluginWrapper
2224

2325
/**
2426
* The plugin entry point
2527
*/
2628
@CompileStatic
27-
class TestNfCommandsPlugin extends BasePlugin {
29+
class TestNfCommandsPlugin extends BasePlugin implements PluginExecAware {
2830

2931
TestNfCommandsPlugin(PluginWrapper wrapper) {
3032
super(wrapper)
3133
}
34+
35+
@Override
36+
int exec(Launcher launcher, String pluginId, String cmd, List<String> args) {
37+
println "Hello from test-nf-plugin-commands:${cmd}!"
38+
return 0
39+
}
3240
}

0 commit comments

Comments
 (0)