Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

grails-core: package grails-context.xsd in the jar so <grails:component-scan> can be schema-validated

オープン 初心者向け
#16,635 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
74/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
groovy
領域
build-system

調査の方向性

grails-core/src/main/groovy/org/grails/spring/context/annotation/grails-context.xsd の XSD と META-INF/spring.schemas のマッピングから始めてください。その後 grails-core のビルドにある processResources の設定を確認します。jar をビルドし、XSD が spring.schemas と同じ場所にあることを確認してください。jar にスキーマが含まれ、grails:component-scan をパースする spec がスキーマ検証を有効にした状態で検証できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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

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.

主要言語
Groovy
スター
2.9k
フォーク
976
平均マージ
21時間 14分
マージ済み PR(30日)
174

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/grails-core のほかの issue

apache/grails-core の issue をすべて見る

似ている issue

Build System の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。