Skip to content

Commit

Permalink
response to reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
mherman22 committed Sep 25, 2024
1 parent dfbf81b commit 0fe80e8
Showing 1 changed file with 4 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,25 +263,11 @@ private void createModule() throws MojoExecutionException {
.promptForValueIfMissingWithDefault(DESCRIPTION_PROMPT_TMPL, moduleDescription, "", "no description");

if (TYPE_CONTENT_PACKAGE.equals(type)) {
groupId = "org.openmrs.content";
wizard.showMessage(CONTENT_MAVEN_INFO);
groupId = wizard.promptForValueIfMissingWithDefault(GROUP_ID_PROMPT_TMPL, groupId, "groupId", "org.openmrs.content");
while (!groupId.matches("[a-z][a-z0-9.]*")) {
wizard.showError("The specified groupId " + groupId
+ " is not valid. It must start from a letter and can contain only alphanumerics and dots.");
groupId = null;
groupId = wizard
.promptForValueIfMissingWithDefault(GROUP_ID_PROMPT_TMPL, groupId, "groupId", "org.openmrs.content");
}
} else {
wizard.showMessage(MAVEN_INFO);
groupId = wizard.promptForValueIfMissingWithDefault(GROUP_ID_PROMPT_TMPL, groupId, "groupId", "org.openmrs.module");
while (!groupId.matches("[a-z][a-z0-9.]*")) {
wizard.showError("The specified groupId " + groupId
+ " is not valid. It must start from a letter and can contain only alphanumerics and dots.");
groupId = null;
groupId = wizard
.promptForValueIfMissingWithDefault(GROUP_ID_PROMPT_TMPL, groupId, "groupId", "org.openmrs.module");
}
groupId = "org.openmrs.module";
wizard.showMessage(CONTENT_MAVEN_INFO);
}

artifactId = moduleId;
Expand All @@ -306,7 +292,7 @@ private void createModule() throws MojoExecutionException {
}

archetypeVersion = getSdkVersion();
packageName = TYPE_CONTENT_PACKAGE.equals(type) ? "org.openmrs.content." + artifactId : "org.openmrs.module." + artifactId;
packageName = groupId + "." + artifactId;

Properties properties = new Properties();
properties.setProperty("artifactId", artifactId);
Expand Down

0 comments on commit 0fe80e8

Please sign in to comment.