Skip to content

Commit

Permalink
Merge pull request #1732 from cherylking/fixMultiModRestart
Browse files Browse the repository at this point in the history
Fix for multimod restart server problem
  • Loading branch information
cherylking committed Oct 2, 2023
2 parents fa18b0e + b63f5df commit aa177ff
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,13 @@ protected Plugin getLibertyPluginForProject(MavenProject currentProject) {
}
Plugin projectPlugin = currentProject.getPlugin(LIBERTY_MAVEN_PLUGIN_GROUP_ID + ":" + LIBERTY_MAVEN_PLUGIN_ARTIFACT_ID);
if (projectPlugin == null) {
getLog().debug("Did not find liberty-maven-plugin configured in currentProject: "+currentProject.toString());
projectPlugin = getPluginFromPluginManagement(LIBERTY_MAVEN_PLUGIN_GROUP_ID, LIBERTY_MAVEN_PLUGIN_ARTIFACT_ID, currentProject);
} else {
getLog().debug("Found liberty-maven-plugin configured in currentProject: "+currentProject.toString());
}
if (projectPlugin == null) {
getLog().debug("Did not find liberty-maven-plugin in pluginManagement in currentProject: "+currentProject.toString());
projectPlugin = plugin(LIBERTY_MAVEN_PLUGIN_GROUP_ID, LIBERTY_MAVEN_PLUGIN_ARTIFACT_ID, "LATEST");
}
if (version != null) {
Expand Down Expand Up @@ -370,8 +374,10 @@ protected void runLibertyMojoGenerateFeatures(Element classFiles, boolean optimi
private void runLibertyMojo(String goal, Xpp3Dom config) throws MojoExecutionException {
getLog().info("Running liberty:" + goal);
getLog().debug("configuration:\n" + config);
executeMojo(getLibertyPlugin(), goal(goal), config,
executionEnvironment(project, session, pluginManager));
getLog().debug("project:\n" + project);
MavenSession tempSession = session.clone();
tempSession.setCurrentProject(project);
executeMojo(getLibertyPlugin(), goal(goal), config, executionEnvironment(project, tempSession, pluginManager));
}

private void copyDependencies() throws MojoExecutionException, IOException {
Expand Down

0 comments on commit aa177ff

Please sign in to comment.