You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@grails.apache.org by "borinquenkid (via GitHub)" <gi...@apache.org> on 2026/10/13 18:58:34 UTC

[I] grails-core: package grails-context.xsd in the jar so can be schema-validated [grails-core]

borinquenkid opened a new issue, #16635:
URL: https://github.com/apache/grails-core/issues/16635

   `META-INF/spring.schemas` maps `http://grails.org/schema/context/grails-context.xsd` to `org/grails/spring/context/annotation/grails-context.xsd`, but that file lives under `grails-core/src/main/groovy`, which the build does not treat as a resource directory.
   
   The XSD is therefore missing from the published `grails-core` jar (checked `grails-core-8.1.0-SNAPSHOT.jar`: only `spring.schemas` is there). An XSD-validating parse of `<grails:component-scan>` cannot resolve its schema locally and Xerces falls back to fetching `http://grails.org/schema/context/grails-context.xsd` over the network.
   
   The same is true on `8.0.x` and `9.0.x`, so this is not caused by the Java-to-Groovy conversion.
   
   Packaging the XSD, for example with
   
   ```groovy
   processResources {
       from('src/main/groovy') { include '**/*.xsd' }
   }
   ```
   
   fixes it. Specs that parse `<grails:component-scan>` could then turn schema validation back on.
   
   Found in review of #16586.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] grails-core: package grails-context.xsd in the jar so can be schema-validated [grails-core]

Posted by "hk2166 (via GitHub)" <gi...@apache.org>.
hk2166 commented on issue #16635:
URL: https://github.com/apache/grails-core/issues/16635#issuecomment-6232590643

   Hi @borinquenkid I'd like to take this. Plan: package the XSD with grails-core's resources, either by moving it to src/main/resources or with a processResources include as you suggested (happy to go with whichever you prefer), and add a spec that resolves http://grails.org/schema/context/grails-context.xsd through META-INF/spring.schemas from the classpath. It's on 7.0.x as well. Should this target 7.0.x, given it reaches end of support on Oct 31, or 7.2.x/8.0.x?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] grails-core: package grails-context.xsd in the jar so can be schema-validated [grails-core]

Posted by "hk2166 (via GitHub)" <gi...@apache.org>.
hk2166 commented on issue #16635:
URL: https://github.com/apache/grails-core/issues/16635#issuecomment-6440269197

   Fixed by #16687, merged into 7.0.x. Since it didn't land on the default branch, this didn't close automatically.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] grails-core: package grails-context.xsd in the jar so can be schema-validated [grails-core]

Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty closed issue #16635: grails-core: package grails-context.xsd in the jar so <grails:component-scan> can be schema-validated
URL: https://github.com/apache/grails-core/issues/16635


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org