Closed kwin closed 2 years ago
It seems to hang in line https://github.com/mojohaus/versions-maven-plugin/blob/8bb0dc2ef17cfafdbc9dcbc93e2561fedfc996b2/src/main/java/org/codehaus/mojo/versions/DisplayPluginUpdatesMojo.java#L1484 while calling ModelInterpolator.interpolate(...)
. The stack trace looks like this:
Thread [main] (Suspended)
StringSearchModelInterpolator$InterpolateObjectAction.traverseObjectWithParents(Class<?>, Object) line: 313
StringSearchModelInterpolator$InterpolateObjectAction.run() line: 140
StringSearchModelInterpolator$InterpolateObjectAction.run() line: 107
AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
StringSearchModelInterpolator.interpolateObject(Object, Model, File, ProjectBuilderConfiguration, boolean) line: 86
StringSearchModelInterpolator.interpolate(Model, File, ProjectBuilderConfiguration, boolean) line: 68
DisplayPluginUpdatesMojo.getProjectPlugins(Map<String,String>, Map<String,String>, Map<String,String>, Map<String,String>, Set<String>) line: 1484
DisplayPluginUpdatesMojo.execute() line: 380
DefaultBuildPluginManager.executeMojo(MavenSession, MojoExecution) line: 137
MojoExecutor.execute(MavenSession, MojoExecution, ProjectIndex, DependencyContext) line: 210
MojoExecutor.execute(MavenSession, MojoExecution, ProjectIndex, DependencyContext, PhaseRecorder) line: 156
MojoExecutor.execute(MavenSession, List<MojoExecution>, ProjectIndex) line: 148
LifecycleModuleBuilder.buildProject(MavenSession, MavenSession, ReactorContext, MavenProject, TaskSegment) line: 117
LifecycleModuleBuilder.buildProject(MavenSession, ReactorContext, MavenProject, TaskSegment) line: 81
SingleThreadedBuilder.build(MavenSession, ReactorContext, ProjectBuildList, List<TaskSegment>, ReactorBuildStatus) line: 56
LifecycleStarter.execute(MavenSession) line: 128
DefaultMaven.doExecute(MavenExecutionRequest, MavenSession, MavenExecutionResult, DefaultRepositorySystemSession) line: 305
DefaultMaven.doExecute(MavenExecutionRequest) line: 192
DefaultMaven.execute(MavenExecutionRequest) line: 105
MavenCli.execute(CliRequest) line: 972
MavenCli.doMain(CliRequest) line: 293
MavenCli.main(String[], ClassWorld) line: 196
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43
Method.invoke(Object, Object...) line: 566
Launcher.launchEnhanced(String[]) line: 282
Launcher.launch(String[]) line: 225
Launcher.mainWithExitCode(String[]) line: 406
Launcher.main(String[]) line: 347
i can reproduce the problem with this project - strange. tested a couple of other projects, worked there without problems.
the current code is using a deprecated ModelInterpolator from maven-compat.
in https://github.com/mojohaus/versions-maven-plugin/pull/549 i tried to switch to a newer, non-deprecated version with a slightly different signature. i'm not 100% sure if it does the same thing, but it solves the hanging problems, and the ITs seem to run fine as well.
@kwin can you cross-check?
@stefanseifert I tested with some projects and it looks good to me. I am not familiar with the Maven API you use either, so I can just guess from the results that it is doing the right thing.
The plugin hangs during goal
versions-maven-plugin:2.9.0:display-plugin-updates
This didn't happen with older versions. You can reproduce by executing it on project https://github.com/adobe/aem-core-wcm-components (or just the module "bundles/core").Debug log is exposing
And then hangs.