rfscholte commented on a change in pull request #286:
URL: https://github.com/apache/maven/pull/286#discussion_r441093443
##########
File path:
maven-core/src/main/java/org/apache/maven/project/ReactorModelPool.java
##########
@@ -19,53 +19,127 @@
* under the License.
*/
-import java.io.File;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.Collections;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Objects;
+import java.util.Set;
+
+import org.apache.maven.model.Model;
/**
- * Holds all POM files that are known to the reactor. This allows the project
builder to resolve imported POMs from the
+ * Holds all Models that are known to the reactor. This allows the project
builder to resolve imported Models from the
* reactor when building another project's effective model.
*
* @author Benjamin Bentmann
+ * @author Robert Scholte
*/
class ReactorModelPool
{
+ private final Map<GAKey, Set<Model>> modelsByGa = new HashMap<>();
+
+ private final Map<Path, Model> modelsByPath = new HashMap<>();
+
+ /**
+ * Get the model by its GAV or (since 3.7.0) by its GA if there is only
one.
Review comment:
This method already existed before. The change is that `version` now can
be null.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]