Repository: mojohaus/versions
Pull request #1177 (2024-11-09 08:14:56)

Bump project version to 2.18.0-SNAPSHOT


Patch:
diff --git a/pom.xml b/pom.xml
index 9a9a4257..0993af78 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
 
   <groupId>org.codehaus.mojo.versions</groupId>
   <artifactId>versions</artifactId>
-  <version>2.17.2-SNAPSHOT</version>
+  <version>2.18.0-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <name>Versions</name>
@@ -141,7 +141,7 @@
     <!-- execute ITS in parallel by default -->
     <invoker.parallelThreads>0.75C</invoker.parallelThreads>
     <!-- mono-module doesn't require site:stage for scm-publish -->
-    <project.build.outputTimestamp>2024-07-15T06:24:00Z</project.build.outputTimestamp>
+    <project.build.outputTimestamp>2024-11-09T07:51:30Z</project.build.outputTimestamp>
   </properties>
 
   <dependencyManagement>
diff --git a/versions-api/pom.xml b/versions-api/pom.xml
index fd1453d0..7a99d802 100644
--- a/versions-api/pom.xml
+++ b/versions-api/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.codehaus.mojo.versions</groupId>
     <artifactId>versions</artifactId>
-    <version>2.17.2-SNAPSHOT</version>
+    <version>2.18.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>versions-api</artifactId>
diff --git a/versions-common/pom.xml b/versions-common/pom.xml
index 6de36a28..d6a32859 100644
--- a/versions-common/pom.xml
+++ b/versions-common/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.codehaus.mojo.versions</groupId>
     <artifactId>versions</artifactId>
-    <version>2.17.2-SNAPSHOT</version>
+    <version>2.18.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>versions-common</artifactId>
@@ -144,12 +144,13 @@
             <model>src/main/mdo/core-extensions.mdo</model>
           </models>
           <version>1.1.0</version>
+          <domAsXpp3>false</domAsXpp3>
         </configuration>
         <executions>
           <execution>
             <id>generate-java-classes</id>
             <goals>
-              <goal>xpp3-reader</goal>
+              <goal>stax-reader</goal>
               <goal>java</goal>
             </goals>
             <phase>generate-sources</phase>
@@ -166,7 +167,7 @@
         <configuration>
           <!-- Exclude packages generated by Modello in JavaDocs -->
           <excludePackageNames>org.codehaus.mojo.versions.model,
-            org.codehaus.mojo.versions.model.io.xpp3,
+            org.codehaus.mojo.versions.model.io.stax,
             org.codehaus.mojo.versions.utils</excludePackageNames>
         </configuration>
       </plugin>
diff --git a/versions-common/src/main/java/org/codehaus/mojo/versions/api/DefaultVersionsHelper.java b/versions-common/src/main/java/org/codehaus/mojo/versions/api/DefaultVersionsHelper.java
index edb5309f..8f74bb77 100644
--- a/versions-common/src/main/java/org/codehaus/mojo/versions/api/DefaultVersionsHelper.java
+++ b/versions-common/src/main/java/org/codehaus/mojo/versions/api/DefaultVersionsHelper.java
@@ -19,9 +19,12 @@ package org.codehaus.mojo.versions.api;
  * under the License.
  */
 
+import javax.xml.stream.XMLStreamException;
+
 import java.io.BufferedInputStream;
 import java.io.File;
 import java.io.IOException;
+import java.io.InputStream;
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.nio.file.Files;
@@ -75,7 +78,7 @@ import org.apache.maven.wagon.proxy.ProxyInfo;
 import org.codehaus.mojo.versions.model.IgnoreVersion;
 import org.codehaus.mojo.versions.model.Rule;
 import org.codehaus.mojo.versions.model.RuleSet;
-import org.codehaus.mojo.versions.model.io.xpp3.RuleXpp3Reader;
+import org.codehaus.mojo.versions.model.io.stax.RuleStaxReader;
 import org.codehaus.mojo.versions.ordering.VersionComparator;
 import org.codehaus.mojo.versions.ordering.VersionComparators;
 import org.codehaus.mojo.versions.utils.DefaultArtifactVersionCache;
@@ -85,7 +88,6 @@ import org.codehaus.mojo.versions.utils.RegexUtils;
 import org.codehaus.mojo.versions.utils.VersionsExpressionEvaluator;
 import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException;
 import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator;
-import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 import org.eclipse.aether.RepositorySystem;
 import org.eclipse.aether.repository.AuthenticationContext;
 import org.eclipse.aether.repository.RemoteRepository;
@@ -101,6 +103,7 @@ import static java.util.Optional.empty;
 import static java.util.Optional.of;
 import static java.util.Optional.ofNullable;
 import static org.apache.maven.RepositoryUtils.toArtifact;
+;
 
 /**
  * Helper class that provides common functionality required by both the mojos and the reports.
@@ -740,10 +743,10 @@ public class DefaultVersionsHelper implements VersionsHelper {
             }
 
             try (BufferedInputStream bis = new BufferedInputStream(url.openStream())) {
-                RuleSet result = new RuleXpp3Reader().read(bis);
+                RuleSet result = new RuleStaxReader().read(bis);
                 logger.debug("Loaded rules from \"" + uri + "\" successfully");
                 return result;
-            } catch (IOException | XmlPullParserException e) {
+            } catch (IOException | XMLStreamException e) {
                 throw new MojoExecutionException("Could not load specified rules from " + uri, e);
             }
         }
@@ -905,8 +908,8 @@ public class DefaultVersionsHelper implements VersionsHelper {
                             try {
                                 Path tempFile = Files.createTempFile("rules-", ".xml");
                                 wagon.get(uri.resource, tempFile.toFile());
-                                try (BufferedInputStream is = new BufferedInputStream(Files.newInputStream(tempFile))) {
-                                    return new RuleXpp3Reader().read(is);
+                                try (InputStream is = Files.newInputStream(tempFile)) {
+                                    return new RuleStaxReader().read(is);
                                 } finally {
                                     Files.deleteIfExists(tempFile);
                                 }
@@ -915,8 +918,7 @@ public class DefaultVersionsHelper implements VersionsHelper {
                                 wagon.disconnect();
                             }
                         } catch (Exception e) {
-                            log.warn(e.getMessage());
-                            return null;
+                            throw new RuntimeException(e);
                         }
                     })
                     .orElseThrow(() -> new MojoExecutionException("Could not load specified rules from " + rulesUri));
diff --git a/versions-common/src/main/java/org/codehaus/mojo/versions/utils/CoreExtensionUtils.java b/versions-common/src/main/java/org/codehaus/mojo/versions/utils/CoreExtensionUtils.java
index 64564dfe..8affa2a4 100644
--- a/versions-common/src/main/java/org/codehaus/mojo/versions/utils/CoreExtensionUtils.java
+++ b/versions-common/src/main/java/org/codehaus/mojo/versions/utils/CoreExtensionUtils.java
@@ -16,6 +16,8 @@ package org.codehaus.mojo.versions.utils;
  * limitations under the License.
  */
 
+import javax.xml.stream.XMLStreamException;
+
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
@@ -26,8 +28,7 @@ import java.util.stream.Stream;
 
 import org.apache.maven.model.Extension;
 import org.apache.maven.project.MavenProject;
-import org.codehaus.mojo.versions.model.io.xpp3.CoreExtensionsXpp3Reader;
-import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+import org.codehaus.mojo.versions.model.io.stax.CoreExtensionsStaxReader;
 
 /**
  * Utilities for reading and handling core extensions.
@@ -43,17 +44,17 @@ public final class CoreExtensionUtils {
      * @param project {@link MavenProject} instance
      * @return stream of core extensions defined in the {@code ${project}/.mvn/extensions.xml} file
      * @throws IOException thrown if a file I/O operation fails
-     * @throws XmlPullParserException thrown if the file cannot be parsed
+     * @throws XMLStreamException thrown if the file cannot be parsed
      * @since 2.15.0
      */
-    public static Stream<Extension> getCoreExtensions(MavenProject project) throws IOException, XmlPullParserException {
+    public static Stream<Extension> getCoreExtensions(MavenProject project) throws IOException, XMLStreamException {
         Path extensionsFile = project.getBasedir().toPath().resolve(".mvn/extensions.xml");
         if (!Files.isRegularFile(extensionsFile)) {
             return Stream.empty();
         }
 
         try (Reader reader = new BufferedReader(new InputStreamReader(Files.newInputStream(extensionsFile)))) {
-            return new CoreExtensionsXpp3Reader()
+            return new CoreExtensionsStaxReader()
                     .read(reader).getExtensions().stream().map(ex -> ExtensionBuilder.newBuilder()
                             .withGroupId(ex.getGroupId())
                             .withArtifactId(ex.getArtifactId())
diff --git a/versions-common/src/main/java/org/codehaus/mojo/versions/utils/RegexUtils.java b/versions-common/src/main/java/org/codehaus/mojo/versions/utils/RegexUtils.java
index b6f5081e..014996ee 100644
--- a/versions-common/src/main/java/org/codehaus/mojo/versions/utils/RegexUtils.java
+++ b/versions-common/src/main/java/org/codehaus/mojo/versions/utils/RegexUtils.java
@@ -19,6 +19,8 @@ package org.codehaus.mojo.versions.utils;
  * under the License.
  */
 
+import static java.util.Optional.ofNullable;
+
 /**
  * Utility methods to help with regex manipulation.
  *
@@ -105,23 +107,21 @@ public final class RegexUtils {
     /**
      * Converts a wildcard rule to a regex rule.
      *
-     * @param wildcardRule the wildcard rule.
+     * @param wildcardRule the wildcard rule, may be {@code null}
      * @param exactMatch <code>true</code> results in an regex that will match the entire string, while
      *            <code>false</code> will match the start of the string.
      * @return The regex rule.
      */
     public static String convertWildcardsToRegex(String wildcardRule, boolean exactMatch) {
         StringBuilder regex = new StringBuilder();
-        int index = 0;
-        final int len = wildcardRule.length();
-        while (index < len) {
+        final int wildcardLength = ofNullable(wildcardRule).map(String::length).orElse(0);
+        for (int index = 0, nextIndex = 0; index < wildcardLength; index = nextIndex + 1) {
             final int nextQ = wildcardRule.indexOf('?', index);
             final int nextS = wildcardRule.indexOf('*', index);
             if (nextQ == -1 && nextS == -1) {
                 regex.append(quote(wildcardRule.substring(index)));
                 break;
             }
-            int nextIndex;
             if (nextQ == -1) {
                 nextIndex = nextS;
             } else if (nextS == -1) {
@@ -139,7 +139,6 @@ public final class RegexUtils {
             } else {
                 regex.append(".*");
             }
-            index = nextIndex + 1;
         }
         if (!exactMatch) {
             regex.append(".*");
diff --git a/versions-enforcer/pom.xml b/versions-enforcer/pom.xml
index f17ef994..403baa62 100644
--- a/versions-enforcer/pom.xml
+++ b/versions-enforcer/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.codehaus.mojo.versions</groupId>
     <artifactId>versions</artifactId>
-    <version>2.17.2-SNAPSHOT</version>
+    <version>2.18.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>versions-enforcer</artifactId>
diff --git a/versions-maven-plugin/pom.xml b/versions-maven-plugin/pom.xml
index a780bb44..8d6ebb2a 100644
--- a/versions-maven-plugin/pom.xml
+++ b/versions-maven-plugin/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.codehaus.mojo.versions</groupId>
     <artifactId>versions</artifactId>
-    <version>2.17.2-SNAPSHOT</version>
+    <version>2.18.0-SNAPSHOT</version>
   </parent>
 
   <groupId>org.codehaus.mojo</groupId>
@@ -160,10 +160,6 @@
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-xml</artifactId>
-    </dependency>
     <dependency>
       <groupId>javax.inject</groupId>
       <artifactId>javax.inject</artifactId>
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayExtensionUpdatesMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayExtensionUpdatesMojo.java
index efdfe896..503b04be 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayExtensionUpdatesMojo.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayExtensionUpdatesMojo.java
@@ -57,7 +57,6 @@ import org.codehaus.mojo.versions.utils.DependencyBuilder;
 import org.codehaus.mojo.versions.utils.ExtensionBuilder;
 import org.codehaus.mojo.versions.utils.ModelNode;
 import org.codehaus.mojo.versions.utils.SegmentUtils;
-import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 import org.eclipse.aether.RepositorySystem;
 
 import static java.util.Optional.of;
@@ -252,7 +251,7 @@ public class DisplayExtensionUpdatesMojo extends AbstractVersionsDisplayMojo {
                     .filter(includeFilter::matchersMatch)
                     .filter(excludeFilter::matchersDontMatch)
                     .collect(Collectors.toSet());
-        } catch (IOException | XmlPullParserException e) {
+        } catch (IOException | XMLStreamException e) {
             throw new MojoExecutionException(e.getMessage());
         }
         if (dependencies.isEmpty()) {
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/xml/DependencyUpdatesXmlReportRenderer.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/xml/DependencyUpdatesXmlReportRenderer.java
index 8cdec4a6..b9ba455c 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/xml/DependencyUpdatesXmlReportRenderer.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/xml/DependencyUpdatesXmlReportRenderer.java
@@ -19,6 +19,8 @@ package org.codehaus.mojo.versions.xml;
  * under the License.
  */
 
+import javax.xml.stream.XMLStreamException;
+
 import java.io.BufferedWriter;
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
@@ -38,7 +40,7 @@ import org.codehaus.mojo.versions.reporting.model.DependencyInfo;
 import org.codehaus.mojo.versions.reporting.model.DependencyReportSummary;
 import org.codehaus.mojo.versions.reporting.model.DependencyUpdatesModel;
 import org.codehaus.mojo.versions.reporting.model.DependencyUpdatesReport;
-import org.codehaus.mojo.versions.reporting.model.io.xpp3.DependencyUpdatesReportXpp3Writer;
+import org.codehaus.mojo.versions.reporting.model.io.stax.DependencyUpdatesReportStaxWriter;
 import org.codehaus.mojo.versions.reporting.util.ReportRenderer;
 
 import static java.util.Optional.empty;
@@ -91,7 +93,7 @@ public class DependencyUpdatesXmlReportRenderer implements ReportRenderer {
     @Override
     public void render() {
         try (BufferedWriter writer = Files.newBufferedWriter(outputFile, StandardCharsets.UTF_8)) {
-            new DependencyUpdatesReportXpp3Writer().write(writer, new DependencyUpdatesReport() {
+            new DependencyUpdatesReportStaxWriter().write(writer, new DependencyUpdatesReport() {
                 {
                     setSummary(new DependencyReportSummary() {
                         {
@@ -109,7 +111,7 @@ public class DependencyUpdatesXmlReportRenderer implements ReportRenderer {
                     setDependencies(createDependencyInfo(model.getArtifactUpdates(), isAllowSnapshots()));
                 }
             });
-        } catch (IOException e) {
+        } catch (IOException | XMLStreamException e) {
             throw new RuntimeException(e);
         }
     }
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/xml/PluginUpdatesXmlReportRenderer.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/xml/PluginUpdatesXmlReportRenderer.java
index 7aac9e16..da549b72 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/xml/PluginUpdatesXmlReportRenderer.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/xml/PluginUpdatesXmlReportRenderer.java
@@ -19,6 +19,8 @@ package org.codehaus.mojo.versions.xml;
  * under the License.
  */
 
+import javax.xml.stream.XMLStreamException;
+
 import java.io.BufferedWriter;
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
@@ -38,7 +40,7 @@ import org.codehaus.mojo.versions.reporting.model.PluginInfo;
 import org.codehaus.mojo.versions.reporting.model.PluginReportSummary;
 import org.codehaus.mojo.versions.reporting.model.PluginUpdatesModel;
 import org.codehaus.mojo.versions.reporting.model.PluginUpdatesReport;
-import org.codehaus.mojo.versions.reporting.model.io.xpp3.PluginUpdatesReportXpp3Writer;
+import org.codehaus.mojo.versions.reporting.model.io.stax.PluginUpdatesReportStaxWriter;
 import org.codehaus.mojo.versions.reporting.util.ReportRenderer;
 
 import static java.util.Optional.empty;
@@ -91,7 +93,7 @@ public class PluginUpdatesXmlReportRenderer implements ReportRenderer {
     @Override
     public void render() {
         try (BufferedWriter writer = Files.newBufferedWriter(outputFile, StandardCharsets.UTF_8)) {
-            new PluginUpdatesReportXpp3Writer().write(writer, new PluginUpdatesReport() {
+            new PluginUpdatesReportStaxWriter().write(writer, new PluginUpdatesReport() {
                 {
                     setSummary(new PluginReportSummary() {
                         {
@@ -109,7 +111,7 @@ public class PluginUpdatesXmlReportRenderer implements ReportRenderer {
                     setPlugins(createPluginInfo(model.getArtifactUpdates(), isAllowSnapshots()));
                 }
             });
-        } catch (IOException e) {
+        } catch (IOException | XMLStreamException e) {
             throw new RuntimeException(e);
         }
     }
diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/xml/PropertyUpdatesXmlReportRenderer.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/xml/PropertyUpdatesXmlReportRenderer.java
index 710e2596..afca1e3d 100644
--- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/xml/PropertyUpdatesXmlReportRenderer.java
+++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/xml/PropertyUpdatesXmlReportRenderer.java
@@ -19,6 +19,8 @@ package org.codehaus.mojo.versions.xml;
  * under the License.
  */
 
+import javax.xml.stream.XMLStreamException;
+
 import java.io.BufferedWriter;
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
@@ -40,7 +42,7 @@ import org.codehaus.mojo.versions.reporting.model.PropertyInfo;
 import org.codehaus.mojo.versions.reporting.model.PropertyReportSummary;
 import org.codehaus.mojo.versions.reporting.model.PropertyUpdatesModel;
 import org.codehaus.mojo.versions.reporting.model.PropertyUpdatesReport;
-import org.codehaus.mojo.versions.reporting.model.io.xpp3.PropertyUpdatesReportXpp3Writer;
+import org.codehaus.mojo.versions.reporting.model.io.stax.PropertyUpdatesReportStaxWriter;
 import org.codehaus.mojo.versions.reporting.util.ReportRenderer;
 
 import static java.util.Optional.empty;
@@ -89,7 +91,7 @@ public class PropertyUpdatesXmlReportRenderer implements ReportRenderer {
     @Override
     public void render() {
         try (BufferedWriter writer = Files.newBufferedWriter(outputFile, StandardCharsets.UTF_8)) {
-            new PropertyUpdatesReportXpp3Writer().write(writer, new PropertyUpdatesReport() {
+            new PropertyUpdatesReportStaxWriter().write(writer, new PropertyUpdatesReport() {
                 {
                     setSummary(new PropertyReportSummary() {
                         {
@@ -105,7 +107,7 @@ public class PropertyUpdatesXmlReportRenderer implements ReportRenderer {
                     setProperties(createPropertyInfo(model.getAllUpdates(), allowSnapshots));
                 }
             });
-        } catch (IOException e) {
+        } catch (IOException | XMLStreamException e) {
             throw new RuntimeException(e);
         }
     }
diff --git a/versions-model-report/pom.xml b/versions-model-report/pom.xml
index f1ee87f4..19c5c779 100644
--- a/versions-model-report/pom.xml
+++ b/versions-model-report/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.codehaus.mojo.versions</groupId>
     <artifactId>versions</artifactId>
-    <version>2.17.2-SNAPSHOT</version>
+    <version>2.18.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>versions-model-report</artifactId>
@@ -12,13 +12,6 @@
   <name>Versions Model Report</name>
   <description>Modello models used in reports</description>
 
-  <dependencies>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-xml</artifactId>
-    </dependency>
-  </dependencies>
-
   <build>
     <plugins>
       <plugin>
@@ -31,16 +24,14 @@
             <model>src/main/mdo/property-updates-report.mdo</model>
           </models>
           <version>${modelloNamespaceReportVersion}</version>
+          <domAsXpp3>false</domAsXpp3>
         </configuration>
         <executions>
           <execution>
             <id>generate-rule</id>
             <goals>
-              <!-- Generate the xpp3 reader code -->
-              <goal>xpp3-reader</goal>
-              <!-- Generate the xpp3 writer code -->
-              <goal>xpp3-writer</goal>
-              <!-- Generate the Java sources for the model itself -->
+              <goal>stax-reader</goal>
+              <goal>stax-writer</goal>
               <goal>java</goal>
             </goals>
             <phase>generate-sources</phase>
diff --git a/versions-model/pom.xml b/versions-model/pom.xml
index bd4dacb9..1d24346c 100644
--- a/versions-model/pom.xml
+++ b/versions-model/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.codehaus.mojo.versions</groupId>
     <artifactId>versions</artifactId>
-    <version>2.17.2-SNAPSHOT</version>
+    <version>2.18.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>versions-model</artifactId>
@@ -12,14 +12,16 @@
   <name>Versions Model</name>
   <description>Modello models used in plugin</description>
 
-  <dependencies>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-xml</artifactId>
-    </dependency>
-  </dependencies>
-
   <build>
+    <resources>
+      <resource>
+        <filtering>true</filtering>
+        <directory>${project.basedir}/src/main/mdo</directory>
+        <includes>
+          <include>*.mdo</include>
+        </includes>
+      </resource>
+    </resources>
     <plugins>
       <plugin>
         <groupId>org.codehaus.modello</groupId>
@@ -29,14 +31,13 @@
             <model>src/main/mdo/rule.mdo</model>
           </models>
           <version>${modelloNamespaceRuleVersion}</version>
+          <domAsXpp3>false</domAsXpp3>
         </configuration>
         <executions>
           <execution>
             <id>generate-rule</id>
             <goals>
-              <!-- Generate the xpp3 reader code -->
-              <goal>xpp3-reader</goal>
-              <!-- Generate the Java sources for the model itself -->
+              <goal>stax-reader</goal>
               <goal>java</goal>
             </goals>
             <phase>generate-sources</phase>
diff --git a/versions-model/src/main/mdo/rule.mdo b/versions-model/src/main/mdo/rule.mdo
index eccd9fc5..93912c77 100644
--- a/versions-model/src/main/mdo/rule.mdo
+++ b/versions-model/src/main/mdo/rule.mdo
@@ -34,9 +34,6 @@ under the License.
       <value>org.codehaus.mojo.versions.model</value>
     </default>
   </defaults>
-  <versionDefinition>
-    <type>namespace</type>
-  </versionDefinition>
   <classes>
     <class xml.tagName="rule">
       <name>Rule</name>


Test patch:
diff --git a/versions-common/src/test/java/org/codehaus/mojo/versions/utils/CoreExtensionUtilsTest.java b/versions-common/src/test/java/org/codehaus/mojo/versions/utils/CoreExtensionUtilsTest.java
index 7af0c343..9507567e 100644
--- a/versions-common/src/test/java/org/codehaus/mojo/versions/utils/CoreExtensionUtilsTest.java
+++ b/versions-common/src/test/java/org/codehaus/mojo/versions/utils/CoreExtensionUtilsTest.java
@@ -15,6 +15,8 @@ package org.codehaus.mojo.versions.utils;
  * limitations under the License.
  */
 
+import javax.xml.stream.XMLStreamException;
+
 import java.io.File;
 import java.io.IOException;
 import java.util.Optional;
@@ -24,7 +26,6 @@ import java.util.stream.Collectors;
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.model.Extension;
 import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 import org.junit.jupiter.api.Test;
 
 import static org.hamcrest.MatcherAssert.assertThat;
@@ -41,7 +42,7 @@ import static org.mockito.Mockito.when;
 class CoreExtensionUtilsTest {
 
     @Test
-    void testNoExtensions() throws XmlPullParserException, IOException {
+    void testNoExtensions() throws IOException, XMLStreamException {
         MavenProject project = mock(MavenProject.class);
         when(project.getBasedir())
                 .thenReturn(
@@ -52,7 +53,7 @@ class CoreExtensionUtilsTest {
     }
 
     @Test
-    void testExtensionsFound() throws XmlPullParserException, IOException {
+    void testExtensionsFound() throws IOException, XMLStreamException {
         MavenProject project = mock(MavenProject.class);
         when(project.getBasedir())
                 .thenReturn(new File("src/test/resources/org/codehaus/mojo/versions/utils/core-extensions"));
diff --git a/versions-common/src/test/resources/org/codehaus/mojo/versions/api/rules.xml b/versions-common/src/test/resources/org/codehaus/mojo/versions/api/rules.xml
index 7efd3bff..24ed244f 100644
--- a/versions-common/src/test/resources/org/codehaus/mojo/versions/api/rules.xml
+++ b/versions-common/src/test/resources/org/codehaus/mojo/versions/api/rules.xml
@@ -1,6 +1,4 @@
-<ruleset comparisonMethod="maven"
-         xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
+<ruleset comparisonMethod="maven">
   <ignoreVersions>
     <ignoreVersion type="regex">.*-alpha</ignoreVersion>
     <ignoreVersion type="regex">.*-beta</ignoreVersion>
diff --git a/versions-test/pom.xml b/versions-test/pom.xml
index 00556949..41906af2 100644
--- a/versions-test/pom.xml
+++ b/versions-test/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.codehaus.mojo.versions</groupId>
     <artifactId>versions</artifactId>
-    <version>2.17.2-SNAPSHOT</version>
+    <version>2.18.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>versions-test</artifactId>