Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gradlew assemble not working for local development #25

Closed
stevekm opened this issue Mar 18, 2024 · 10 comments
Closed

gradlew assemble not working for local development #25

stevekm opened this issue Mar 18, 2024 · 10 comments

Comments

@stevekm
Copy link
Contributor

stevekm commented Mar 18, 2024

as per the README, I ran the step

./gradlew assemble

but I get the error

FAILURE: Build failed with an exception.

* Where:
Settings file '/Users/.../nf-prov-dev/nextflow/settings.gradle' line: 21

* What went wrong:
An exception occurred applying plugin request [id: 'org.gradle.toolchains.foojay-resolver-convention', version: '0.7.0']
> Failed to apply plugin class 'org.gradle.toolchains.foojay.FoojayToolchainsPlugin'.
   > FoojayToolchainsPlugin needs Gradle version 7.6 or higher

It seems that the current version of nf-prov has this

  • gradle/wrapper/gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip

which seems to be incompatible with the latest version of the nextflow repo

I tried changing it to this

distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip

but then I get this error

FAILURE: Build failed with an exception.

* What went wrong:
Could not open settings generic class cache for settings file '/Users/.../nf-prov-dev/nf-prov/settings.gradle' (/Users/.../.gradle/caches/7.6.2/scripts/6sr36fd7svoelv27sw2cwpzp5).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 64

Not sure what I need to do to make it work, seems like there are potentially multiple version mis-matches for Gradle / Java / etc. between the nextflow and nf-prov repos?

I am running with this version of Java (installed / managed with conda)

$ java --version
openjdk 20.0.2 2023-07-18
OpenJDK Runtime Environment Zulu20.32+11-CA (build 20.0.2+9)
OpenJDK 64-Bit Server VM Zulu20.32+11-CA (build 20.0.2+9, mixed mode, sharing)
@stefanches7
Copy link

I have the same issue

@bentsherman
Copy link
Member

The build scripts probably just need to be updated, in the meantime I would build against an earlier version of Nextflow

@stefanches7
Copy link

Changing gradle version in distributionUrl to 7.6 in gradle/wrapper/gradle-wrapper.properties has done it for me

@bentsherman
Copy link
Member

For now I updated the README to use Nextflow 23.10 when building locally. I will update it on the next stable release.

To be honest, I usually don't build this way anymore because it is brittle for other reasons. For me it is easier to simply make install and run Nextflow as usual. Doesn't require you to clone the Nextflow repo

@stevekm
Copy link
Contributor Author

stevekm commented Mar 19, 2024

which version of Java and Gradle are you using?

@bentsherman
Copy link
Member

Java 17, Gradle version is defined in the Nextflow and nf-prov repos

@stefanches7
Copy link

stefanches7 commented Mar 20, 2024

And how do you run a workflow from development? Executing launch.sh gives following:
image

If I use my nextflow CLI, it tells wrroc format is not accepted.

Perhaps it is a separate issue, though.

@stevekm
Copy link
Contributor Author

stevekm commented Mar 22, 2024

@stefanches7 I am now using the methods outlined here https://github.com/stevekm/nf-niceutils/blob/main/NOTES.md in particular I am using the method included in the Gradle project there to move the plugin files to the location at $HOME/.nextflow/plugins, this is working better for me now. Not sure if the same method is scripted up the same way here? In that repo its the task ./gradlew unzipPlugin which I believe is coming from this file https://github.com/stevekm/nf-niceutils/blob/main/buildSrc/src/main/groovy/nextflow/plugins/UnzipPluginTask.groovy

maybe we could get the same added to this repo? Seems like this kind of method is a little more robust as alluded to by @bentsherman

@stevekm
Copy link
Contributor Author

stevekm commented Mar 22, 2024

I think in this repo the same steps are wrapped up here

https://github.com/nextflow-io/nf-prov/blob/master/Makefile#L46-L50

@stevekm
Copy link
Contributor Author

stevekm commented May 21, 2024

this is fixed by the updates in #31

this method also works;

# install local Nextflow
# wget -qO- https://get.nextflow.io | bash

./gradlew assemble

NXF_PLUGINS_DEV=$PWD/plugins ./nextflow run tests/test.nf

@stevekm stevekm closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants