diff --git a/independent-projects/bootstrap/bom/pom.xml b/independent-projects/bootstrap/bom/pom.xml
index 10504e6d084e3..5db6112b194ad 100644
--- a/independent-projects/bootstrap/bom/pom.xml
+++ b/independent-projects/bootstrap/bom/pom.xml
@@ -481,11 +481,6 @@
-
- io.fabric8
- maven-model-helper
- ${maven-model-helper.version}
-
io.smallrye.common
diff --git a/independent-projects/bootstrap/maven-resolver/pom.xml b/independent-projects/bootstrap/maven-resolver/pom.xml
index b6c21737f4c89..97ce31340034c 100644
--- a/independent-projects/bootstrap/maven-resolver/pom.xml
+++ b/independent-projects/bootstrap/maven-resolver/pom.xml
@@ -125,10 +125,6 @@
-
- io.fabric8
- maven-model-helper
-
org.junit.jupiter
junit-jupiter
diff --git a/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/ModelUtils.java b/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/ModelUtils.java
index 9786fbb004fc0..97f6c8f1456d4 100644
--- a/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/ModelUtils.java
+++ b/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/ModelUtils.java
@@ -1,9 +1,9 @@
package io.quarkus.bootstrap.resolver.maven.workspace;
import java.io.BufferedReader;
+import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
-import java.io.UncheckedIOException;
import java.nio.file.DirectoryStream;
import java.nio.file.FileSystem;
import java.nio.file.Files;
@@ -16,9 +16,10 @@
import org.apache.maven.model.Model;
import org.apache.maven.model.Parent;
+import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
+import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
-import io.fabric8.maven.Maven;
-import io.fabric8.maven.XMLFormat;
import io.quarkus.bootstrap.util.PropertyUtils;
import io.quarkus.fs.util.ZipUtils;
import io.quarkus.maven.dependency.ArtifactCoords;
@@ -231,30 +232,21 @@ private static Properties loadPomProps(Path appJar, Path artifactIdPath) throws
}
public static Model readModel(final Path pomXml) throws IOException {
- try {
- return Maven.readModel(pomXml);
- } catch (UncheckedIOException e) {
- throw e.getCause();
- } catch (RuntimeException e) {
- throw new IOException("Failed to read model", e.getCause());
- }
+ return readModel(Files.newInputStream(pomXml));
}
public static Model readModel(InputStream stream) throws IOException {
try (InputStream is = stream) {
- return Maven.readModel(is);
- } catch (UncheckedIOException e) {
- throw e.getCause();
- } catch (RuntimeException e) {
- throw new IOException("Failed to read model", e.getCause());
+ return new MavenXpp3Reader().read(stream);
+ } catch (XmlPullParserException e) {
+ throw new IOException("Failed to parse POM", e);
}
}
public static void persistModel(Path pomFile, Model model) throws IOException {
- try {
- Maven.writeModel(model, pomFile, XMLFormat.builder().indent(" ").insertLineBreakBetweenMajorSections().build());
- } catch (UncheckedIOException e) {
- throw e.getCause();
+ final MavenXpp3Writer xpp3Writer = new MavenXpp3Writer();
+ try (BufferedWriter pomFileWriter = Files.newBufferedWriter(pomFile)) {
+ xpp3Writer.write(pomFileWriter, model);
}
}
}
diff --git a/independent-projects/bootstrap/pom.xml b/independent-projects/bootstrap/pom.xml
index e6c49f43ba8c4..87bd3e65cc0fb 100644
--- a/independent-projects/bootstrap/pom.xml
+++ b/independent-projects/bootstrap/pom.xml
@@ -80,7 +80,6 @@
0.1.3
2.23.0
1.9.0
- 36
bom