Skip to content

Conversation

@rfscholte
Copy link
Contributor

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Make sure there is a JIRA issue filed
    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.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [MNG-XXX] - Fixes bug in ApproximateQuantiles,
    where you replace MNG-XXX with the appropriate JIRA issue. Best practice
    is to use the JIRA issue title in the pull request title and in the first line of the
    commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the Core IT successfully.

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.

rfscholte and others added 18 commits May 14, 2019 21:26
…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).
#269)

* [MNG-6713] Fix ExclusionArtifactFilter to respect wildcard exclusions.

* Moved `*` to a constant
…el-builder and maven-core

Provide BuildPomXMlFilter to set  CI Friendly properties
Copy link
Contributor

@rmannibucau rmannibucau left a 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?)

@rfscholte
Copy link
Contributor Author

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?)

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.

@Tibor17
Copy link
Contributor

Tibor17 commented Oct 1, 2019

@rfscholte
I found this in the emails. You should not throw RuntimeException in DefaultModelBuilder. It is bad practice and seen few more times in the Maven. You should find better subclass e.g. IllegalStateException or create a new exception class or use Callable instead of Runnable.

@rmannibucau
Copy link
Contributor

The reason to attach both is that dev will prefer original pom and tools the deployed one.
At the end syntaxes can diverge significantly so exposing both is likely needed if we want to propose another format IMHO, otherwise v4 will stay in projects/sources too i think.

@rfscholte
Copy link
Contributor Author

Here's how I see it:
Maven 3.7.x+ : experiment with adjusting files using Model 4.0.0
Maven 4.0.0 : apply adjusting files using Model 4.0.0
Maven 5.0.0: Introduce model 5.0.0, while distributing backport to 4.0.0 and additional files.

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.
And it also comes with new challenges: what would be the filename of all attached poms?

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.
We need to get use to different output files, otherwise it'll block any chance of evolution.

Copy link
Contributor

@eolivelli eolivelli left a 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

@rmannibucau
Copy link
Contributor

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.

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@mthmulders mthmulders left a 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.

Copy link
Member

@michael-o michael-o left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Impressive change!

@rfscholte
Copy link
Contributor Author

Fixed in bdec668

@rfscholte rfscholte closed this Jun 22, 2020
@rfscholte rfscholte deleted the MNG-6656 branch June 22, 2020 21:22

originalHandler = getContentHandler();

ContentHandler outputContentHandler = getContentHandler();
Copy link
Contributor Author

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.

Copy link
Contributor

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 ...

@jira-importer
Copy link

Resolve #8364

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.