Repository: quarkusio/quarkus
Issue: QuarkusBootstrap can't resolve quarkus-bom-quarkus-platform-properties:properties:999-SNAPSHOT when running integration-tests

QuarkusBootstrap can't resolve quarkus-bom-quarkus-platform-properties:properties:999-SNAPSHOT when running integration-tests. I do `mvn deploy` of Quarkus master into the Artifactory instance to avoid building Quarkus master in every job I need to run against Quarkus master.

I do run some DB tests from integration-tests module and they fail with the error `Caused by: io.quarkus.bootstrap.BootstrapException: Failed to create the application model for null` and `Caused by: io.quarkus.bootstrap.resolver.maven.BootstrapMavenException: Failed to resolve artifact io.quarkus:quarkus-bom-quarkus-platform-properties:properties:999-SNAPSHOT`

Local reproducer: first install Quarkus bits into your local .m2/repository and then use custom settings xml pointing to it ++ custom maven.repo.local when running integration-tests/jpa-postgresql test.
@aloubyansky you are probably the best person to look at this issue as you introduced quarkus-bom-quarkus-platform-properties stuff

```sh
git clone git@github.com:quarkusio/quarkus.git
cd quarkus
mvn clean install -Dquickly
code my-settings.xml  ## see below
mvn -f integration-tests/jpa-postgresql/pom.xml clean verify -Denforcer.skip=true -Ddocker -Dtest-postgresql -Dpostgresql.image=postgres:12.3 -s my-settings.xml -Dmaven.repo.local=/Users/rsvoboda/Downloads/my-maven-repository
```
Note: replace `/Users/rsvoboda` with your path

my-settings.xml
```xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
        
    <localRepository/>
    <profiles>
        <profile>
            <id>local</id>
            <repositories>
                <repository>
                <id>local</id>
                <name>local</name>
                <url>file:///Users/rsvoboda/.m2/repository</url>
                <releases>
                    <enabled>true</enabled>
                  </releases>
                  <snapshots>
                    <enabled>true</enabled>
                  </snapshots>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                <id>local</id>
                <name>local</name>
                <url>file:///Users/rsvoboda/.m2/repository</url>
                <releases>
                    <enabled>true</enabled>
                  </releases>
                  <snapshots>
                    <enabled>true</enabled>
                  </snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>

    <activeProfiles>
        <activeProfile>local</activeProfile>
    </activeProfiles>
    
</settings>
```

stacktrace:
```
[INFO] Running io.quarkus.it.jpa.postgresql.JPAFunctionalityTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.713 s <<< FAILURE! - in io.quarkus.it.jpa.postgresql.JPAFunctionalityTest
[ERROR] io.quarkus.it.jpa.postgresql.JPAFunctionalityTest.testJPAFunctionalityFromServlet  Time elapsed: 0.005 s  <<< ERROR!
java.lang.RuntimeException: io.quarkus.bootstrap.BootstrapException: Failed to create the application model for null
	at io.quarkus.test.junit.QuarkusTestExtension.throwBootFailureException(QuarkusTestExtension.java:549)
	at io.quarkus.test.junit.QuarkusTestExtension.interceptTestClassConstructor(QuarkusTestExtension.java:616)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
	at org.junit.jupiter.api.extension.InvocationInterceptor.interceptTestClassConstructor(InvocationInterceptor.java:72)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:77)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestClassConstructor(ClassBasedTestDescriptor.java:342)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateTestClass(ClassBasedTestDescriptor.java:289)
	at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.instantiateTestClass(ClassTestDescriptor.java:79)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:267)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$2(ClassBasedTestDescriptor.java:259)
	at java.base/java.util.Optional.orElseGet(Optional.java:369)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$3(ClassBasedTestDescriptor.java:258)
	at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:101)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:100)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:65)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$1(NodeTestTask.java:111)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:111)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:79)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:96)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75)
	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:188)
	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:154)
	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:128)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:428)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:562)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:548)
Caused by: io.quarkus.bootstrap.BootstrapException: Failed to create the application model for null
	at io.quarkus.bootstrap.BootstrapAppModelFactory.resolveAppModel(BootstrapAppModelFactory.java:316)
	at io.quarkus.bootstrap.app.QuarkusBootstrap.bootstrap(QuarkusBootstrap.java:158)
	at io.quarkus.test.junit.QuarkusTestExtension.doJavaStart(QuarkusTestExtension.java:206)
	at io.quarkus.test.junit.QuarkusTestExtension.ensureStarted(QuarkusTestExtension.java:527)
	at io.quarkus.test.junit.QuarkusTestExtension.beforeAll(QuarkusTestExtension.java:560)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$8(ClassBasedTestDescriptor.java:368)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:368)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:192)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:78)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:136)
	... 34 more
Caused by: io.quarkus.bootstrap.resolver.maven.BootstrapMavenException: Failed to resolve artifact io.quarkus:quarkus-bom-quarkus-platform-properties:properties:999-SNAPSHOT
	at io.quarkus.bootstrap.resolver.maven.MavenArtifactResolver.resolveInternal(MavenArtifactResolver.java:169)
	at io.quarkus.bootstrap.resolver.maven.MavenArtifactResolver.resolve(MavenArtifactResolver.java:154)
	at io.quarkus.bootstrap.resolver.BootstrapAppModelResolver.resolve(BootstrapAppModelResolver.java:101)
	at io.quarkus.bootstrap.resolver.BootstrapAppModelResolver.collectPlatformProperties(BootstrapAppModelResolver.java:310)
	at io.quarkus.bootstrap.resolver.BootstrapAppModelResolver.doResolveModel(BootstrapAppModelResolver.java:229)
	at io.quarkus.bootstrap.resolver.BootstrapAppModelResolver.resolveManagedModel(BootstrapAppModelResolver.java:152)
	at io.quarkus.bootstrap.BootstrapAppModelFactory.resolveAppModel(BootstrapAppModelFactory.java:302)
	... 44 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact io.quarkus:quarkus-bom-quarkus-platform-properties:properties:999-SNAPSHOT
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:424)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:229)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:207)
	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:262)
	at io.quarkus.bootstrap.resolver.maven.MavenArtifactResolver.resolveInternal(MavenArtifactResolver.java:164)
	... 50 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact io.quarkus:quarkus-bom-quarkus-platform-properties:properties:999-SNAPSHOT
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:414)
	... 54 more
```

quarkus-bom-quarkus-platform-properties-999-SNAPSHOT.properties is available:
```
ls -l ~/.m2/repository/io/quarkus/quarkus-bom-quarkus-platform-properties/999-SNAPSHOT/
total 32
-rw-r--r--  1 rsvoboda  staff   265 Nov  4 11:29 _remote.repositories
-rw-r--r--  1 rsvoboda  staff   736 Nov  4 11:29 maven-metadata-local.xml
-rw-r--r--  1 rsvoboda  staff  1999 Nov  4 08:29 quarkus-bom-quarkus-platform-properties-999-SNAPSHOT.pom
-rw-r--r--  1 rsvoboda  staff    92 Nov  4 11:29 quarkus-bom-quarkus-platform-properties-999-SNAPSHOT.properties
```

Changed files:
independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/PomProfileReposEffectivePomTest.java
independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/SubmodulePomReposEffectivePomTest.java
independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/PomReposMirroredTest.java
independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/BasicPomReposEffectivePomTest.java
independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/SettingsProfileReposAndPomReposEffectivePomTest.java
independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/BootstrapAppModelFactory.java
independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/CentralRepoOverridesEffectivePomTest.java
independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/LocalWorkspace.java

diff --git a/independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/BootstrapAppModelFactory.java b/independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/BootstrapAppModelFactory.java
index ad23e609e01..afbbd0242a1 100644
--- a/independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/BootstrapAppModelFactory.java
+++ b/independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/BootstrapAppModelFactory.java
@@ -242,9 +242,9 @@ public CurationResult resolveAppModel() throws BootstrapException {
             return createAppModelForJar(projectRoot);
         }
 
+        AppArtifact appArtifact = this.appArtifact;
         try {
             LocalProject localProject = null;
-            AppArtifact appArtifact = this.appArtifact;
             if (appArtifact == null) {
                 if (projectRoot == null) {
                     throw new IllegalArgumentException(
diff --git a/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/LocalWorkspace.java b/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/LocalWorkspace.java
index d8c718c4dfe..53c35fe8b54 100644
--- a/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/LocalWorkspace.java
+++ b/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/LocalWorkspace.java
@@ -18,6 +18,7 @@
 import org.apache.maven.model.resolution.UnresolvableModelException;
 import org.apache.maven.model.resolution.WorkspaceModelResolver;
 import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.DefaultArtifact;
 import org.eclipse.aether.repository.WorkspaceReader;
 import org.eclipse.aether.repository.WorkspaceRepository;
 
@@ -70,12 +71,10 @@ public int getId() {
     @Override
     public Model resolveRawModel(String groupId, String artifactId, String versionConstraint)
             throws UnresolvableModelException {
-        final LocalProject project = getProject(groupId, artifactId);
-        return project != null
-                && (versionConstraint == null
-                        || versionConstraint.equals(ModelUtils.getVersion(project.getRawModel())))
-                                ? project.getRawModel()
-                                : null;
+        if (findArtifact(new DefaultArtifact(groupId, artifactId, null, "pom", versionConstraint)) != null) {
+            return getProject(groupId, artifactId).getRawModel();
+        }
+        return null;
     }
 
     @Override
@@ -116,40 +115,30 @@ public File findArtifact(Artifact artifact) {
         }
         final String type = artifact.getExtension();
         if (type.equals(AppArtifactCoords.TYPE_JAR)) {
-            final Path classesDir = lp.getClassesDir();
-            if (Files.exists(classesDir)) {
-                return classesDir.toFile();
+            Path path = lp.getClassesDir();
+            if (Files.exists(path)) {
+                return path.toFile();
             }
 
             // it could be a project with no sources/resources, in which case Maven will create an empty JAR
             // if it has previously been packaged we can return it
-            final Path path = lp.getOutputDir().resolve(getFileName(artifact));
+            path = lp.getOutputDir().resolve(getFileName(artifact));
             if (Files.exists(path)) {
                 return path.toFile();
             }
 
-            // If the project has neither sources nor resources directories then it is an empty JAR.
-            // If this method returns null then the Maven resolver will attempt to resolve the artifact from a repository
-            // which may fail if the artifact hasn't been installed yet.
-            // Here we are checking whether the artifact exists in the local repo first (Quarkus CI creates a Maven repo cache
-            // first and then runs tests using '-pl' in the clean project). If the artifact exists in the local repo we return null,
-            // so the Maven resolver will succeed resolving it from the repo.
-            // If the artifact does not exist in the local repo, we are creating an empty classes directory in the target directory.
-            if (!Files.exists(lp.getSourcesSourcesDir())
-                    && !Files.exists(lp.getResourcesSourcesDir())
-                    && !isFoundInLocalRepo(artifact)) {
-                try {
-                    Files.createDirectories(classesDir);
-                    return classesDir.toFile();
-                } catch (IOException e) {
-                    // ignore and return null
-                }
+            path = emptyJarOutput(lp, artifact);
+            if (path != null) {
+                return path.toFile();
             }
 
             // otherwise, this project hasn't been built yet
         } else if (type.equals(AppArtifactCoords.TYPE_POM)) {
             final File pom = lp.getRawModel().getPomFile();
-            if (pom.exists()) {
+            // if the pom exists we should also check whether the main artifact can also be resolved from the workspace
+            if (pom.exists() && ("pom".equals(lp.getRawModel().getPackaging())
+                    || Files.exists(lp.getOutputDir())
+                    || emptyJarOutput(lp, artifact) != null)) {
                 return pom;
             }
         } else {
@@ -162,6 +151,28 @@ public File findArtifact(Artifact artifact) {
         return null;
     }
 
+    private Path emptyJarOutput(LocalProject lp, Artifact artifact) {
+        // If the project has neither sources nor resources directories then it is an empty JAR.
+        // If this method returns null then the Maven resolver will attempt to resolve the artifact from a repository
+        // which may fail if the artifact hasn't been installed yet.
+        // Here we are checking whether the artifact exists in the local repo first (Quarkus CI creates a Maven repo cache
+        // first and then runs tests using '-pl' in the clean project). If the artifact exists in the local repo we return null,
+        // so the Maven resolver will succeed resolving it from the repo.
+        // If the artifact does not exist in the local repo, we are creating an empty classes directory in the target directory.
+        if (!Files.exists(lp.getSourcesSourcesDir())
+                && !Files.exists(lp.getResourcesSourcesDir())
+                && !isFoundInLocalRepo(artifact)) {
+            try {
+                final Path classesDir = lp.getClassesDir();
+                Files.createDirectories(classesDir);
+                return classesDir;
+            } catch (IOException e) {
+                // ignore and return null
+            }
+        }
+        return null;
+    }
+
     private boolean isFoundInLocalRepo(Artifact artifact) {
         final String localRepo = getLocalRepo();
         if (localRepo == null) {
@@ -199,17 +210,15 @@ private String getLocalRepo() {
 
     @Override
     public List<String> findVersions(Artifact artifact) {
-        if (lastFindVersionsKey != null && artifact.getVersion().equals(lastFindVersions.get(0))
-                && lastFindVersionsKey.getArtifactId().equals(artifact.getArtifactId())
+        if (lastFindVersionsKey != null && lastFindVersionsKey.getArtifactId().equals(artifact.getArtifactId())
+                && artifact.getVersion().equals(lastFindVersions.get(0))
                 && lastFindVersionsKey.getGroupId().equals(artifact.getGroupId())) {
             return lastFindVersions;
         }
-        lastFindVersionsKey = new AppArtifactKey(artifact.getGroupId(), artifact.getArtifactId());
-        final LocalProject lp = getProject(lastFindVersionsKey);
-        if (lp == null || !lp.getVersion().equals(artifact.getVersion())) {
-            lastFindVersionsKey = null;
+        if (findArtifact(artifact) == null) {
             return Collections.emptyList();
         }
+        lastFindVersionsKey = new AppArtifactKey(artifact.getGroupId(), artifact.getArtifactId());
         return lastFindVersions = Collections.singletonList(artifact.getVersion());
     }
 
diff --git a/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/BasicPomReposEffectivePomTest.java b/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/BasicPomReposEffectivePomTest.java
index 6344d8e0216..fdd6334caad 100644
--- a/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/BasicPomReposEffectivePomTest.java
+++ b/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/BasicPomReposEffectivePomTest.java
@@ -3,6 +3,7 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import io.quarkus.bootstrap.resolver.maven.BootstrapMavenContext;
+import java.nio.file.Files;
 import java.util.Arrays;
 import org.junit.jupiter.api.Test;
 
@@ -11,6 +12,7 @@ public class BasicPomReposEffectivePomTest extends BootstrapMavenContextTestBase
     @Test
     public void basicPomRepos() throws Exception {
         final BootstrapMavenContext mvn = bootstrapMavenContextForProject("effective-pom/basic-pom-repos");
+        Files.createDirectories(mvn.getCurrentProjectBaseDir().resolve("target"));
         assertEquals(
                 Arrays.asList(
                         newRepo("central", "https://pom.central"),
diff --git a/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/CentralRepoOverridesEffectivePomTest.java b/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/CentralRepoOverridesEffectivePomTest.java
index c19d24aec33..13a575e5799 100644
--- a/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/CentralRepoOverridesEffectivePomTest.java
+++ b/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/CentralRepoOverridesEffectivePomTest.java
@@ -3,6 +3,7 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import io.quarkus.bootstrap.resolver.maven.BootstrapMavenContext;
+import java.nio.file.Files;
 import java.util.Arrays;
 import org.junit.jupiter.api.Test;
 
@@ -11,6 +12,7 @@ public class CentralRepoOverridesEffectivePomTest extends BootstrapMavenContextT
     @Test
     public void basicPomRepos() throws Exception {
         final BootstrapMavenContext mvn = bootstrapMavenContextForProject("effective-pom/central-repo-overrides");
+        Files.createDirectories(mvn.getCurrentProjectBaseDir().resolve("target"));
         assertEquals(
                 Arrays.asList(
                         newRepo("central", "https://settings.central"),
diff --git a/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/PomProfileReposEffectivePomTest.java b/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/PomProfileReposEffectivePomTest.java
index 84dda9f40d2..ae42d9b071b 100644
--- a/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/PomProfileReposEffectivePomTest.java
+++ b/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/PomProfileReposEffectivePomTest.java
@@ -3,6 +3,7 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import io.quarkus.bootstrap.resolver.maven.BootstrapMavenContext;
+import java.nio.file.Files;
 import java.util.Arrays;
 import org.junit.jupiter.api.Test;
 
@@ -12,6 +13,7 @@ public class PomProfileReposEffectivePomTest extends BootstrapMavenContextTestBa
     public void basicPomRepos() throws Exception {
         setSystemProp("another-profile", "yes");
         final BootstrapMavenContext mvn = bootstrapMavenContextForProject("effective-pom/pom-profile-repos");
+        Files.createDirectories(mvn.getCurrentProjectBaseDir().resolve("target"));
         assertEquals(
                 Arrays.asList(
                         newRepo("another-profile-repo", "https://another-profile.repo"),
diff --git a/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/PomReposMirroredTest.java b/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/PomReposMirroredTest.java
index 0f1d5a92b4e..24d05bb7f83 100644
--- a/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/PomReposMirroredTest.java
+++ b/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/PomReposMirroredTest.java
@@ -7,6 +7,7 @@
 
 import io.quarkus.bootstrap.resolver.maven.BootstrapMavenContext;
 import io.quarkus.bootstrap.resolver.maven.BootstrapMavenContextConfig;
+import java.nio.file.Files;
 import java.nio.file.Path;
 import java.util.HashMap;
 import java.util.List;
@@ -37,6 +38,7 @@ protected BootstrapMavenContextConfig<?> initBootstrapMavenContextConfig() throw
     @Test
     public void basicPomRepos() throws Exception {
         final BootstrapMavenContext mvn = bootstrapMavenContextWithSettings("custom-settings/pom-repos-mirrored");
+        Files.createDirectories(mvn.getCurrentProjectBaseDir().resolve("target"));
 
         final List<RemoteRepository> repos = mvn.getRemoteRepositories();
         assertEquals(1, repos.size());
diff --git a/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/SettingsProfileReposAndPomReposEffectivePomTest.java b/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/SettingsProfileReposAndPomReposEffectivePomTest.java
index 6482e87e8db..7ba2d65514f 100644
--- a/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/SettingsProfileReposAndPomReposEffectivePomTest.java
+++ b/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/SettingsProfileReposAndPomReposEffectivePomTest.java
@@ -3,6 +3,7 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import io.quarkus.bootstrap.resolver.maven.BootstrapMavenContext;
+import java.nio.file.Files;
 import java.util.Arrays;
 import org.junit.jupiter.api.Test;
 
@@ -11,6 +12,7 @@ public class SettingsProfileReposAndPomReposEffectivePomTest extends BootstrapMa
     @Test
     public void settingsProfileReposAndPomRepos() throws Exception {
         final BootstrapMavenContext mvn = bootstrapMavenContextForProject("effective-pom/settings-profile-and-pom-repos");
+        Files.createDirectories(mvn.getCurrentProjectBaseDir().resolve("target"));
         assertEquals(
                 Arrays.asList(
                         newRepo("settings-central", "https://settings.central"),
diff --git a/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/SubmodulePomReposEffectivePomTest.java b/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/SubmodulePomReposEffectivePomTest.java
index ea843b3e270..4e9e8493436 100644
--- a/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/SubmodulePomReposEffectivePomTest.java
+++ b/independent-projects/bootstrap/maven-resolver/src/test/java/io/quarkus/bootstrap/resolver/maven/test/SubmodulePomReposEffectivePomTest.java
@@ -3,6 +3,7 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import io.quarkus.bootstrap.resolver.maven.BootstrapMavenContext;
+import java.nio.file.Files;
 import java.util.Arrays;
 import org.junit.jupiter.api.Test;
 
@@ -11,6 +12,7 @@ public class SubmodulePomReposEffectivePomTest extends BootstrapMavenContextTest
     @Test
     public void basicPomRepos() throws Exception {
         final BootstrapMavenContext mvn = bootstrapMavenContextForProject("effective-pom/submodule-repos/module");
+        Files.createDirectories(mvn.getCurrentProjectBaseDir().resolve("target"));
         assertEquals(
                 Arrays.asList(
                         newRepo("module-pom-repo", "https://module-pom.repo"),