Skip to content

Commit

Permalink
Fixes issue 203, suffixes for artifactIds
Browse files Browse the repository at this point in the history
If there are two projects generated, artifactId gets suffixed with service-a and service-b while the final name of the war/jar remains the same as the original artifactId.

Signed-off-by: Michal Karm Babacek <karm@fedoraproject.org>
  • Loading branch information
Karm committed Aug 30, 2019
1 parent 76748bf commit f4d8955
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@
import javax.annotation.PostConstruct;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import java.util.*;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import static org.eclipse.microprofile.starter.core.model.JessieModel.Parameter.MICROPROFILESPECS;

Expand Down Expand Up @@ -145,6 +149,16 @@ public void adaptMavenModel(Model pomFile, JessieModel model, boolean mainProjec
mavenHelper.addDependency(pomFile, "org.bouncycastle", "bcpkix-jdk15on", "1.53");
}

if (model.hasMainAndSecondaryProject()) {
String artifactID = pomFile.getArtifactId();
if (mainProject) {
pomFile.setArtifactId(artifactID + "-" + JessieModel.MAIN_INDICATOR);
} else {
pomFile.setArtifactId(artifactID + "-" + JessieModel.SECONDARY_INDICATOR);
}
pomFile.getBuild().setFinalName(artifactID);
}

}

private Profile findProfile(String profileName) {
Expand Down

0 comments on commit f4d8955

Please sign in to comment.