From 4cd4065394606ff574bffd5913032e5e7a5d9bc6 Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Mon, 17 Oct 2022 23:18:36 +0200 Subject: [PATCH] Build Modello improvement, change namespace for xsd - all Modello source will have the same version of model - generate Modello documentation in model directory - we have the same report name as documentation for model - change name space to https://www.mojohaus.org/VERSIONS/... - preserver old version of rule.xsd --- pom.xml | 31 +----- src/main/mdo/dependency-updates-report.mdo | 4 +- src/main/mdo/plugin-updates-report.mdo | 4 +- src/main/mdo/rule.mdo | 4 +- src/site/markdown/version-rules.md.vm | 8 +- src/site/markdown/xsd/index.md | 20 ++++ src/site/resources/xsd/rule-2.0.0.xsd | 116 +++++++++++++++++++++ src/site/site.xml | 4 +- 8 files changed, 153 insertions(+), 38 deletions(-) create mode 100644 src/site/markdown/xsd/index.md create mode 100644 src/site/resources/xsd/rule-2.0.0.xsd diff --git a/pom.xml b/pom.xml index f40b44df50..b2cb535f69 100644 --- a/pom.xml +++ b/pom.xml @@ -313,8 +313,7 @@ modello-maven-plugin - generate-rule - generate-sources + generate-source xpp3-reader @@ -323,29 +322,6 @@ java - - - src/main/mdo/rule.mdo - - 2.0.0 - - - - generate-reporting - generate-sources - - - xpp3-writer - - java - - - - src/main/mdo/dependency-updates-report.mdo - src/main/mdo/plugin-updates-report.mdo - - 2.0.0 - site-doc @@ -353,6 +329,9 @@ xdoc + + ${project.build.directory}/generated-site/xdoc/model + site-xsd @@ -371,7 +350,7 @@ src/main/mdo/dependency-updates-report.mdo src/main/mdo/plugin-updates-report.mdo - 2.0.0 + 2.1.0 diff --git a/src/main/mdo/dependency-updates-report.mdo b/src/main/mdo/dependency-updates-report.mdo index 03d9a7cdc2..c8f41b2d8d 100644 --- a/src/main/mdo/dependency-updates-report.mdo +++ b/src/main/mdo/dependency-updates-report.mdo @@ -21,8 +21,8 @@ under the License. + xml.namespace="https://www.mojohaus.org/VERSIONS/DEPENDENCY-UPDATES-REPORT/${version}" + xml.schemaLocation="https://www.mojohaus.org/versions-maven-plugin/xsd/dependency-updates-report-${version}.xsd"> dependency-updates-report DependencyUpdatesReport diff --git a/src/main/mdo/plugin-updates-report.mdo b/src/main/mdo/plugin-updates-report.mdo index 12934b125f..685d75e3d0 100644 --- a/src/main/mdo/plugin-updates-report.mdo +++ b/src/main/mdo/plugin-updates-report.mdo @@ -21,8 +21,8 @@ under the License. + xml.namespace="https://www.mojohaus.org/VERSIONS/PLUGIN-UPDATES-REPORT/${version}" + xml.schemaLocation="https://www.mojohaus.org/versions-maven-plugin/xsd/plugin-updates-report-${version}.xsd"> plugin-updates-report PluginUpdatesReport diff --git a/src/main/mdo/rule.mdo b/src/main/mdo/rule.mdo index 0c9a9c68a7..d86917ae49 100644 --- a/src/main/mdo/rule.mdo +++ b/src/main/mdo/rule.mdo @@ -21,8 +21,8 @@ under the License. + xml.namespace="https://www.mojohaus.org/VERSIONS/RULE/${version}" + xml.schemaLocation="https://www.mojohaus.org/versions-maven-plugin/xsd/rule-${version}.xsd"> rule Rule diff --git a/src/site/markdown/version-rules.md.vm b/src/site/markdown/version-rules.md.vm index 3f1754cbec..89c617702e 100644 --- a/src/site/markdown/version-rules.md.vm +++ b/src/site/markdown/version-rules.md.vm @@ -58,7 +58,7 @@ it otherwise. Rules.xml --------- -To specify the version schemes to use, you may define a [rule-set xml file](./rule.html), use the `ruleSet` +To specify the version schemes to use, you may define a [rule-set xml file](./model/rule.html), use the `ruleSet` element in the `versions-maven-plugin` plugin configuration, or specify ignored versions via the `maven.version.ignore` property. @@ -68,8 +68,8 @@ The `rules.xml` file should conform to the xsd specified in the example below. ```xml + xmlns="https://www.mojohaus.org/VERSIONS/RULE/2.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="https://www.mojohaus.org/VERSIONS/RULE/2.1.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.1.0.xsd"> @@ -79,7 +79,7 @@ The `rules.xml` file should conform to the xsd specified in the example below. ``` -The rule-set files must match the [XSD schema](./xsd/rule-2.0.0.xsd). +The rule-set files must match the [XSD schema](./xsd/index.html). You can then use the `rulesUri` parameter to specify the rule-set to be used by the `versions-maven-plugin`. diff --git a/src/site/markdown/xsd/index.md b/src/site/markdown/xsd/index.md new file mode 100644 index 0000000000..ec05854c6a --- /dev/null +++ b/src/site/markdown/xsd/index.md @@ -0,0 +1,20 @@ +title: XML schemas +author: Slawomir Jaranowski +date: 2022-10-17 + + + +# Versions - XML schemas + +## dependency-updates-report.xsd + + - [dependency-updates-report-2.1.0.xsd](dependency-updates-report-2.1.0.xsd) + +## plugin-updates-report.xsd + + - [plugin-updates-report-2.1.0.xsd](plugin-updates-report-2.1.0.xsd) + +## rule.xsd + + - [rule-2.0.0.xsd](rule-2.0.0.xsd) + - [rule-2.1.0.xsd](rule-2.1.0.xsd) diff --git a/src/site/resources/xsd/rule-2.0.0.xsd b/src/site/resources/xsd/rule-2.0.0.xsd new file mode 100644 index 0000000000..45dedf444b --- /dev/null +++ b/src/site/resources/xsd/rule-2.0.0.xsd @@ -0,0 +1,116 @@ + + + + + + + + + 1.0.0+ + + Describes a set of rules for how versions of artifacts should be handled. + + + + + + 1.0.0+ + + Describes a set of rules for how versions of artifacts should be handled. + + + + + + 2.0.0+ + Version patterns to ignore for all artifacts. + + + + + + + + + + 1.0.0+ + + + + + + + + + + + 1.0.0+ + The comparison method to use when no rule matches. + + + + + + + + 2.0.0+ + A version to ignore. + + + + 2.0.0+ + The type of ignore mechanism to use. Allowed values are 'exact' and 'regex'. + + + + + + + + 1.0.0+ + + Describes a rule for how versions of artifacts should be handled. + + + + + + 2.0.0+ + Version patterns to ignore for this rule. + + + + + + + + + + + 1.0.0+ + + The for groupId to which this rule applies. Wildcards with ? and * are valid. + A rule applies to all child groupIds unless overridden by a subsequent rule. + A rule without wildcards will override a rule with wildcards. + A rule with ? wildcards will override a rule with * wildcards. + + + + + + 1.0.0+ + + The artifactId to which this rule applies. Wildcards with ? and * are valid. + A rule without wildcards will override a rule with wildcards. + A rule with ? wildcards will override a rule with * wildcards. + + + + + + 1.0.0+ + The comparison method that this rule specifies. + + + + diff --git a/src/site/site.xml b/src/site/site.xml index 9da0008a59..3a21555dd9 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -30,8 +30,8 @@ - - + +