-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[MNG-6656] Introduce base for build/consumer process #286
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
Conversation
… depend on maven-core
…hen using --fail-fast Otherwise the sessionFinished event may be sent before some projects/goals finish, which violates the contracts of execution listeners and makes it hard to properly life cycle components that are needed for goal execution. This closes #272
…rue' on child ITs (by default on Jenkins CI).
…el-builder and maven-core Provide BuildPomXMlFilter to set CI Friendly properties
...re/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
Outdated
Show resolved
Hide resolved
...re/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
Outdated
Show resolved
Hide resolved
maven-core/src/main/java/org/apache/maven/xml/internal/DefaultBuildPomXMLFilterFactory.java
Outdated
Show resolved
Hide resolved
maven-core/src/test/java/org/apache/maven/xml/filter/ConsumerPomXMLFilterTest.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
Outdated
Show resolved
Hide resolved
maven-xml/src/test/java/org/apache/maven/xml/filter/ConsumerPomXMLFilterTest.java
Outdated
Show resolved
Hide resolved
rmannibucau
left a comment
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.
Put some minor comments (not directly related to the core feature so take them more as side notes).
On the feature I have mainly one point: are the transformed pom and real project pom attached? Think it makes sense to attach both but didnt spot the code doing that (original classifier for the project one maybe?)
maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelCacheManager.java
Outdated
Show resolved
Hide resolved
maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelCacheManager.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-xml/src/main/java/org/apache/maven/xml/filter/BuildPomXMLFilterFactory.java
Show resolved
Hide resolved
maven-xml/src/main/java/org/apache/maven/xml/SAXEventUtils.java
Outdated
Show resolved
Hide resolved
The pom is being transformed during the process, making it suitable for its purpose. At this moment in the beginning the pom is enriched with elements so it reflects the max pom is people/IDE/... are using right now. During distribution (install/deploy) the pom will be cleaned up from some build specific information as the parents relativePath and modules. Hence there should be no reason to attach more than one pom. You must trust that Maven is doing it correct, and for that reason I've tried to be very strict with class exposure, most are package private. These are just examples that should give us hopefully enough feedback if the process works. |
|
@rfscholte |
|
The reason to attach both is that dev will prefer original pom and tools the deployed one. |
|
Here's how I see it: So after Maven 5.0.0 it could be there's a huge difference between local pom-file and the distributed files, so I don't see any reason to attach original file. My suggestion (to keep it simple) let's wait for feedback if the need is there. And if there's a need, I'd prefer a new goal to the maven-helper-plugin, which can show you all possible poms during any phase. |
...re/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
Outdated
Show resolved
Hide resolved
...re/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
Outdated
Show resolved
Hide resolved
...re/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
Outdated
Show resolved
Hide resolved
maven-core/src/main/java/org/apache/maven/xml/filter/ConsumerPomXMLFilter.java
Outdated
Show resolved
Hide resolved
maven-core/src/main/java/org/apache/maven/xml/filter/FastForwardFilter.java
Outdated
Show resolved
Hide resolved
maven-core/src/main/java/org/apache/maven/xml/filter/FastForwardFilter.java
Show resolved
Hide resolved
maven-core/src/main/java/org/apache/maven/xml/internal/DefaultBuildPomXMLFilterFactory.java
Outdated
Show resolved
Hide resolved
maven-core/src/main/java/org/apache/maven/xml/internal/DefaultBuildPomXMLFilterFactory.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-xml/src/main/java/org/apache/maven/xml/SAXEventUtils.java
Outdated
Show resolved
Hide resolved
eolivelli
left a comment
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.
Very interesting and promising work.
Thanks for moving this forward.
I left a few comments, mostly about security/performances.
I figured out that Romain also wrote similar comments over other lines of code.
Side note: maybe it is better to have a separate commit for the version change fron 3.6.x to 3.7.0, but it is not a big deal
maven-xml/src/main/java/org/apache/maven/xml/SAXEventFactory.java
Outdated
Show resolved
Hide resolved
maven-xml/src/test/java/org/apache/maven/xml/filter/AbstractXMLFilterTests.java
Outdated
Show resolved
Hide resolved
|
About attaching pom: i take gradle users as a reference. They create a fake pom which makes the project link completly lost. So having the original file enables to understand the build and going on nexus is a quick way to review a build so it is worth having it built-in, at least as a toggle but you are right it can belong to install plugin, does not need to be there while path is accessible. |
eolivelli
left a comment
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
maven-model-builder/src/main/java/org/apache/maven/feature/Features.java
Show resolved
Hide resolved
maven-core/src/main/java/org/apache/maven/internal/aether/ConsumerModelSourceTransformer.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/ProjectModelResolver.java
Outdated
Show resolved
Hide resolved
maven-core/src/main/java/org/apache/maven/xml/internal/DefaultConsumerPomXMLFilterFactory.java
Show resolved
Hide resolved
...el-builder/src/main/java/org/apache/maven/model/building/AbstractModelSourceTransformer.java
Show resolved
Hide resolved
...el-builder/src/main/java/org/apache/maven/model/building/AbstractModelSourceTransformer.java
Show resolved
Hide resolved
...el-builder/src/main/java/org/apache/maven/model/building/AbstractModelSourceTransformer.java
Show resolved
Hide resolved
maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
Show resolved
Hide resolved
maven-model-builder/src/main/java/org/apache/maven/model/building/ModelSourceTransformer.java
Show resolved
Hide resolved
maven-model-builder/src/main/java/org/apache/maven/model/building/TransformerContext.java
Show resolved
Hide resolved
maven-xml/src/main/java/org/apache/maven/xml/sax/filter/BuildPomXMLFilterFactory.java
Outdated
Show resolved
Hide resolved
maven-xml/src/main/java/org/apache/maven/xml/sax/filter/BuildPomXMLFilterListener.java
Show resolved
Hide resolved
maven-xml/src/test/java/org/apache/maven/xml/sax/LexicalHandlerVerifier.java
Outdated
Show resolved
Hide resolved
mthmulders
left a comment
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.
Overall, it looks good to me, although I have left a few questions here & there.
...re/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
Outdated
Show resolved
Hide resolved
maven-xml/src/main/java/org/apache/maven/xml/sax/filter/AbstractEventXMLFilter.java
Show resolved
Hide resolved
michael-o
left a comment
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.
Impressive change!
maven-core/src/main/java/org/apache/maven/internal/aether/ConsumerModelSourceTransformer.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/ReactorModelPool.java
Outdated
Show resolved
Hide resolved
...el-builder/src/main/java/org/apache/maven/model/building/AbstractModelSourceTransformer.java
Outdated
Show resolved
Hide resolved
...model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingRequest.java
Outdated
Show resolved
Hide resolved
|
Fixed in bdec668 |
|
|
||
| originalHandler = getContentHandler(); | ||
|
|
||
| ContentHandler outputContentHandler = getContentHandler(); |
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.
@mthmulders here's the original code, where you'll see it doesn't write to its direct parent (which is another XMLFilter), but all the way up to the effective outputstream, to ensure these won't be part of the output manipulation. I don't know how @gnodet eventually solved this on an event based stream.
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.
There's a call to enable() / disable() on the delegate parser. I'll have to add a unit test in order to debug what is happening and see where the problem is ...
|
Resolve #8364 |
Following this checklist to help us incorporate your
contribution quickly and easily:
for the change (usually before you start working on it). Trivial changes like typos do not
require a JIRA issue. Your pull request should address just this issue, without
pulling in other changes.
[MNG-XXX] - Fixes bug in ApproximateQuantiles,where you replace
MNG-XXXwith the appropriate JIRA issue. Best practiceis to use the JIRA issue title in the pull request title and in the first line of the
commit message.
mvn clean verifyto make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.