From 30786ee0a24298cba367d2ca522080430362929e Mon Sep 17 00:00:00 2001 From: rbuisson Date: Wed, 27 Mar 2024 17:14:38 +0100 Subject: [PATCH 1/3] OZ-468: Do not fix the parent version in the pom.xml --- .../META-INF/archetype-post-generate.groovy | 15 --------------- .../main/resources/archetype-resources/README.md | 4 ++-- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/maven-archetype/src/main/resources/META-INF/archetype-post-generate.groovy b/maven-archetype/src/main/resources/META-INF/archetype-post-generate.groovy index c37a740..81249f4 100644 --- a/maven-archetype/src/main/resources/META-INF/archetype-post-generate.groovy +++ b/maven-archetype/src/main/resources/META-INF/archetype-post-generate.groovy @@ -86,18 +86,3 @@ new FileOutputStream(wrapperDir.resolve("maven-wrapper.properties").toFile()).wi it << "distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/${mavenVersion}/apache-maven-${mavenVersion}-bin.zip\n" it << "wrapperUrl=${wrapperJarUrl}\n" } - -def isWindows = System.properties["os.name"].toLowerCase().contains("windows") -if (!isWindows) { - run("chmod +x ${projectDirectory.resolve("scripts").resolve("mvnw").toString()}") - run("chmod +x ${projectDirectory.resolve("scripts").resolve("mvnwDebug").toString()}") -} - -// set the version of the parent to the version of the archetype -// NB at this point, we just use the Maven wrapper to do things -def mvnwCommand = isWindows ? - projectDirectory.resolve("scripts").resolve("mvnw.cmd").toString() : - projectDirectory.resolve("scripts").resolve("mvnw").toString() - -run("${mvnwCommand} versions:update-parent -DskipResolution -DparentVersion=${request.archetypeVersion} -DgenerateBackupPoms=false") - diff --git a/maven-archetype/src/main/resources/archetype-resources/README.md b/maven-archetype/src/main/resources/archetype-resources/README.md index 01dbed6..22399b2 100644 --- a/maven-archetype/src/main/resources/archetype-resources/README.md +++ b/maven-archetype/src/main/resources/archetype-resources/README.md @@ -1,6 +1,6 @@ -# Ozone ${distributionName} +# ${distributionName} -**Ozone ${distributionName}** is a distribution of [Ozone HIS](https://www.ozone-his.com). +**${distributionName}** is a distribution of [Ozone HIS](https://www.ozone-his.com). ## Implementer Guide A technical guide to help implementers building and running the project can be found [here](readme/impl-guide.md). From 7ad845e502f5f9fce32deb34a3ddf24dda51dce7 Mon Sep 17 00:00:00 2001 From: rbuisson Date: Wed, 27 Mar 2024 18:25:02 +0100 Subject: [PATCH 2/3] OZ-468: Fix some readme instructions --- .../resources/archetype-resources/readme/impl-guide.md | 10 +++++----- .../resources/projects/it-basic/reference/README.md | 4 ++-- .../projects/it-basic/reference/readme/impl-guide.md | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/maven-archetype/src/main/resources/archetype-resources/readme/impl-guide.md b/maven-archetype/src/main/resources/archetype-resources/readme/impl-guide.md index be909d9..a5362a1 100644 --- a/maven-archetype/src/main/resources/archetype-resources/readme/impl-guide.md +++ b/maven-archetype/src/main/resources/archetype-resources/readme/impl-guide.md @@ -1,4 +1,4 @@ -# Ozone ${distributionName} - Implementer Guide +# ${distributionName} - Implementer Guide This distribution can be run using the [Ozone Docker Compose](https://github.com/ozone-his/ozone-docker-compose) project, which is the default configuration for this. The quick start command below is for demonstration and trial purposes and would not be suitable for a stable environment. @@ -12,7 +12,7 @@ Build Run ```bash source target/go-to-scripts-dir.sh -./start-ozone.sh +./start-demo.sh ``` ### Working on configurations: @@ -35,14 +35,14 @@ Re-build: Then start afresh: ```bash source target/go-to-scripts-dir.sh -./start.sh +./start-demo.sh ``` #### Option 2. Replace only the files needed, directly in the mounted Docker volume ```bash -rsync -av configs/ target/ozone-${distributionName}-/distro/configs +rsync -av configs/ target/${artifactId}-/distro/configs ``` -(replace `` with the current version of ozone-kenya) +(replace `` with the current version of ${distributionName}) ### Excluding inherited files from Ozone Distro: diff --git a/maven-archetype/src/test/resources/projects/it-basic/reference/README.md b/maven-archetype/src/test/resources/projects/it-basic/reference/README.md index b551e52..f9f9bfb 100644 --- a/maven-archetype/src/test/resources/projects/it-basic/reference/README.md +++ b/maven-archetype/src/test/resources/projects/it-basic/reference/README.md @@ -1,6 +1,6 @@ -# Ozone basicDistribution +# basicDistribution -**Ozone basicDistribution** is a distribution of [Ozone HIS](https://www.ozone-his.com). +**basicDistribution** is a distribution of [Ozone HIS](https://www.ozone-his.com). A technical guide to help implementers building and running the project can be found [here](readme/impl-guide.md). diff --git a/maven-archetype/src/test/resources/projects/it-basic/reference/readme/impl-guide.md b/maven-archetype/src/test/resources/projects/it-basic/reference/readme/impl-guide.md index 3defa31..ace6a5d 100644 --- a/maven-archetype/src/test/resources/projects/it-basic/reference/readme/impl-guide.md +++ b/maven-archetype/src/test/resources/projects/it-basic/reference/readme/impl-guide.md @@ -1,4 +1,4 @@ -# Ozone basicDistribution - Implementer Guide +# basicDistribution - Implementer Guide This distribution can be run using the [Ozone Docker Compose](https://github.com/ozone-his/ozone-docker-compose) project, which is the default configuration for this. The quick start command below is for demonstration and trial purposes and would not be suitable for a stable environment. @@ -11,7 +11,7 @@ Build Run ```bash source target/go-to-scripts-dir.sh -./start-ozone.sh +./start-demo.sh ``` @@ -32,13 +32,13 @@ Re-build: Then start afresh: ```bash source target/go-to-scripts-dir.sh -./start.sh +./start-demo.sh ``` ```bash -rsync -av configs/ target/ozone-basicDistribution-/distro/configs +rsync -av configs/ target/ozone-basic-/distro/configs ``` -(replace `` with the current version of ozone-kenya) +(replace `` with the current version of basicDistribution) It is possible to exclude some of the files inherited from the parent Ozone Distro transitive dependencies (thus the OpenMRS Distro Reference Application). From 493b986889a2335ea930737cfc52cc51074d2622 Mon Sep 17 00:00:00 2001 From: rbuisson Date: Wed, 27 Mar 2024 18:36:07 +0100 Subject: [PATCH 3/3] OZ-468: Remove the deprecated readmes --- .../resources/archetype-resources/README.md | 3 +- .../archetype-resources/readme/impl-guide.md | 60 ------------------- .../projects/it-basic/reference/README.md | 4 +- .../it-basic/reference/readme/impl-guide.md | 55 ----------------- 4 files changed, 4 insertions(+), 118 deletions(-) delete mode 100644 maven-archetype/src/main/resources/archetype-resources/readme/impl-guide.md delete mode 100644 maven-archetype/src/test/resources/projects/it-basic/reference/readme/impl-guide.md diff --git a/maven-archetype/src/main/resources/archetype-resources/README.md b/maven-archetype/src/main/resources/archetype-resources/README.md index 22399b2..2e20543 100644 --- a/maven-archetype/src/main/resources/archetype-resources/README.md +++ b/maven-archetype/src/main/resources/archetype-resources/README.md @@ -2,8 +2,7 @@ **${distributionName}** is a distribution of [Ozone HIS](https://www.ozone-his.com). -## Implementer Guide -A technical guide to help implementers building and running the project can be found [here](readme/impl-guide.md). +Please refer to the online Ozone documentation for instructions how to run the project: https://docs.ozone-his.com/create-distro/#available-commands ## Release Notes diff --git a/maven-archetype/src/main/resources/archetype-resources/readme/impl-guide.md b/maven-archetype/src/main/resources/archetype-resources/readme/impl-guide.md deleted file mode 100644 index a5362a1..0000000 --- a/maven-archetype/src/main/resources/archetype-resources/readme/impl-guide.md +++ /dev/null @@ -1,60 +0,0 @@ -# ${distributionName} - Implementer Guide - -This distribution can be run using the [Ozone Docker Compose](https://github.com/ozone-his/ozone-docker-compose) project, which is the default configuration for this. The quick start command below is for demonstration and trial purposes and would not be suitable for a stable environment. - -## Quick Start - -Build -```bash -./scripts/mvnw clean package -``` - -Run -```bash -source target/go-to-scripts-dir.sh -./start-demo.sh -``` - -### Working on configurations: - -If needed to work on the distro configurations and see the results, you have several options: -- (1) Turn down the whole project with its volumes, build again and run. -- (2) Replace files in the mounted Docker volume (all files or only individual files) - -#### Option 1. Turn down the whole project and start afresh -```bash -source target/go-to-scripts-dir.sh -./destroy-demo.sh -``` - -Re-build: -```bash -./scripts/mvnw clean package -``` - -Then start afresh: -```bash -source target/go-to-scripts-dir.sh -./start-demo.sh -``` - -#### Option 2. Replace only the files needed, directly in the mounted Docker volume -```bash -rsync -av configs/ target/${artifactId}-/distro/configs -``` -(replace `` with the current version of ${distributionName}) - -### Excluding inherited files from Ozone Distro: - -It is possible to exclude some of the files inherited from the parent Ozone Distro transitive dependencies (thus the OpenMRS Distro Reference Application). -This can be achieved by providing your exclusion path in the main pom.xml, using the Maven Resource plugin `excludes`: - -Eg.: -```xml -${project.build.directory}/ozone - - distro/**/appointment* - distro/**/concepts*demo.csv - ... - -``` diff --git a/maven-archetype/src/test/resources/projects/it-basic/reference/README.md b/maven-archetype/src/test/resources/projects/it-basic/reference/README.md index f9f9bfb..4fb37fb 100644 --- a/maven-archetype/src/test/resources/projects/it-basic/reference/README.md +++ b/maven-archetype/src/test/resources/projects/it-basic/reference/README.md @@ -2,6 +2,8 @@ **basicDistribution** is a distribution of [Ozone HIS](https://www.ozone-his.com). -A technical guide to help implementers building and running the project can be found [here](readme/impl-guide.md). +Please refer to the online Ozone documentation for instructions how to run the project: https://docs.ozone-his.com/create-distro/#available-commands +## Release Notes +### 1.0.0-SNAPSHOT (in progress) diff --git a/maven-archetype/src/test/resources/projects/it-basic/reference/readme/impl-guide.md b/maven-archetype/src/test/resources/projects/it-basic/reference/readme/impl-guide.md deleted file mode 100644 index ace6a5d..0000000 --- a/maven-archetype/src/test/resources/projects/it-basic/reference/readme/impl-guide.md +++ /dev/null @@ -1,55 +0,0 @@ -# basicDistribution - Implementer Guide - -This distribution can be run using the [Ozone Docker Compose](https://github.com/ozone-his/ozone-docker-compose) project, which is the default configuration for this. The quick start command below is for demonstration and trial purposes and would not be suitable for a stable environment. - - -Build -```bash -./scripts/mvnw clean package -``` - -Run -```bash -source target/go-to-scripts-dir.sh -./start-demo.sh -``` - - -If needed to work on the distro configurations and see the results, you have several options: -- (1) Turn down the whole project with its volumes, build again and run. -- (2) Replace files in the mounted Docker volume (all files or only individual files) - -```bash -source target/go-to-scripts-dir.sh -./destroy-demo.sh -``` - -Re-build: -```bash -./scripts/mvnw clean package -``` - -Then start afresh: -```bash -source target/go-to-scripts-dir.sh -./start-demo.sh -``` - -```bash -rsync -av configs/ target/ozone-basic-/distro/configs -``` -(replace `` with the current version of basicDistribution) - - -It is possible to exclude some of the files inherited from the parent Ozone Distro transitive dependencies (thus the OpenMRS Distro Reference Application). -This can be achieved by providing your exclusion path in the main pom.xml, using the Maven Resource plugin `excludes`: - -Eg.: -```xml -${project.build.directory}/ozone - - distro/**/appointment* - distro/**/concepts*demo.csv - ... - -```