From e7310bd0b3bde153880451b75e911737a23a38e0 Mon Sep 17 00:00:00 2001 From: mherman22 Date: Mon, 26 Aug 2024 19:54:21 +0300 Subject: [PATCH] Fix Content Package Template Creation --- .../resources/archetype-resources/pom.xml | 1 - .../openmrs/maven/plugins/CreateProject.java | 25 ++++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/archetype-module-refapp/src/main/resources/archetype-resources/pom.xml b/archetype-module-refapp/src/main/resources/archetype-resources/pom.xml index 688b25061..b86e2fd28 100644 --- a/archetype-module-refapp/src/main/resources/archetype-resources/pom.xml +++ b/archetype-module-refapp/src/main/resources/archetype-resources/pom.xml @@ -67,6 +67,5 @@ 1.11.6 - 1.0.0-SNAPSHOT diff --git a/maven-plugin/src/main/java/org/openmrs/maven/plugins/CreateProject.java b/maven-plugin/src/main/java/org/openmrs/maven/plugins/CreateProject.java index 13d92e3bc..e776f4840 100644 --- a/maven-plugin/src/main/java/org/openmrs/maven/plugins/CreateProject.java +++ b/maven-plugin/src/main/java/org/openmrs/maven/plugins/CreateProject.java @@ -1,17 +1,5 @@ package org.openmrs.maven.plugins; -import static org.openmrs.maven.plugins.utility.PropertiesUtils.loadPropertiesFromResource; -import static org.twdata.maven.mojoexecutor.MojoExecutor.artifactId; -import static org.twdata.maven.mojoexecutor.MojoExecutor.configuration; -import static org.twdata.maven.mojoexecutor.MojoExecutor.element; -import static org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo; -import static org.twdata.maven.mojoexecutor.MojoExecutor.executionEnvironment; -import static org.twdata.maven.mojoexecutor.MojoExecutor.goal; -import static org.twdata.maven.mojoexecutor.MojoExecutor.groupId; -import static org.twdata.maven.mojoexecutor.MojoExecutor.name; -import static org.twdata.maven.mojoexecutor.MojoExecutor.plugin; -import static org.twdata.maven.mojoexecutor.MojoExecutor.version; - import org.apache.commons.lang.StringUtils; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; @@ -25,6 +13,18 @@ import java.util.Arrays; import java.util.Properties; +import static org.openmrs.maven.plugins.utility.PropertiesUtils.loadPropertiesFromResource; +import static org.twdata.maven.mojoexecutor.MojoExecutor.artifactId; +import static org.twdata.maven.mojoexecutor.MojoExecutor.configuration; +import static org.twdata.maven.mojoexecutor.MojoExecutor.element; +import static org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo; +import static org.twdata.maven.mojoexecutor.MojoExecutor.executionEnvironment; +import static org.twdata.maven.mojoexecutor.MojoExecutor.goal; +import static org.twdata.maven.mojoexecutor.MojoExecutor.groupId; +import static org.twdata.maven.mojoexecutor.MojoExecutor.name; +import static org.twdata.maven.mojoexecutor.MojoExecutor.plugin; +import static org.twdata.maven.mojoexecutor.MojoExecutor.version; + /** * Creates a new OpenMRS project from an archetype */ @@ -281,6 +281,7 @@ private void createModule() throws MojoExecutionException { "2.4"); archetypeArtifactId = SDKConstants.REFAPP_ARCH_ARTIFACT_ID; } else if (TYPE_CONTENT_PACKAGE.equals(type)) { + contentpackage = wizard.promptForValueIfMissingWithDefault("What version of the content package (-D%s) do you want to support?", contentpackage, "contentpackage", "1.0.0"); archetypeArtifactId = SDKConstants.CONTENT_PACKAGE_ARCH_ARTIFACT_ID; } else { throw new MojoExecutionException("Invalid project type");