-
Notifications
You must be signed in to change notification settings - Fork 41
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
Can't get to work with grails 5 #368
Comments
I made an empty grails project:
And I made only one change to the project, I added
to the buildscript dependencies. And then I get the "Multiple possible bean candidates found" error as above. So in my view, 2.2.0 is completely broken. And thus this plugin is unusable with grails 5. |
I have experienced the similar issues with grails 5. https://stackoverflow.com/questions/70925978/grails-5-gson-views-not-rendoring |
@chrisbitmead I am unable to replicate the problem using the steps shared by you. Could you please make sure that you are using Grails 5.1.2? @starkleem I think the problem described on Stackoverflow is different from the original issue shared here. |
I compared it with the previous version that we used (2.0.0) and the difference seems to be this changed not familiar with the code, but the previous code calls the |
The above error might happen because of earlier version of Micronaut. I remember fixing this issue in some recent version. See micronaut-projects/micronaut-spring#240. I am unable to replicate it in a sample application. Could you please share a sample application?
I believe 2.1.x and 2.0.x is incompatible with Gradle 7. |
@puneetbehl I'm using grails 5.0.3. In my view, grails 5.1 is not ready for prime time. The sample application is as described above... use grails 5.0.3
and add this plugin |
@puneetbehl If there's a workaround by upgrading micronaut, could you post it here? |
@chrisbitmead Yes, you could try setting |
@xpusostomos Could you please share a sample application using Grails 5.1.2 and Grails Views 2.2.0 which reproduces the above error? |
@puneetbehl do you have a suggestion what to set micronaut.version to? I don't have to set it in build.gradle, only gradle.properties? I couldn't get grails 5.1 to work with my app when I tried a month ago. I can't remember anymore what the issue was... , but I figured that 5.1 must be too bleeding edge, and decided to go to 5.0.3, and that worked for me. So I don't have a sample of 5.1.2 that breaks. It may well be fixed there, I don't know. It is 5.0.3 where I see the problem. |
@chrisbitmead I would recommend updating to 5.1.2. I am not aware of any alternate other than using the default Grails Views version shipped with Grails 5.0.3 . |
Greetings,
and
and
Yes I know this is a bit mixed up, tried a few combinations and this one does work deployed as a WAR with Tomcat 9. G. |
I'm porting a working application from grails4 to grails5. I've already ported several other apps to grails5 (albeit, not ones that use views-json), so I'm fairly comfortable with the grails5 upgrade process. But in this particular app I upgraded the views-json plugin to 2.2.0. If I don't use "apply plugin", but just add the "implementation" to my dependencies, it works when running in Intellij idea. However, that doesn't work for production. So when I add the "apply plugin", I get this error on startup...
I can't make any sense of it, but it seems to be related to this plugin.
If I use version 2.1.0 of the views-json plugin, I get the following error on startup....
Task :fap:server:compileGsonViews FAILED
Execution optimizations have been disabled for task ':fap:server:compileGsonViews' to ensure correctness due to the following reasons:
FAILURE: Build failed with an exception.
Some problems were found with the configuration of task ':fap:server:compileGsonViews' (type 'JsonViewCompilerTask').
In plugin 'org.grails.plugins.views-json' type 'grails.views.gradle.json.JsonViewCompilerTask' property 'compileOptions.encoding' is missing an input or output annotation.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
In plugin 'org.grails.plugins.views-json' type 'grails.views.gradle.json.JsonViewCompilerTask' property 'compileOptions.forkOptions' is missing an input or output annotation.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
In plugin 'org.grails.plugins.views-json' type 'grails.views.gradle.json.JsonViewCompilerTask' property 'compilerName' is missing an input or output annotation.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
In plugin 'org.grails.plugins.views-json' type 'grails.views.gradle.json.JsonViewCompilerTask' property 'fileExtension' is missing an input or output annotation.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
In plugin 'org.grails.plugins.views-json' type 'grails.views.gradle.json.JsonViewCompilerTask' property 'scriptBaseName' is missing an input or output annotation.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
And I can't use the 2.0.4 version of the plugin, I guess because it was configured for an older gradle. Do you have any ideas?
The text was updated successfully, but these errors were encountered: