Skip to content

Commit

Permalink
fix the extension issue reported in #441
Browse files Browse the repository at this point in the history
  • Loading branch information
cescoffier committed Jan 7, 2019
1 parent cc87d76 commit c3608c1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.apache.maven.model.Dependency;
import org.apache.maven.model.Model;
import org.apache.maven.plugin.logging.Log;
import org.jboss.shamrock.maven.CreateProjectMojo;
import org.jboss.shamrock.maven.utilities.MojoUtils;

import java.io.IOException;
Expand Down Expand Up @@ -91,7 +92,7 @@ public static boolean addExtensions(Model model, List<String> extensions, Log lo
if (!MojoUtils.hasDependency(model, optional.get().getGroupId(), optional.get().getArtifactId())) {
log.info("Adding extension " + optional.get().toCoordinates());

if (containsBOM(model)) {
if (containsBOM(model) && optional.get().getGroupId().startsWith(CreateProjectMojo.PLUGIN_GROUPID)) {
model.addDependency(optional.get().toDependency(true));
} else {
model.addDependency(optional.get().toDependency(false));
Expand Down

0 comments on commit c3608c1

Please sign in to comment.