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

Fix for multimod restart server problem #1732

Merged
merged 1 commit into from
Oct 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading