-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mng 6957: Support Build Consumer while defining modules in reverse order #391
Conversation
I think the problem raised in 331e402 and aa285f2 are still valid with the proposed PR. Actually a bit worse since the ReactorModelCache now contains not only model data, but also a mapping from GA coordinates to Source. Maybe this map could be set on the I'm willing to rework my work on top of yours, but the above point makes it much more difficult. Could you consider revisit this point somehow ? |
@rfscholte I went ahead and did a small refactoring to avoid using the reactor cache, see gnodet@497e7fe |
I'd like to mention MNG-6983 which causes out of sync issues. |
I guess there is no way to break this up in a few logical PRs? |
All is required to fix the issue, there's no clear way to split it. |
OK, thanks. |
@rfscholte overall, because of the number of commits, it's really difficult to comment on the diffs, maybe at this point, a squashed commit would be easier to review, since there are so many commits... Hence I'm raising a few points here rather than in possible diff comments... File vs Raw vs Effective modelThe concept behind the raw model seems to change quite a bit. I've watched the video, so I roughly get the idea. However, there are a few spots where things are unclear : for example the FileModelSource vs ArtifactModelSourceCould you please clarify the usage of GA instead of GAVAll the model read seem to be indexed by group/artifact and not by group/artifact/version. Does that mean that a single reactor can not used 2 different dependencies with different versions ? I know this can't happen for a single model, but this is currently supported for two different modules. If the reactor only contains a single model for a given GA, how will that work ? SAX vs StaxAnother point is the usage of SAX rather than Stax API (honestly, I have hardly seen anybody using SAX since years). The models are read using a pull parser, so I'm not sure why introducing a push SAX filter to convert the file into a stream to be consumed by the pull parser in another thread. This seems really inefficient. In huge builds, a few hundreds or more pom files can be read, so that could really be a real problem. I wonder if the
I know there are a bunch of things written in ModelReaderIn the |
@gnodet thanks for reviewing. It doesn't make sense to review it per commit, I would suggest to comment on the total changes. In the end these commit will be squashed into on, yes. File vs Raw vs Effective model FileModelSource vs ArtifactModelSource GA instead of GAV SAX vs Stax ModelReader |
@rfscholte I've pushed a better commit for the |
maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
Outdated
Show resolved
Hide resolved
maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
Show resolved
Hide resolved
maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
Outdated
Show resolved
Hide resolved
maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
Outdated
Show resolved
Hide resolved
maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
Outdated
Show resolved
Hide resolved
maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingResult.java
Outdated
Show resolved
Hide resolved
maven-model-builder/src/main/java/org/apache/maven/model/building/ModelCacheTag.java
Outdated
Show resolved
Hide resolved
...n-model-builder/src/main/java/org/apache/maven/model/building/TransformerContextBuilder.java
Outdated
Show resolved
Hide resolved
maven-model-builder/src/main/java/org/apache/maven/model/io/ModelReader.java
Show resolved
Hide resolved
maven-xml/src/test/java/org/apache/maven/xml/sax/filter/ParentXMLFilterTest.java
Outdated
Show resolved
Hide resolved
maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
Outdated
Show resolved
Hide resolved
maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
Show resolved
Hide resolved
@rfscholte Please also rebase/merge master into this branch. I'd like to run all ITs with that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more nit, but I cannot object anything here anymore. Going through ITs now.
maven-core/src/main/java/org/apache/maven/project/ReactorModelCache.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now. Please squash along with ITs, I will run again.
…f modules are aggregated in reverse order This closes #391
Original summary: cannot build Maven Archetype with versionless reactor atifacts