-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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-6533] Test: ProjectBuildingException miss reference to MavenProject #197
Conversation
bf18b96
to
ff2a6de
Compare
@@ -84,4 +87,52 @@ public void testVersionlessManagedDependency() | |||
// this is expected | |||
} | |||
} | |||
|
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.
please use common formatting: this will improve maintenance
import org.apache.maven.model.building.ModelSource; | ||
|
||
public class ProjectBuilderTest | ||
extends AbstractCoreMavenComponentTestCase | ||
{ | ||
protected String getProjectsDirectory() | ||
@Override | ||
protected String getProjectsDirectory() |
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.
please replace tab with space
ff2a6de
to
7dbf6a3
Compare
@hboutemy Thanks, I updated the change according to your comments (I could have missed some style stuff though). |
@mickaelistria I reworked the PR, creating 2 initial little refactoring commits that make the later modification a lot easier to understand IMHO: see MNG-6533-2 branch |
Ok, thanks.
IIRC, there were some cases where this wasn't sufficient and some other exceptions could happen in m2e using this API; but I don't remember how much this memory is true; so I need to double-check. |
@hboutemy I'm trying to get back to work on that one, but with MNG-6530, it's much harder to test it properly in m2e (I need to deal with a sequence of commits in the right order both in Maven and m2e to be able to test this issue). I'll try to make progress anyway, but it'd be much simpler to me if we can work on MNG-6530 first. |
Initialize the interim project with "simple" items (ie do not build not reference parent if it's not yet in the projectIndex) and returns it when installation fails further. This give a partial validation of the file, pretty convenient in IDEs.
Sending ModelProblems allows to keep processing other pom files.
7dbf6a3
to
8d7cfaa
Compare
@hboutemy Sorry for reporting so late. It's not an easy task and I'm not progressing very fast with this refactoring in m2e and have hard time to test things properly. |
@mickaelistria no problem please review and tell me what you think about it before we review on the mailing list for merge to master |
All good to me. I'd be happy to see this merged and then a snapshot published. |
merged to master |
Follow up to bd25080 which missed a few tests using the above pattern
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-XXX
with 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 verify
to 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.
I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.