Skip to content

Commit

Permalink
Fix for multimod restart server problem
Browse files Browse the repository at this point in the history
  • Loading branch information
cherylking committed Oct 2, 2023
1 parent b7ff292 commit b63f5df
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 b63f5df

Please sign in to comment.