Retrieve effective instead of raw model when importing projects#2099
Retrieve effective instead of raw model when importing projects#2099
Conversation
3487642 to
39e00e7
Compare
This will also interpolate correctly. Use ProjectBuilder instead of ModelProcessor to parse the POM. Encapsulate in a dedicated MavenExecutionContext. This closes #1948
39e00e7 to
bfccdd3
Compare
|
@kwin please be aware that at some places we might need the raw model as we can not create a full maven session now. Also interpolation is maybe not always wanted. So if project import is the use-case here, I would suggest to
|
Can you elaborate? What are those places? Under which circumstances you don't want interpolation? |
Test Results 327 files ±0 327 suites ±0 1h 26m 9s ⏱️ - 1m 4s For more details on these failures and errors, see this check. Results for commit f223e39. ± Comparison against base commit 3785255. ♻️ This comment has been updated with latest results. |
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
| * @deprecated Use {@link #readMavenModel(File, IProgressMonitor)} instead. | ||
| */ | ||
| @Deprecated | ||
| public org.apache.maven.model.Model readMavenModel(File pomFile) throws CoreException { |
There was a problem hiding this comment.
@laeubi Are you suggesting to keep this as is (i.e. raw model) and rather introduce a new method for returning the effective model? The only consumer for the raw model I see within m2e is probably org.eclipse.m2e.tests.common/src/org/eclipse/m2e/tests/common/AbstractMavenProjectTestCase.java...
This will also interpolate correctly.
Use ProjectBuilder instead of ModelProcessor to parse the POM. Encapsulate in a dedicated MavenExecutionContext.
This closes #1948