I have reported an issue with the org.grails.plugi...
# questions
t
I have reported an issue with the org.grails.pluginsviews markup4.0.0-M3 plugin and it should have been fixed and merged: https://github.com/apache/grails-gradle-plugin/issues/428 Grails 7.0.0-M4 was released yesterday but I don't think a new version of the views-markup plugin was released?
p
I haven't tracked your particular issue but there is a new version of the grails-views-markup jar: https://repo1.maven.org/maven2/org/apache/grails/grails-views-markup/7.0.0-M4/
t
I am trying to apply the plugin, but I can't figure out what the id of the new plugin is? It used to be:
apply plugin: 'org.grails.plugins.views-markup'
But that is no longer valid, I tried changing it to Apache (multiple combinations) but that doesn't work either?...
apply plugin: 'org.apache.plugins.views-markup'
and adding to the classpath but no luck:
buildscript {
...
dependencies {
...
classpath "org.apache.grails:grails-views-markup:$grailsVersion"
}
...
}
s
do you have
mavenCentral()
in your
repositories
list?
t
Yes
I tried with a clean Grails 7.0.0-M4 project The
grails-gsp
and
grails-web
plugins works fine
Copy code
apply plugin:"org.apache.grails.gradle.grails-gsp"
s
I think you've found a bug
On a just created
<http://start.grails.org|start.grails.org>
project with feature: markup-view I get:
Copy code
Build file '/home/sbglasius/projects/sandbox/grails/demo/build.gradle' line: 25

A problem occurred evaluating root project 'demo'.
> Failed to apply plugin 'org.apache.grails.gradle.grails-markup'.
   > Could not create task ':compileGmlViews'.
      > Could not create task of type 'MarkupViewCompilerTask'.
         > Cannot invoke "org.gradle.api.provider.Property.convention(Object)" because "this.fileExtension" is null
t
Ok, so the plugin id is:
apply plugin: "org.apache.grails.gradle.grails-markup"
And yes it looks af if ther is an issue...
j
https://github.com/apache/grails-forge/issues/594 https://github.com/apache/grails-core/issues/14804 I was surprised we didn't see this in grails-forge testing, but it didn't have test coverage for that feature
👍 1
s
Thank you @James Fredley
🚀 1
j
FYI: We've merged an initial fix for the markup plugin as part of the gradle deprecation cleanup. I think there may still be issues here though. @Thomas Rasmussen if you have time to test the next snapshot build (https://github.com/apache/grails-core/actions/runs/15626261655/job/44021000936) it would be helpful. I posted to the grails-core ticket - if we can get the test project that was submitted working, we'll check it in as a functional test to prevent these issues going forward.
t
I no longer get this error:
Copy code
Cannot invoke "org.gradle.api.provider.Property.convention(Object)" because "this.fileExtension" is null
Now I get this one (on a clean project from start.grails.org with the markup views plugin added):
Copy code
demo/grails-app/views/object/_object.gml: 7: [Static type checking] - Cannot find matching method java.lang.Object#render(java.lang.String). Please check if the declared type is correct and if the method exists.
 @ line 7, column 1.
   g.render("object")
   ^
1 error
Something is not being initialized correct but I can't figure out why?...
Copy code
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'markupViewResolver': Cannot resolve reference to bean 'smartMarkupViewResolver' while setting constructor argument
j
so you think the gml code is valid?
I can dig in to see wha'ts going on
j
if you remove the @CompileStatic at the top, does it worK?
t
No, I also tried changing it in application.yml
Copy code
grails:
  views:
    markup:
      compileStatic: false
j
i'll have to research this, will look this afternoon
👍 1
Well, the problem is we weren't applying the markup / gson pluginst o the views functional tests
so there are tests for this, but we weren't using them 🤦‍♂️
the views-functional-tests are failing in grials core after applying those. i'm investigating
actually, looks like that test is designed to fail at runtime
so i guess we'll have to add more