Skip to content
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

[regression] MavenExecutionContext.execute(MavenProject, MojoExecution, IProgressMonitor) loses the MojoExecution configuration #1304

Closed
fbricon opened this issue Mar 7, 2023 · 3 comments · Fixed by #1305

Comments

@fbricon
Copy link
Contributor

fbricon commented Mar 7, 2023

In

MojoExecution clone = new MojoExecution(execution.getPlugin(), execution.getGoal(), execution.getExecutionId());
, the mojo execution's clone is incomplete, so the original configuration is not copied over the clone. This nasty regression breaks invocations of custom mojo executions, as used in m2e-wtp (eclipse-m2e/m2e-wtp#23)

@laeubi
Copy link
Member

laeubi commented Mar 7, 2023

@fbricon can you probably test if just copy over of the config would fix the issue?

@fbricon
Copy link
Contributor Author

fbricon commented Mar 7, 2023

It does work, but I'm trying to understand why the clone was needed in the first place, how that relates to resources:resources failing when a .mvn folder exists (#1150)

@laeubi
Copy link
Member

laeubi commented Mar 7, 2023

Can you then please open a PR @HannesWell wants to prepare a new release due to other regressions as well and if its easy to mitigate we should include this, everything else can be done/investigated later.

The problem is that mojo executions previously where created and cached but they use the "global" maven context. In that case a wrong classloader is used for them and that then fails (best shown by using a .mvn folder)

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 a pull request may close this issue.

2 participants