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

ml-gradle doesn't work with Java 11 and the Gradle daemon running #428

Closed
dmcassel opened this issue Feb 5, 2019 · 3 comments
Closed

ml-gradle doesn't work with Java 11 and the Gradle daemon running #428

dmcassel opened this issue Feb 5, 2019 · 3 comments
Labels
Milestone

Comments

@dmcassel
Copy link
Contributor

dmcassel commented Feb 5, 2019

Has ml-gradle been tested with Java 11 and Gradle 5? Those are the current versions. I tried using those versions with an existing project, but my modules don't get deployed. Wondering whether anyone else has used ml-gradle successfully under new versions.

@rjrudin
Copy link
Contributor

rjrudin commented Feb 6, 2019

It has not, and there's an issue with ml-app-deployer regarding this - marklogic/ml-app-deployer#313

If you have a chance, can you see if the same problem exists with Gradle 5 + Java 9 and Java 10, and add results to that ml-app-deployer ticket?

The short-term fix is to not run Gradle in daemon mode, but that's of course not a great fix.

@rjrudin rjrudin changed the title Support gradle 5 and JDK 11 Support JDK 11 Feb 8, 2019
@rjrudin rjrudin removed the question label Feb 8, 2019
@rjrudin
Copy link
Contributor

rjrudin commented Feb 8, 2019

Started looking into this - it's not specific to Gradle 5. Java 9 and 10 seem to not matter - seems like the common upgrade path is from Java 8 to 11. So I'm going to focus on supporting Java 11.

@dmcassel One short term hack is to set mlConfigPath and mlModulePaths to absolute paths - e.g. mlConfigPath=/Users/janedoe/project/src/main/ml-config.

@rjrudin rjrudin added this to the 3.12.0 milestone Feb 8, 2019
@rjrudin rjrudin added the bug label Feb 8, 2019
@rjrudin rjrudin changed the title Support JDK 11 ml-gradle doesn't work with Java 11 and the Gradle daemon running Feb 8, 2019
@rjrudin
Copy link
Contributor

rjrudin commented Feb 8, 2019

@dmcassel I have fixes for this in ml-app-deployer with a tiny but critical tweak in ml-gradle - will try to get 3.12.0 out soon to address Java 11 support. Still have the short term hack of setting mlConfigPaths, mlModulePaths, and mlSchemasPath to absolute paths.

rjrudin added a commit that referenced this issue Feb 8, 2019
This allows ml-gradle to work with Java 11 and the Gradle daemon, as paths in AppConfig are now constructed relative to the projectDir.

While testing CreateResource/CreateTransform, also made a little fix so that the last module path is used when writing out a file. This avoids a problem where the files could be written to e.g. mlRestApi paths.
@rjrudin rjrudin closed this as completed Feb 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants