nextflow-io / nf-hello

Nextflow plugin implementation skeleton

Home Page:https://nextflow.io/docs/latest/plugins.html

Repository from Github https://github.comnextflow-io/nf-helloRepository from Github https://github.comnextflow-io/nf-hello

Task 'exportClasspath' not found in root project 'nf-hello' and its subprojects.

stevekm opened this issue · comments

As per the README

  1. Run Nextflow with the plugin, using ./launch.sh as a drop-in replacement for the nextflow command, and adding the option -plugins nf-hello to load the plugin:
./launch.sh run nextflow-io/hello -plugins nf-hello

I get the error

Missing '.launch.classpath' file -- create it by running: ./gradlew exportClasspath

and if I try to run the command suggested, I get another error

./gradlew exportClasspath

FAILURE: Build failed with an exception.

* What went wrong:
Task 'exportClasspath' not found in root project 'nf-hello' and its subprojects.

Ideas?

$ gradle --version

------------------------------------------------------------
Gradle 7.6
------------------------------------------------------------


$ java --version
openjdk 11.0.22 2024-01-16 LTS
OpenJDK Runtime Environment Corretto-11.0.22.7.1 (build 11.0.22+7-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.22.7.1 (build 11.0.22+7-LTS, mixed mode)

running against Nextflow version 567f5334ff0d225cd95dc7b5239c4dbd64696a9a

Possibly related. When I run make compile I get:

./gradlew :nextflow:exportClasspath compileGroovy

FAILURE: Build failed with an exception.

* What went wrong:
Cannot locate tasks that match ':nextflow:exportClasspath' as project 'nextflow' not found in root project 'nf-hello'.

I was never able to find the root cause of this issue. I would look into but now we have someone working on a more comprehensive solution for the plugin boilerplate.

In the meantime, I just use the workaround described in #13 to build and install the plugin locally. It will overwrite the actual installed version, but it works and as a bonus it allows you to test the plugin without needing to build nextflow locally. Just pin the plugin version in your config and run with nextflow.