Repository: quarkusio/quarkus
Issue: The quarkus-maven-plugin:dependency-tree not resolving the dependencies versions correctly

### Describe the bug

Building the dependency-tree using the Quarkus Maven plugin and following the instructions from here: https://quarkus.io/guides/maven-tooling#logging-quarkus-application-build-classpath-tree

Command:
```
mvn com.redhat.quarkus.platform:quarkus-maven-plugin:2.2.3.Final-redhat-00013:dependency-tree -Dquarkus.platform.group-id=com.redhat.quarkus.platform -Dquarkus.platform.artifact-id=quarkus-bom -Dquarkus.platform.version=2.2.3.Final-redhat-00013
```

Even when using the right Quarkus Maven plugin version, the resolved dependencies are not replacing the versions correctly (it's using the version declared in the pom.xml file):

```
[INFO] --- quarkus-maven-plugin:2.2.3.Final-redhat-00013:dependency-tree (default-cli) @ kafka-panache-reactive-quickstart ---
[INFO] Quarkus application DEV mode build dependency tree:
[INFO] org.acme:kafka-panache-reactive-quickstart:pom:1.0.0-SNAPSHOT
[INFO] ├─ io.quarkus:quarkus-smallrye-reactive-messaging-kafka-deployment:jar:2.2.2.Final (compile) -- SEE HERE
[INFO] │  ├─ io.quarkus:quarkus-core-deployment:jar:2.2.2.Final (compile)
[INFO] │  │  ├─ org.aesh:readline:jar:2.1 (compile)
```

Using the dependency:tree command from Maven directly, this is working as expected:

```
mvn dependency:tree -Dquarkus.platform.group-id=com.redhat.quarkus.platform -Dquarkus.platform.artifact-id=quarkus-bom -Dquarkus.platform.version=2.2.3.Final-redhat-00013
```

With output:

```
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ kafka-panache-reactive-quickstart ---
[INFO] org.acme:kafka-panache-reactive-quickstart:jar:1.0.0-SNAPSHOT
[INFO] +- io.quarkus:quarkus-smallrye-reactive-messaging-kafka:jar:2.2.3.Final-redhat-00013:compile
[INFO] |  +- io.quarkus:quarkus-kafka-client:jar:2.2.3.Final-redhat-00013:compile
[INFO] |  |  \\- io.quarkus:quarkus-caffeine:jar:2.2.3.Final-redhat-00013:compile
[INFO] |  |     \\- com.github.ben-manes.caffeine:caffeine:jar:2.9.2.redhat-00001:compile
```

### Expected behavior

_No response_

### Actual behavior

_No response_

### How to Reproduce?

_No response_

### Output of `uname -a` or `ver`

_No response_

### Output of `java -version`

_No response_

### GraalVM version (if different from Java)

_No response_

### Quarkus version or git rev

2.2 and Main

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)

_No response_

### Additional information

_No response_

Changed files:
devtools/maven/src/main/java/io/quarkus/maven/DependencyTreeMojo.java

diff --git a/devtools/maven/src/main/java/io/quarkus/maven/DependencyTreeMojo.java b/devtools/maven/src/main/java/io/quarkus/maven/DependencyTreeMojo.java
index 49f330da427..d07aa67cf4f 100644
--- a/devtools/maven/src/main/java/io/quarkus/maven/DependencyTreeMojo.java
+++ b/devtools/maven/src/main/java/io/quarkus/maven/DependencyTreeMojo.java
@@ -74,10 +74,14 @@ public void execute() throws MojoExecutionException, MojoFailureException {
     protected MavenArtifactResolver resolver() throws BootstrapMavenException {
         return resolver == null
                 ? resolver = MavenArtifactResolver.builder()
-                        .setRepositorySystem(bootstrapProvider.repositorySystem())
                         .setRemoteRepositoryManager(bootstrapProvider.remoteRepositoryManager())
-                        //.setRepositorySystemSession(repoSession) the session should be initialized with the loaded workspace
+                        // The system needs to be initialized with the bootstrap model builder to properly interpolate system properties set on the command line
+                        // e.g. -Dquarkus.platform.version=xxx
+                        //.setRepositorySystem(bootstrapProvider.repositorySystem())
+                        // The session should be initialized with the loaded workspace
+                        //.setRepositorySystemSession(repoSession)
                         .setRemoteRepositories(repos)
+                        // To support multimodule projects that haven't been installed
                         .setPreferPomsFromWorkspace(true)
                         .build()
                 : resolver;