diff --git a/README.md b/README.md index 041abd2b..eb239d1a 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,6 @@ Ozone for Cambodia or **Ozone Kh** is a distribution of [Ozone HIS](https://www. | Dev | https://oz-kh-dev.mekomsolutions.net/openmrs/spa/login# | admin / Admin123 | | UAT | https://oz-kh-uat.mekomsolutions.net/openmrs/spa/login# | admin / Admin123 | -## Implementer Guide - -A technical guide to help implementer building and running the project can be found [here](readme/impl-guide.md). ## Public Access to the Project @@ -25,9 +22,14 @@ A large part Ozone Kh's roadmap is managed publicly to promote transparency and - Slack channel: https://openmrs.slack.com/archives/C03ESJABQKY - Issue tracker: https://issues.openmrs.org/projects/KH/issues +- Ozone Docs: https://docs.ozone-his.com/ ## Release Notes +### Version 1.7.0 (WIP) + +- Update project structure to be compatible with Ozone alpha.10 and above. + ### Version 1.6.1 - Updated Common Reports OpenMRS module to version 1.4.1 containing Disbursement report improvements. diff --git a/base/assembly.xml b/base/assembly.xml index fa717f90..4c54c82e 100644 --- a/base/assembly.xml +++ b/base/assembly.xml @@ -6,15 +6,15 @@ http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd" > - base + zip-distro-dir zip false - .. + . ${project.build.directory}/${project.artifactId}-${project.version} - \ No newline at end of file + diff --git a/configs/openmrs/frontend_config/emr_logo_color.png b/base/configs/openmrs/frontend_config/emr_logo_color.png similarity index 100% rename from configs/openmrs/frontend_config/emr_logo_color.png rename to base/configs/openmrs/frontend_config/emr_logo_color.png diff --git a/configs/openmrs/frontend_config/emr_logo_small_not_bold.png b/base/configs/openmrs/frontend_config/emr_logo_small_not_bold.png similarity index 100% rename from configs/openmrs/frontend_config/emr_logo_small_not_bold.png rename to base/configs/openmrs/frontend_config/emr_logo_small_not_bold.png diff --git a/configs/openmrs/frontend_config/ozone-frontend-config.json b/base/configs/openmrs/frontend_config/ozone-frontend-config.json similarity index 100% rename from configs/openmrs/frontend_config/ozone-frontend-config.json rename to base/configs/openmrs/frontend_config/ozone-frontend-config.json diff --git a/base/configs/openmrs/initializer_config/.gitkeep b/base/configs/openmrs/initializer_config/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/configs/openmrs/initializer_config/addresshierarchy/addressConfiguration.xml b/base/configs/openmrs/initializer_config/addresshierarchy/addressConfiguration.xml similarity index 100% rename from configs/openmrs/initializer_config/addresshierarchy/addressConfiguration.xml rename to base/configs/openmrs/initializer_config/addresshierarchy/addressConfiguration.xml diff --git a/configs/openmrs/initializer_config/addresshierarchy/addresshierarchy.csv b/base/configs/openmrs/initializer_config/addresshierarchy/addresshierarchy.csv similarity index 100% rename from configs/openmrs/initializer_config/addresshierarchy/addresshierarchy.csv rename to base/configs/openmrs/initializer_config/addresshierarchy/addresshierarchy.csv diff --git a/configs/openmrs/initializer_config/ampathforms/NCD_Consultation.json b/base/configs/openmrs/initializer_config/ampathforms/NCD_Consultation.json similarity index 100% rename from configs/openmrs/initializer_config/ampathforms/NCD_Consultation.json rename to base/configs/openmrs/initializer_config/ampathforms/NCD_Consultation.json diff --git a/configs/openmrs/initializer_config/ampathforms/NCD_Medical_History.json b/base/configs/openmrs/initializer_config/ampathforms/NCD_Medical_History.json similarity index 100% rename from configs/openmrs/initializer_config/ampathforms/NCD_Medical_History.json rename to base/configs/openmrs/initializer_config/ampathforms/NCD_Medical_History.json diff --git a/configs/openmrs/initializer_config/ampathforms/NCD_Screening.json b/base/configs/openmrs/initializer_config/ampathforms/NCD_Screening.json similarity index 100% rename from configs/openmrs/initializer_config/ampathforms/NCD_Screening.json rename to base/configs/openmrs/initializer_config/ampathforms/NCD_Screening.json diff --git a/configs/openmrs/initializer_config/ampathforms/cervical_cancer_screening.json b/base/configs/openmrs/initializer_config/ampathforms/cervical_cancer_screening.json similarity index 100% rename from configs/openmrs/initializer_config/ampathforms/cervical_cancer_screening.json rename to base/configs/openmrs/initializer_config/ampathforms/cervical_cancer_screening.json diff --git a/configs/openmrs/initializer_config/ampathformstranslations/Health Center - NCD Screening_translations_en.json b/base/configs/openmrs/initializer_config/ampathformstranslations/Health Center - NCD Screening_translations_en.json similarity index 100% rename from configs/openmrs/initializer_config/ampathformstranslations/Health Center - NCD Screening_translations_en.json rename to base/configs/openmrs/initializer_config/ampathformstranslations/Health Center - NCD Screening_translations_en.json diff --git a/configs/openmrs/initializer_config/ampathformstranslations/Health Center - NCD Screening_translations_km.json b/base/configs/openmrs/initializer_config/ampathformstranslations/Health Center - NCD Screening_translations_km.json similarity index 100% rename from configs/openmrs/initializer_config/ampathformstranslations/Health Center - NCD Screening_translations_km.json rename to base/configs/openmrs/initializer_config/ampathformstranslations/Health Center - NCD Screening_translations_km.json diff --git a/configs/openmrs/initializer_config/ampathformstranslations/NCD Consultation_translations_en.json b/base/configs/openmrs/initializer_config/ampathformstranslations/NCD Consultation_translations_en.json similarity index 100% rename from configs/openmrs/initializer_config/ampathformstranslations/NCD Consultation_translations_en.json rename to base/configs/openmrs/initializer_config/ampathformstranslations/NCD Consultation_translations_en.json diff --git a/configs/openmrs/initializer_config/ampathformstranslations/NCD Consultation_translations_km.json b/base/configs/openmrs/initializer_config/ampathformstranslations/NCD Consultation_translations_km.json similarity index 100% rename from configs/openmrs/initializer_config/ampathformstranslations/NCD Consultation_translations_km.json rename to base/configs/openmrs/initializer_config/ampathformstranslations/NCD Consultation_translations_km.json diff --git a/configs/openmrs/initializer_config/ampathformstranslations/NCD Medical History_translations_en.json b/base/configs/openmrs/initializer_config/ampathformstranslations/NCD Medical History_translations_en.json similarity index 100% rename from configs/openmrs/initializer_config/ampathformstranslations/NCD Medical History_translations_en.json rename to base/configs/openmrs/initializer_config/ampathformstranslations/NCD Medical History_translations_en.json diff --git a/configs/openmrs/initializer_config/ampathformstranslations/NCD Medical History_translations_km.json b/base/configs/openmrs/initializer_config/ampathformstranslations/NCD Medical History_translations_km.json similarity index 100% rename from configs/openmrs/initializer_config/ampathformstranslations/NCD Medical History_translations_km.json rename to base/configs/openmrs/initializer_config/ampathformstranslations/NCD Medical History_translations_km.json diff --git a/configs/openmrs/initializer_config/ampathformstranslations/cervical_cancer_screening_en.json b/base/configs/openmrs/initializer_config/ampathformstranslations/cervical_cancer_screening_en.json similarity index 100% rename from configs/openmrs/initializer_config/ampathformstranslations/cervical_cancer_screening_en.json rename to base/configs/openmrs/initializer_config/ampathformstranslations/cervical_cancer_screening_en.json diff --git a/configs/openmrs/initializer_config/ampathformstranslations/cervical_cancer_screening_km.json b/base/configs/openmrs/initializer_config/ampathformstranslations/cervical_cancer_screening_km.json similarity index 100% rename from configs/openmrs/initializer_config/ampathformstranslations/cervical_cancer_screening_km.json rename to base/configs/openmrs/initializer_config/ampathformstranslations/cervical_cancer_screening_km.json diff --git a/configs/openmrs/initializer_config/attributetypes/attribute_types.csv b/base/configs/openmrs/initializer_config/attributetypes/attribute_types.csv similarity index 100% rename from configs/openmrs/initializer_config/attributetypes/attribute_types.csv rename to base/configs/openmrs/initializer_config/attributetypes/attribute_types.csv diff --git a/configs/openmrs/initializer_config/concepts/assessment.csv b/base/configs/openmrs/initializer_config/concepts/assessment.csv similarity index 100% rename from configs/openmrs/initializer_config/concepts/assessment.csv rename to base/configs/openmrs/initializer_config/concepts/assessment.csv diff --git a/configs/openmrs/initializer_config/concepts/diagnosis.csv b/base/configs/openmrs/initializer_config/concepts/diagnosis.csv similarity index 100% rename from configs/openmrs/initializer_config/concepts/diagnosis.csv rename to base/configs/openmrs/initializer_config/concepts/diagnosis.csv diff --git a/configs/openmrs/initializer_config/concepts/drugs_concepts.csv b/base/configs/openmrs/initializer_config/concepts/drugs_concepts.csv similarity index 100% rename from configs/openmrs/initializer_config/concepts/drugs_concepts.csv rename to base/configs/openmrs/initializer_config/concepts/drugs_concepts.csv diff --git a/configs/openmrs/initializer_config/concepts/education.csv b/base/configs/openmrs/initializer_config/concepts/education.csv similarity index 100% rename from configs/openmrs/initializer_config/concepts/education.csv rename to base/configs/openmrs/initializer_config/concepts/education.csv diff --git a/configs/openmrs/initializer_config/concepts/ethnicities.csv b/base/configs/openmrs/initializer_config/concepts/ethnicities.csv similarity index 100% rename from configs/openmrs/initializer_config/concepts/ethnicities.csv rename to base/configs/openmrs/initializer_config/concepts/ethnicities.csv diff --git a/configs/openmrs/initializer_config/concepts/findings.csv b/base/configs/openmrs/initializer_config/concepts/findings.csv similarity index 100% rename from configs/openmrs/initializer_config/concepts/findings.csv rename to base/configs/openmrs/initializer_config/concepts/findings.csv diff --git a/configs/openmrs/initializer_config/concepts/general.csv b/base/configs/openmrs/initializer_config/concepts/general.csv similarity index 100% rename from configs/openmrs/initializer_config/concepts/general.csv rename to base/configs/openmrs/initializer_config/concepts/general.csv diff --git a/configs/openmrs/initializer_config/concepts/labs.csv b/base/configs/openmrs/initializer_config/concepts/labs.csv similarity index 100% rename from configs/openmrs/initializer_config/concepts/labs.csv rename to base/configs/openmrs/initializer_config/concepts/labs.csv diff --git a/configs/openmrs/initializer_config/concepts/lifestyle.csv b/base/configs/openmrs/initializer_config/concepts/lifestyle.csv similarity index 100% rename from configs/openmrs/initializer_config/concepts/lifestyle.csv rename to base/configs/openmrs/initializer_config/concepts/lifestyle.csv diff --git a/configs/openmrs/initializer_config/concepts/locations.csv b/base/configs/openmrs/initializer_config/concepts/locations.csv similarity index 100% rename from configs/openmrs/initializer_config/concepts/locations.csv rename to base/configs/openmrs/initializer_config/concepts/locations.csv diff --git a/configs/openmrs/initializer_config/concepts/management.csv b/base/configs/openmrs/initializer_config/concepts/management.csv similarity index 100% rename from configs/openmrs/initializer_config/concepts/management.csv rename to base/configs/openmrs/initializer_config/concepts/management.csv diff --git a/configs/openmrs/initializer_config/concepts/marital_status.csv b/base/configs/openmrs/initializer_config/concepts/marital_status.csv similarity index 100% rename from configs/openmrs/initializer_config/concepts/marital_status.csv rename to base/configs/openmrs/initializer_config/concepts/marital_status.csv diff --git a/configs/openmrs/initializer_config/concepts/occupation.csv b/base/configs/openmrs/initializer_config/concepts/occupation.csv similarity index 100% rename from configs/openmrs/initializer_config/concepts/occupation.csv rename to base/configs/openmrs/initializer_config/concepts/occupation.csv diff --git a/configs/openmrs/initializer_config/concepts/opdConsultationReportConcepts.csv b/base/configs/openmrs/initializer_config/concepts/opdConsultationReportConcepts.csv similarity index 100% rename from configs/openmrs/initializer_config/concepts/opdConsultationReportConcepts.csv rename to base/configs/openmrs/initializer_config/concepts/opdConsultationReportConcepts.csv diff --git a/configs/openmrs/initializer_config/concepts/past_medical_history.csv b/base/configs/openmrs/initializer_config/concepts/past_medical_history.csv similarity index 100% rename from configs/openmrs/initializer_config/concepts/past_medical_history.csv rename to base/configs/openmrs/initializer_config/concepts/past_medical_history.csv diff --git a/configs/openmrs/initializer_config/concepts/physical_examination.csv b/base/configs/openmrs/initializer_config/concepts/physical_examination.csv similarity index 100% rename from configs/openmrs/initializer_config/concepts/physical_examination.csv rename to base/configs/openmrs/initializer_config/concepts/physical_examination.csv diff --git a/configs/openmrs/initializer_config/concepts/reproductive_history.csv b/base/configs/openmrs/initializer_config/concepts/reproductive_history.csv similarity index 100% rename from configs/openmrs/initializer_config/concepts/reproductive_history.csv rename to base/configs/openmrs/initializer_config/concepts/reproductive_history.csv diff --git a/configs/openmrs/initializer_config/concepts/sexual_orientation.csv b/base/configs/openmrs/initializer_config/concepts/sexual_orientation.csv similarity index 100% rename from configs/openmrs/initializer_config/concepts/sexual_orientation.csv rename to base/configs/openmrs/initializer_config/concepts/sexual_orientation.csv diff --git a/configs/openmrs/initializer_config/drugs/drugs.csv b/base/configs/openmrs/initializer_config/drugs/drugs.csv similarity index 100% rename from configs/openmrs/initializer_config/drugs/drugs.csv rename to base/configs/openmrs/initializer_config/drugs/drugs.csv diff --git a/configs/openmrs/initializer_config/encountertypes/encountertypes.csv b/base/configs/openmrs/initializer_config/encountertypes/encountertypes.csv similarity index 100% rename from configs/openmrs/initializer_config/encountertypes/encountertypes.csv rename to base/configs/openmrs/initializer_config/encountertypes/encountertypes.csv diff --git a/configs/openmrs/initializer_config/encountertypes/encountertypes_core.csv b/base/configs/openmrs/initializer_config/encountertypes/encountertypes_core.csv similarity index 100% rename from configs/openmrs/initializer_config/encountertypes/encountertypes_core.csv rename to base/configs/openmrs/initializer_config/encountertypes/encountertypes_core.csv diff --git a/configs/openmrs/initializer_config/globalproperties/address-template.xml b/base/configs/openmrs/initializer_config/globalproperties/address-template.xml similarity index 100% rename from configs/openmrs/initializer_config/globalproperties/address-template.xml rename to base/configs/openmrs/initializer_config/globalproperties/address-template.xml diff --git a/configs/openmrs/initializer_config/globalproperties/i18n.xml b/base/configs/openmrs/initializer_config/globalproperties/i18n.xml similarity index 100% rename from configs/openmrs/initializer_config/globalproperties/i18n.xml rename to base/configs/openmrs/initializer_config/globalproperties/i18n.xml diff --git a/configs/openmrs/initializer_config/jsonkeyvalues/opdConsultationReportConfig.json b/base/configs/openmrs/initializer_config/jsonkeyvalues/opdConsultationReportConfig.json similarity index 100% rename from configs/openmrs/initializer_config/jsonkeyvalues/opdConsultationReportConfig.json rename to base/configs/openmrs/initializer_config/jsonkeyvalues/opdConsultationReportConfig.json diff --git a/configs/openmrs/initializer_config/locations/locations.csv b/base/configs/openmrs/initializer_config/locations/locations.csv similarity index 100% rename from configs/openmrs/initializer_config/locations/locations.csv rename to base/configs/openmrs/initializer_config/locations/locations.csv diff --git a/configs/openmrs/initializer_config/ocl/CCD_1.20220817052001.zip b/base/configs/openmrs/initializer_config/ocl/CCD_1.20220817052001.zip similarity index 100% rename from configs/openmrs/initializer_config/ocl/CCD_1.20220817052001.zip rename to base/configs/openmrs/initializer_config/ocl/CCD_1.20220817052001.zip diff --git a/configs/openmrs/initializer_config/ocl/CDU_3.0.20220817051630.zip b/base/configs/openmrs/initializer_config/ocl/CDU_3.0.20220817051630.zip similarity index 100% rename from configs/openmrs/initializer_config/ocl/CDU_3.0.20220817051630.zip rename to base/configs/openmrs/initializer_config/ocl/CDU_3.0.20220817051630.zip diff --git a/configs/openmrs/initializer_config/ocl/CIEL-frequencies_1.20220816234743.zip b/base/configs/openmrs/initializer_config/ocl/CIEL-frequencies_1.20220816234743.zip similarity index 100% rename from configs/openmrs/initializer_config/ocl/CIEL-frequencies_1.20220816234743.zip rename to base/configs/openmrs/initializer_config/ocl/CIEL-frequencies_1.20220816234743.zip diff --git a/configs/openmrs/initializer_config/ocl/CIELAllergySet_1.20220817053026.zip b/base/configs/openmrs/initializer_config/ocl/CIELAllergySet_1.20220817053026.zip similarity index 100% rename from configs/openmrs/initializer_config/ocl/CIELAllergySet_1.20220817053026.zip rename to base/configs/openmrs/initializer_config/ocl/CIELAllergySet_1.20220817053026.zip diff --git a/configs/openmrs/initializer_config/ocl/CIELImmunizationContent_1.20220817012726.zip b/base/configs/openmrs/initializer_config/ocl/CIELImmunizationContent_1.20220817012726.zip similarity index 100% rename from configs/openmrs/initializer_config/ocl/CIELImmunizationContent_1.20220817012726.zip rename to base/configs/openmrs/initializer_config/ocl/CIELImmunizationContent_1.20220817012726.zip diff --git a/configs/openmrs/initializer_config/ocl/DemoQueueConcepts_1.zip b/base/configs/openmrs/initializer_config/ocl/DemoQueueConcepts_1.zip similarity index 100% rename from configs/openmrs/initializer_config/ocl/DemoQueueConcepts_1.zip rename to base/configs/openmrs/initializer_config/ocl/DemoQueueConcepts_1.zip diff --git a/configs/openmrs/initializer_config/ocl/ExampleLabFilter_2.20220331075053.zip b/base/configs/openmrs/initializer_config/ocl/ExampleLabFilter_2.20220331075053.zip similarity index 100% rename from configs/openmrs/initializer_config/ocl/ExampleLabFilter_2.20220331075053.zip rename to base/configs/openmrs/initializer_config/ocl/ExampleLabFilter_2.20220331075053.zip diff --git a/configs/openmrs/initializer_config/ocl/GenericDemoForm_3.20220225043204.zip b/base/configs/openmrs/initializer_config/ocl/GenericDemoForm_3.20220225043204.zip similarity index 100% rename from configs/openmrs/initializer_config/ocl/GenericDemoForm_3.20220225043204.zip rename to base/configs/openmrs/initializer_config/ocl/GenericDemoForm_3.20220225043204.zip diff --git a/configs/openmrs/initializer_config/ocl/demopackagehiv_12.20220525204054.zip b/base/configs/openmrs/initializer_config/ocl/demopackagehiv_12.20220525204054.zip similarity index 100% rename from configs/openmrs/initializer_config/ocl/demopackagehiv_12.20220525204054.zip rename to base/configs/openmrs/initializer_config/ocl/demopackagehiv_12.20220525204054.zip diff --git a/configs/openmrs/initializer_config/ocl/lab_tests-core-demo.zip b/base/configs/openmrs/initializer_config/ocl/lab_tests-core-demo.zip similarity index 100% rename from configs/openmrs/initializer_config/ocl/lab_tests-core-demo.zip rename to base/configs/openmrs/initializer_config/ocl/lab_tests-core-demo.zip diff --git a/configs/openmrs/initializer_config/patientidentifiertypes/cambodia-identifiers.csv b/base/configs/openmrs/initializer_config/patientidentifiertypes/cambodia-identifiers.csv similarity index 100% rename from configs/openmrs/initializer_config/patientidentifiertypes/cambodia-identifiers.csv rename to base/configs/openmrs/initializer_config/patientidentifiertypes/cambodia-identifiers.csv diff --git a/configs/openmrs/initializer_config/patientidentifiertypes/patientidentifiertypes.csv b/base/configs/openmrs/initializer_config/patientidentifiertypes/patientidentifiertypes.csv similarity index 100% rename from configs/openmrs/initializer_config/patientidentifiertypes/patientidentifiertypes.csv rename to base/configs/openmrs/initializer_config/patientidentifiertypes/patientidentifiertypes.csv diff --git a/configs/openmrs/initializer_config/patientidentifiertypes/retire-core-identifiers.csv b/base/configs/openmrs/initializer_config/patientidentifiertypes/retire-core-identifiers.csv similarity index 100% rename from configs/openmrs/initializer_config/patientidentifiertypes/retire-core-identifiers.csv rename to base/configs/openmrs/initializer_config/patientidentifiertypes/retire-core-identifiers.csv diff --git a/configs/openmrs/initializer_config/personattributetypes/personattributetypes.csv b/base/configs/openmrs/initializer_config/personattributetypes/personattributetypes.csv similarity index 100% rename from configs/openmrs/initializer_config/personattributetypes/personattributetypes.csv rename to base/configs/openmrs/initializer_config/personattributetypes/personattributetypes.csv diff --git a/configs/openmrs/initializer_config/privileges/privileges.csv b/base/configs/openmrs/initializer_config/privileges/privileges.csv similarity index 100% rename from configs/openmrs/initializer_config/privileges/privileges.csv rename to base/configs/openmrs/initializer_config/privileges/privileges.csv diff --git a/configs/openmrs/initializer_config/privileges/privileges_core.csv b/base/configs/openmrs/initializer_config/privileges/privileges_core.csv similarity index 100% rename from configs/openmrs/initializer_config/privileges/privileges_core.csv rename to base/configs/openmrs/initializer_config/privileges/privileges_core.csv diff --git a/configs/openmrs/initializer_config/roles/roles.csv b/base/configs/openmrs/initializer_config/roles/roles.csv similarity index 100% rename from configs/openmrs/initializer_config/roles/roles.csv rename to base/configs/openmrs/initializer_config/roles/roles.csv diff --git a/configs/openmrs/initializer_config/roles/roles_core.csv b/base/configs/openmrs/initializer_config/roles/roles_core.csv similarity index 100% rename from configs/openmrs/initializer_config/roles/roles_core.csv rename to base/configs/openmrs/initializer_config/roles/roles_core.csv diff --git a/configs/openmrs/initializer_config/visittypes/visittypes.csv b/base/configs/openmrs/initializer_config/visittypes/visittypes.csv similarity index 100% rename from configs/openmrs/initializer_config/visittypes/visittypes.csv rename to base/configs/openmrs/initializer_config/visittypes/visittypes.csv diff --git a/base/dependency-excludes.txt b/base/dependency-excludes.txt deleted file mode 100644 index 1e995c91..00000000 --- a/base/dependency-excludes.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Escaped regex pattern. Supports multiple lines. -# -\.\*openmrs_config.\*appointment.\* -\.\*openmrs_config.\*concepts.\*demo.\*csv -\.\*openmrs_config.\*encountertypes.\*demo.\*csv -\.\*openmrs_config.\*personattributetypes.\*demo.\*csv -\.\*openmrs_config.\*privileges.\*demo.\*csv -\.\*openmrs_config.\*program.\* -\.\*openmrs_config.\*roles.\*demo.\*csv -\.\*openmrs_config.\*ampathforms.\*json -\.\*openmrs_config.\*ampathformstranslations.\*json -# \.\*openmrs_config.\*demo.\*csv -\.\*ozone-frontend-config.json diff --git a/base/pom.xml b/base/pom.xml index bd0ac51d..035f7538 100644 --- a/base/pom.xml +++ b/base/pom.xml @@ -1,120 +1,38 @@ - + + 4.0.0 - com.ozonehis - ozone-cambodia - Ozone for Cambodia - 1.7.0-SNAPSHOT - pom - com.ozonehis - ozone-cambodia-parent - 1.7.0-SNAPSHOT + maven-parent + 1.0.0-SNAPSHOT + + com.ozonehis + ozone-cambodia + 1.7.0-SNAPSHOT + UTF-8 + 8 + 8 - - com.ozonehis - ozone - zip - 1.0.0-alpha.9 - - - org.openmrs.module - commonreports-omod - 1.4.2 - jar - + - - - org.apache.maven.plugins - maven-dependency-plugin - 2.8 - - - Unpack Ozone - generate-resources - - unpack-dependencies - - - true - true - ${project.build.directory}/ozone - ozone - - - - Copy dependency jars/omod binaries - package - - copy-dependencies - - - true - true - ${project.build.directory}/${project.artifactId}-${project.version}/distro/binaries/openmrs/modules - - jar, omod - - - - - - maven-antrun-plugin - 1.7 - - - Rename dependency *.jar to *.omod binaries - package - - - - - - - - - - run - - - - org.apache.maven.plugins maven-resources-plugin - 3.3.0 - - - Copy local configs - prepare-package - - copy-resources - - - - ${project.build.directory}/${project.artifactId}-${project.version}/distro/configs - true - - - ${project.parent.basedir}/configs - - - - - Exclude some Ozone files + Exclude unneeded Ozone files process-resources copy-resources @@ -127,19 +45,21 @@ ${project.build.directory}/ozone - distro/**/appointment* - distro/**/concepts*demo.csv - distro/**/encountertypes*demo.csv - distro/**/personattributetypes*demo.csv - distro/**/privileges*demo.csv - distro/**/program* - distro/**/roles*demo.csv - distro/**/ampathforms/*.json - distro/**/ampathformstranslations/*.json - distro/**/*demo.csv - distro/configs/openmrs/frontend_config/ozone_logo* - - distro/binaries/openmrs/modules/commonreports-*.omod + distro/configs/**/address*/*demo.* + distro/configs/**/concepts/*demo.csv + distro/configs/**/program* + distro/configs/**/ampathforms/ + distro/configs/**/ampathformstranslations/ + distro/configs/**/appointment*/ + distro/configs/**/attributetypes/ + distro/configs/**/globalproperties/*demo.xml + distro/configs/**/drugs/ + distro/configs/**/locations/ + distro/configs/**/patientidentifiertypes/ + distro/configs/**/personattributetypes/ + distro/configs/**/privileges/ + distro/configs/**/roles/*demo.* + distro/configs/**/visittypes* @@ -147,27 +67,42 @@ - - - org.apache.maven.plugins - maven-assembly-plugin - - - Package distro - package - - single - - - false - - ${project.basedir}/assembly.xml - - - - - - - + + + + validator + + 1.8 + + env.CI + true + + + + + + + org.openmrs.maven.plugins + openmrs-packager-maven-plugin + + + Validate OpenMRS configuration + integration-test + + validate-configurations + + + + ${project.build.directory}/${project.artifactId}-${project.version}/distro/configs/openmrs/initializer_config + + + + + + + + + + \ No newline at end of file diff --git a/base/scripts/.mvn/wrapper/maven-wrapper.jar b/base/scripts/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..6c8becfd Binary files /dev/null and b/base/scripts/.mvn/wrapper/maven-wrapper.jar differ diff --git a/base/scripts/.mvn/wrapper/maven-wrapper.properties b/base/scripts/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..2420e72d --- /dev/null +++ b/base/scripts/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.1/maven-wrapper-3.3.1.jar diff --git a/scripts/docker-compose-files.txt b/base/scripts/docker-compose-files.txt similarity index 100% rename from scripts/docker-compose-files.txt rename to base/scripts/docker-compose-files.txt diff --git a/base/scripts/mvnw b/base/scripts/mvnw new file mode 100755 index 00000000..aa09908b --- /dev/null +++ b/base/scripts/mvnw @@ -0,0 +1,332 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Apache Maven Wrapper startup batch script, version 3.3.1 +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ]; then + + if [ -f /usr/local/etc/mavenrc ]; then + . /usr/local/etc/mavenrc + fi + + if [ -f /etc/mavenrc ]; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ]; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false +darwin=false +mingw=false +case "$(uname)" in +CYGWIN*) cygwin=true ;; +MINGW*) mingw=true ;; +Darwin*) + darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + JAVA_HOME="$(/usr/libexec/java_home)" + export JAVA_HOME + else + JAVA_HOME="/Library/Java/Home" + export JAVA_HOME + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ]; then + if [ -r /etc/gentoo-release ]; then + JAVA_HOME=$(java-config --jre-home) + fi +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin; then + [ -n "$JAVA_HOME" ] \ + && JAVA_HOME=$(cygpath --unix "$JAVA_HOME") + [ -n "$CLASSPATH" ] \ + && CLASSPATH=$(cygpath --path --unix "$CLASSPATH") +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw; then + [ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] \ + && JAVA_HOME="$( + cd "$JAVA_HOME" || ( + echo "cannot cd into $JAVA_HOME." >&2 + exit 1 + ) + pwd + )" +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="$(which javac)" + if [ -n "$javaExecutable" ] && ! [ "$(expr "$javaExecutable" : '\([^ ]*\)')" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=$(which readlink) + if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then + if $darwin; then + javaHome="$(dirname "$javaExecutable")" + javaExecutable="$(cd "$javaHome" && pwd -P)/javac" + else + javaExecutable="$(readlink -f "$javaExecutable")" + fi + javaHome="$(dirname "$javaExecutable")" + javaHome=$(expr "$javaHome" : '\(.*\)/bin') + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ]; then + if [ -n "$JAVA_HOME" ]; then + if [ -x "$JAVA_HOME/jre/sh/java" ]; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="$( + \unset -f command 2>/dev/null + \command -v java + )" + fi +fi + +if [ ! -x "$JAVACMD" ]; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ]; then + echo "Warning: JAVA_HOME environment variable is not set." >&2 +fi + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + if [ -z "$1" ]; then + echo "Path not specified to find_maven_basedir" >&2 + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ]; do + if [ -d "$wdir"/.mvn ]; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=$( + cd "$wdir/.." || exit 1 + pwd + ) + fi + # end of workaround + done + printf '%s' "$( + cd "$basedir" || exit 1 + pwd + )" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + # Remove \r in case we run on Windows within Git Bash + # and check out the repository with auto CRLF management + # enabled. Otherwise, we may read lines that are delimited with + # \r\n and produce $'-Xarg\r' rather than -Xarg due to word + # splitting rules. + tr -s '\r\n' ' ' <"$1" + fi +} + +log() { + if [ "$MVNW_VERBOSE" = true ]; then + printf '%s\n' "$1" + fi +} + +BASE_DIR=$(find_maven_basedir "$(dirname "$0")") +if [ -z "$BASE_DIR" ]; then + exit 1 +fi + +MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +export MAVEN_PROJECTBASEDIR +log "$MAVEN_PROJECTBASEDIR" + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" +if [ -r "$wrapperJarPath" ]; then + log "Found $wrapperJarPath" +else + log "Couldn't find $wrapperJarPath, downloading it ..." + + if [ -n "$MVNW_REPOURL" ]; then + wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.3.1/maven-wrapper-3.3.1.jar" + else + wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.1/maven-wrapper-3.3.1.jar" + fi + while IFS="=" read -r key value; do + # Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' ) + safeValue=$(echo "$value" | tr -d '\r') + case "$key" in wrapperUrl) + wrapperUrl="$safeValue" + break + ;; + esac + done <"$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" + log "Downloading from: $wrapperUrl" + + if $cygwin; then + wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath") + fi + + if command -v wget >/dev/null; then + log "Found wget ... using wget" + [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet" + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" + else + wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" + fi + elif command -v curl >/dev/null; then + log "Found curl ... using curl" + [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent" + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" + else + curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" + fi + else + log "Falling back to using Java to download" + javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java" + javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class" + # For Cygwin, switch paths to Windows format before running javac + if $cygwin; then + javaSource=$(cygpath --path --windows "$javaSource") + javaClass=$(cygpath --path --windows "$javaClass") + fi + if [ -e "$javaSource" ]; then + if [ ! -e "$javaClass" ]; then + log " - Compiling MavenWrapperDownloader.java ..." + ("$JAVA_HOME/bin/javac" "$javaSource") + fi + if [ -e "$javaClass" ]; then + log " - Running MavenWrapperDownloader.java ..." + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath" + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +# If specified, validate the SHA-256 sum of the Maven wrapper jar file +wrapperSha256Sum="" +while IFS="=" read -r key value; do + case "$key" in wrapperSha256Sum) + wrapperSha256Sum=$value + break + ;; + esac +done <"$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" +if [ -n "$wrapperSha256Sum" ]; then + wrapperSha256Result=false + if command -v sha256sum >/dev/null; then + if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c >/dev/null 2>&1; then + wrapperSha256Result=true + fi + elif command -v shasum >/dev/null; then + if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c >/dev/null 2>&1; then + wrapperSha256Result=true + fi + else + echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 + echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + fi + if [ $wrapperSha256Result = false ]; then + echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2 + echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2 + echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2 + exit 1 + fi +fi + +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$JAVA_HOME" ] \ + && JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME") + [ -n "$CLASSPATH" ] \ + && CLASSPATH=$(cygpath --path --windows "$CLASSPATH") + [ -n "$MAVEN_PROJECTBASEDIR" ] \ + && MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR") +fi + +# Provide a "standardized" way to retrieve the CLI args that will +# work with both Windows and non-Windows executions. +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*" +export MAVEN_CMD_LINE_ARGS + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +# shellcheck disable=SC2086 # safe args +exec "$JAVACMD" \ + $MAVEN_OPTS \ + $MAVEN_DEBUG_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/scripts/mvnw.cmd b/base/scripts/mvnw.cmd similarity index 82% rename from scripts/mvnw.cmd rename to base/scripts/mvnw.cmd index cba1f040..ef8be040 100644 --- a/scripts/mvnw.cmd +++ b/base/scripts/mvnw.cmd @@ -18,7 +18,7 @@ @REM ---------------------------------------------------------------------------- @REM ---------------------------------------------------------------------------- -@REM Apache Maven Wrapper startup batch script, version 3.1.1 +@REM Apache Maven Wrapper startup batch script, version 3.3.1 @REM @REM Required ENV vars: @REM JAVA_HOME - location of a JDK home dir @@ -59,22 +59,22 @@ set ERROR_CODE=0 @REM ==== START VALIDATION ==== if not "%JAVA_HOME%" == "" goto OkJHome -echo. +echo. >&2 echo Error: JAVA_HOME not found in your environment. >&2 echo Please set the JAVA_HOME variable in your environment to match the >&2 echo location of your Java installation. >&2 -echo. +echo. >&2 goto error :OkJHome if exist "%JAVA_HOME%\bin\java.exe" goto init -echo. +echo. >&2 echo Error: JAVA_HOME is set to an invalid directory. >&2 echo JAVA_HOME = "%JAVA_HOME%" >&2 echo Please set the JAVA_HOME variable in your environment to match the >&2 echo location of your Java installation. >&2 -echo. +echo. >&2 goto error @REM ==== END VALIDATION ==== @@ -119,7 +119,7 @@ SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain -set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" +set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.1/maven-wrapper-3.3.1.jar" FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B @@ -133,7 +133,7 @@ if exist %WRAPPER_JAR% ( ) ) else ( if not "%MVNW_REPOURL%" == "" ( - SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.3.1/maven-wrapper-3.3.1.jar" ) if "%MVNW_VERBOSE%" == "true" ( echo Couldn't find %WRAPPER_JAR%, downloading it ... @@ -153,6 +153,25 @@ if exist %WRAPPER_JAR% ( ) @REM End of extension +@REM If specified, validate the SHA-256 sum of the Maven wrapper jar file +SET WRAPPER_SHA_256_SUM="" +FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B +) +IF NOT %WRAPPER_SHA_256_SUM%=="" ( + powershell -Command "&{"^ + "Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash;"^ + "$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm SHA256).Hash.ToLower();"^ + "If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^ + " Write-Error 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';"^ + " Write-Error 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';"^ + " Write-Error 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';"^ + " exit 1;"^ + "}"^ + "}" + if ERRORLEVEL 1 goto error +) + @REM Provide a "standardized" way to retrieve the CLI args that will @REM work with both Windows and non-Windows executions. set MAVEN_CMD_LINE_ARGS=%* diff --git a/base/scripts/mvnwDebug b/base/scripts/mvnwDebug new file mode 100755 index 00000000..e3c7548b --- /dev/null +++ b/base/scripts/mvnwDebug @@ -0,0 +1,35 @@ +#!/bin/sh + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# ----------------------------------------------------------------------------- +# Apache Maven Wrapper debug script, version 3.3.1 +# +# Environment Variable Prerequisites +# +# JAVA_HOME (Optional) Points to a Java installation. +# MAVEN_OPTS (Optional) Java runtime options used when Maven is executed. +# MAVEN_SKIP_RC (Optional) Flag to disable loading of mavenrc files. +# MAVEN_DEBUG_ADDRESS (Optional) Set the debug address. Default value is localhost:8000 +# ----------------------------------------------------------------------------- + +MAVEN_DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=${MAVEN_DEBUG_ADDRESS:-localhost:8000}" + +echo Preparing to execute Maven Wrapper in debug mode + +env MAVEN_OPTS="$MAVEN_OPTS" MAVEN_DEBUG_OPTS="$MAVEN_DEBUG_OPTS" "$(dirname "$0")/mvnw" "$@" diff --git a/base/scripts/mvnwDebug.cmd b/base/scripts/mvnwDebug.cmd new file mode 100644 index 00000000..e0d3c64d --- /dev/null +++ b/base/scripts/mvnwDebug.cmd @@ -0,0 +1,44 @@ +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. + +@REM ----------------------------------------------------------------------------- +@REM Apache Maven Wrapper debug script, version 3.3.1 +@REM +@REM Environment Variable Prerequisites +@REM +@REM JAVA_HOME (Optional) Points to a Java installation. +@REM MAVEN_BATCH_ECHO (Optional) Set to 'on' to enable the echoing of the batch commands. +@REM MAVEN_BATCH_PAUSE (Optional) set to 'on' to wait for a key stroke before ending. +@REM MAVEN_OPTS (Optional) Java runtime options used when Maven is executed. +@REM MAVEN_SKIP_RC (Optional) Flag to disable loading of mavenrc files. +@REM MAVEN_DEBUG_ADDRESS (Optional) Set the debug address. Default value is localhost:8000 +@REM ----------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%"=="on" echo %MAVEN_BATCH_ECHO% + +@setlocal + +IF "%MAVEN_DEBUG_ADDRESS%"=="" @set MAVEN_DEBUG_ADDRESS=localhost:8000 + +@set MAVEN_DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=%MAVEN_DEBUG_ADDRESS% + +@call "%~dp0"mvnw.cmd %* diff --git a/pom.xml b/pom.xml index 0e070f84..62999183 100644 --- a/pom.xml +++ b/pom.xml @@ -1,3 +1,4 @@ + 4.0.0 com.ozonehis @@ -32,72 +33,11 @@ false - base prod - - - - org.apache.maven.plugins - maven-resources-plugin - 3.3.0 - - - - Copy and substitute some helper files - process-resources - - copy-resources - - - - ${project.build.directory}/ - true - - - ../scripts - false - - - ../scripts - - *.sh - - true - - - - - - - Copy docker-compose-files.txt - prepare-package - - copy-resources - - - - ${project.build.directory}/${project.artifactId}-${project.version}/run/docker/scripts - true - - - ../scripts - - docker-compose-files.txt - - true - - - - - - - - - mks-nexus-public diff --git a/prod/assembly.xml b/prod/assembly.xml index 9e541c61..4c54c82e 100644 --- a/prod/assembly.xml +++ b/prod/assembly.xml @@ -6,15 +6,15 @@ http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd" > - prod + zip-distro-dir zip false - .. + . ${project.build.directory}/${project.artifactId}-${project.version} - \ No newline at end of file + diff --git a/prod/dependency-excludes.txt b/prod/dependency-excludes.txt deleted file mode 100644 index c68cfa6c..00000000 --- a/prod/dependency-excludes.txt +++ /dev/null @@ -1,5 +0,0 @@ -# -# Escaped regex pattern. Supports multiple lines. -# -\.\*openmrs_modules.\*referencedemodata.\* - diff --git a/prod/pom.xml b/prod/pom.xml index b5053590..de050d95 100644 --- a/prod/pom.xml +++ b/prod/pom.xml @@ -1,45 +1,36 @@ - + + 4.0.0 - com.ozonehis - ozone-cambodia-prod - Ozone for Cambodia - Production - 1.7.0-SNAPSHOT - pom - - - Ozone HIS - http://www.ozone-his.com - - - - - Mekom Solutions - http://www.mekomsolutions.com - - - com.ozonehis - ozone-cambodia-parent - 1.7.0-SNAPSHOT + maven-parent + 1.0.0-SNAPSHOT + + com.ozonehis + ozone-cambodia-prod + 1.7.0-SNAPSHOT + UTF-8 + 8 + 8 + + + ozone-cambodia + com.ozonehis + 1.7.0-SNAPSHOT - - com.ozonehis - ozone-cambodia - 1.7.0-SNAPSHOT - zip - com.ozonehis ozone-config-cambodia0 zip - 1.7.0-SNAPSHOT + ${ozone.version} @@ -50,25 +41,10 @@ maven-dependency-plugin 2.8 - - - Prod: Copy Oz Kh non-prod - generate-resources - - unpack-dependencies - - - true - true - - ${project.build.directory}/${project.artifactId}-${project.version} - ozone-cambodia - - Prod: Copy Ozone Config Cambodia 0 - process-resources + prepare-package unpack-dependencies @@ -76,31 +52,12 @@ true true - ${project.build.directory}/${project.artifactId}-${project.version}/distro + ${project.build.directory}/${project.artifactId}-${project.version}/distro/ ozone-config-cambodia0 - - org.apache.maven.plugins - maven-assembly-plugin - - - Prod: Package the production distro - package - - single - - - false - - assembly.xml - - - - - @@ -109,10 +66,6 @@ mks-nexus-private https://nexus.mekomsolutions.net/repository/maven-private/ - - mks-nexus-public - https://nexus.mekomsolutions.net/repository/maven-public/ - @@ -127,4 +80,40 @@ https://nexus.mekomsolutions.net/repository/maven-private-snapshots - + + + + validator + + 1.8 + + env.CI + true + + + + + + + org.openmrs.maven.plugins + openmrs-packager-maven-plugin + + + Validate OpenMRS configuration + integration-test + + validate-configurations + + + + ${project.build.directory}/${project.artifactId}-${project.version}/distro/configs/openmrs/initializer_config + + + + + + + + + + \ No newline at end of file diff --git a/prod/start-distro.sh b/prod/start-distro.sh deleted file mode 100644 index 3b0fc35a..00000000 --- a/prod/start-distro.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -set -e - -# Set the profile value if provided -[ -z "$1" ] && profileArg="" || profileArg="-P$1" - -# Package the distro -printf "%s\n" "Build the project..." -./scripts/mvnw clean package $profileArg -printf "%s\n" "Done." - -# Run base -printf "%s\n" "Run 'base'..." -cd base/ -source target/go-to-scripts-dir.sh -./start-demo.sh - -printf "%s\n" "Run 'prod'..." -cd prod/ -source target/go-to-scripts-dir.sh -./start-demo.sh - -exit 0 \ No newline at end of file diff --git a/readme/impl-guide.md b/readme/impl-guide.md deleted file mode 100644 index d4827374..00000000 --- a/readme/impl-guide.md +++ /dev/null @@ -1,79 +0,0 @@ -# 🇰🇭 Ozone Kh - Implementer Guide - -The distro can be run using the Ozone Docker project. Quick start command below, for trials purposes only - would not suit for stable environment. - -```bash -$ git clone https://github.com/openmrs/ozone-cambodia -$ cd ozone-cambodia -``` - -## Quick start - -Build - -```bash -./scripts/mvnw clean package [-Pprod] -``` - -Run - -```bash -source [base|prod]/target/go-to-scripts-dir.sh -./start-demo.sh -``` - -Tip: After running the `source [base|prod]/target/go-to-scripts-dir.sh` command you can use `popd` to easily move back to the root directory, if needed. - -### 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 - -Turn down the project (including volumes) - -```bash -source base/target/go-to-scripts-dir.sh -./destroy-demo.sh -``` - -Re-build: - -```bash -popd # Return to the root directory -./scripts/mvnw clean package [-Pprod] -``` - -Then start afresh: - -```bash -source [base|prod]/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/ [base|prod]/target/ozone-cambodia[-prod]-/distro/configs -``` - -(replace `` with its value) - -### 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/scripts/.mvn/wrapper/maven-wrapper.jar b/scripts/.mvn/wrapper/maven-wrapper.jar deleted file mode 100644 index bf82ff01..00000000 Binary files a/scripts/.mvn/wrapper/maven-wrapper.jar and /dev/null differ diff --git a/scripts/.mvn/wrapper/maven-wrapper.properties b/scripts/.mvn/wrapper/maven-wrapper.properties deleted file mode 100644 index 84b111fb..00000000 --- a/scripts/.mvn/wrapper/maven-wrapper.properties +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar diff --git a/scripts/go-to-scripts-dir.sh b/scripts/go-to-scripts-dir.sh deleted file mode 100755 index e2f88f3a..00000000 --- a/scripts/go-to-scripts-dir.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -# -# Helper script to navigate to the Ozone Docker scripts/ directory, which contains commands to run the application -# -# Will be substituted at build time by the Maven Resource plugin filtering. -pushd ${project.build.directory}/${project.artifactId}-${project.version}/run/docker/scripts/ diff --git a/scripts/mvnw b/scripts/mvnw deleted file mode 100755 index b7f06462..00000000 --- a/scripts/mvnw +++ /dev/null @@ -1,287 +0,0 @@ -#!/bin/sh -# ---------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# ---------------------------------------------------------------------------- - -# ---------------------------------------------------------------------------- -# Apache Maven Wrapper startup batch script, version 3.1.1 -# -# Required ENV vars: -# ------------------ -# JAVA_HOME - location of a JDK home dir -# -# Optional ENV vars -# ----------------- -# MAVEN_OPTS - parameters passed to the Java VM when running Maven -# e.g. to debug Maven itself, use -# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -# MAVEN_SKIP_RC - flag to disable loading of mavenrc files -# ---------------------------------------------------------------------------- - -if [ -z "$MAVEN_SKIP_RC" ] ; then - - if [ -f /usr/local/etc/mavenrc ] ; then - . /usr/local/etc/mavenrc - fi - - if [ -f /etc/mavenrc ] ; then - . /etc/mavenrc - fi - - if [ -f "$HOME/.mavenrc" ] ; then - . "$HOME/.mavenrc" - fi - -fi - -# OS specific support. $var _must_ be set to either true or false. -cygwin=false; -darwin=false; -mingw=false -case "`uname`" in - CYGWIN*) cygwin=true ;; - MINGW*) mingw=true;; - Darwin*) darwin=true - # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home - # See https://developer.apple.com/library/mac/qa/qa1170/_index.html - if [ -z "$JAVA_HOME" ]; then - if [ -x "/usr/libexec/java_home" ]; then - JAVA_HOME="`/usr/libexec/java_home`"; export JAVA_HOME - else - JAVA_HOME="/Library/Java/Home"; export JAVA_HOME - fi - fi - ;; -esac - -if [ -z "$JAVA_HOME" ] ; then - if [ -r /etc/gentoo-release ] ; then - JAVA_HOME=`java-config --jre-home` - fi -fi - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --unix "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --unix "$CLASSPATH"` -fi - -# For Mingw, ensure paths are in UNIX format before anything is touched -if $mingw ; then - [ -n "$JAVA_HOME" ] && - JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" -fi - -if [ -z "$JAVA_HOME" ]; then - javaExecutable="`which javac`" - if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then - # readlink(1) is not available as standard on Solaris 10. - readLink=`which readlink` - if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then - if $darwin ; then - javaHome="`dirname \"$javaExecutable\"`" - javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" - else - javaExecutable="`readlink -f \"$javaExecutable\"`" - fi - javaHome="`dirname \"$javaExecutable\"`" - javaHome=`expr "$javaHome" : '\(.*\)/bin'` - JAVA_HOME="$javaHome" - export JAVA_HOME - fi - fi -fi - -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - else - JAVACMD="`\\unset -f command; \\command -v java`" - fi -fi - -if [ ! -x "$JAVACMD" ] ; then - echo "Error: JAVA_HOME is not defined correctly." >&2 - echo " We cannot execute $JAVACMD" >&2 - exit 1 -fi - -if [ -z "$JAVA_HOME" ] ; then - echo "Warning: JAVA_HOME environment variable is not set." -fi - -# traverses directory structure from process work directory to filesystem root -# first directory with .mvn subdirectory is considered project base directory -find_maven_basedir() { - if [ -z "$1" ] - then - echo "Path not specified to find_maven_basedir" - return 1 - fi - - basedir="$1" - wdir="$1" - while [ "$wdir" != '/' ] ; do - if [ -d "$wdir"/.mvn ] ; then - basedir=$wdir - break - fi - # workaround for JBEAP-8937 (on Solaris 10/Sparc) - if [ -d "${wdir}" ]; then - wdir=`cd "$wdir/.."; pwd` - fi - # end of workaround - done - printf '%s' "$(cd "$basedir"; pwd)" -} - -# concatenates all lines of a file -concat_lines() { - if [ -f "$1" ]; then - echo "$(tr -s '\n' ' ' < "$1")" - fi -} - -BASE_DIR=$(find_maven_basedir "$(dirname $0)") -if [ -z "$BASE_DIR" ]; then - exit 1; -fi - -MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR -if [ "$MVNW_VERBOSE" = true ]; then - echo $MAVEN_PROJECTBASEDIR -fi - -########################################################################################## -# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -# This allows using the maven wrapper in projects that prohibit checking in binary data. -########################################################################################## -if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found .mvn/wrapper/maven-wrapper.jar" - fi -else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." - fi - if [ -n "$MVNW_REPOURL" ]; then - wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" - else - wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" - fi - while IFS="=" read key value; do - case "$key" in (wrapperUrl) wrapperUrl="$value"; break ;; - esac - done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" - if [ "$MVNW_VERBOSE" = true ]; then - echo "Downloading from: $wrapperUrl" - fi - wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" - if $cygwin; then - wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` - fi - - if command -v wget > /dev/null; then - QUIET="--quiet" - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found wget ... using wget" - QUIET="" - fi - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" - else - wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" - fi - [ $? -eq 0 ] || rm -f "$wrapperJarPath" - elif command -v curl > /dev/null; then - QUIET="--silent" - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found curl ... using curl" - QUIET="" - fi - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L - else - curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L - fi - [ $? -eq 0 ] || rm -f "$wrapperJarPath" - else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Falling back to using Java to download" - fi - javaSource="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" - javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" - # For Cygwin, switch paths to Windows format before running javac - if $cygwin; then - javaSource=`cygpath --path --windows "$javaSource"` - javaClass=`cygpath --path --windows "$javaClass"` - fi - if [ -e "$javaSource" ]; then - if [ ! -e "$javaClass" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Compiling MavenWrapperDownloader.java ..." - fi - # Compiling the Java class - ("$JAVA_HOME/bin/javac" "$javaSource") - fi - if [ -e "$javaClass" ]; then - # Running the downloader - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Running MavenWrapperDownloader.java ..." - fi - ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") - fi - fi - fi -fi -########################################################################################## -# End of extension -########################################################################################## - -MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --windows "$CLASSPATH"` - [ -n "$MAVEN_PROJECTBASEDIR" ] && - MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` -fi - -# Provide a "standardized" way to retrieve the CLI args that will -# work with both Windows and non-Windows executions. -MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" -export MAVEN_CMD_LINE_ARGS - -WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -exec "$JAVACMD" \ - $MAVEN_OPTS \ - $MAVEN_DEBUG_OPTS \ - -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ - "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ - ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/scripts/set-ozone-dir.sh b/scripts/set-ozone-dir.sh deleted file mode 100755 index 5974a0f0..00000000 --- a/scripts/set-ozone-dir.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -set -e - -cd ${project.build.directory}/ -source ./go-to-scripts-dir.sh - -# Override the ozone-dir.env file: -cat > ozone-dir.env << EOL -# -# $(date) | ⚠️ Existing file contents overriden by the '$(basename "$0")' script. -# -export OZONE_DIR=../../distro -EOL