Skip to content

Commit

Permalink
KH-452: Re-organize to match the latest Ozone structure (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuisson authored Jan 5, 2024
1 parent 86f8ed0 commit 07002e7
Show file tree
Hide file tree
Showing 88 changed files with 401 additions and 912 deletions.
8 changes: 4 additions & 4 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---

tasks:
- init: ./start-distro.sh default

- name: Run Ozone Cambodia
before: sudo apt-get update && sudo apt-get install -y gettext-base && sudo rm -rf /var/lib/apt/lists/*
init: scripts/mvnw clean package
command: source base/target/go-to-scripts-dir.sh && ./start-demo.sh
ports:
- name: OpenMRS
description: OpenMRS 3
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Ozone Distribution For Cambodia 🇰🇭
# Ozone for Cambodia 🇰🇭

A Maven project to download and package in one place all the software artefacts that make the Ozone Distribution for Cambodia.
A Maven project to download and package in one place all the software artefacts that make the Ozone for Cambodia.

## Summary

The Ozone Distribution For Cambodia or **Ozone Kh** is a distribution of [Ozone HIS](https://www.ozone-his.com) specially configured for the MoH of Cambodia. In its original form it is an integrated system between an NCD-capable EMR system and a reporting & analytics platform for NCD population reporting.
Ozone for Cambodia or **Ozone Kh** is a distribution of [Ozone HIS](https://www.ozone-his.com) specially configured for the MoH of Cambodia. In its original form it is an integrated system between an NCD-capable EMR system and a reporting & analytics platform for NCD population reporting.

## Demo Environments

Expand All @@ -29,6 +29,7 @@ A large part Ozone Kh's roadmap is managed publicly to promote transparency and
## Release Notes

### Version 1.5.0
* Refactor the repository structure

### Version 1.4.1
* Reverted clinical forms version from '2' to '1'.
Expand Down
228 changes: 124 additions & 104 deletions base/pom.xml
Original file line number Diff line number Diff line change
@@ -1,109 +1,129 @@
<project>
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>
<groupId>com.ozonehis</groupId>
<artifactId>ozone-cambodia</artifactId>
<name>Ozone for Cambodia</name>
<version>1.5.0-SNAPSHOT</version>
<packaging>pom</packaging>

<parent>
<groupId>com.ozonehis</groupId>
<artifactId>ozone-distro-cambodia</artifactId>
<name>Ozone Distribution for Cambodia</name>
<artifactId>ozone-cambodia-parent</artifactId>
<version>1.5.0-SNAPSHOT</version>
<packaging>pom</packaging>
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<parent>
<groupId>com.ozonehis</groupId>
<artifactId>ozone-distro-cambodia-parent</artifactId>
<version>1.5.0-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>com.ozonehis</groupId>
<artifactId>ozone</artifactId>
<type>zip</type>
<version>1.0.0-SNAPSHOT</version>
</dependency>
</dependencies>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<plugins>
<!-- Copy the Ozone Distro resources -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<id>Unpack Ozone Distro</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<excludeTransitive>true</excludeTransitive>
<useBaseVersion>true</useBaseVersion>
<outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}</outputDirectory>
<includeArtifactIds>ozone-distro</includeArtifactIds>
</configuration>
</execution>
</executions>
</plugin>
<!-- Exclude resource files as speficied in dependency-excludes.txt -->
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.0</version>
<groupId>org.codehaus.mojo</groupId>
<executions>
<execution>
<id>Run exclude-files.sh</id>
<phase>generate-resources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${project.parent.basedir}/exclude-files.sh</executable>
<commandlineArgs>${project.basedir}/dependency-excludes.txt
${project.build.directory}/${project.artifactId}-${project.version}</commandlineArgs>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<!-- Override with local files into the target folder -->
<id>Copy local resources</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${project.parent.basedir}/configs</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- Packaging the distro as a installable/deployable file -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>Package distro</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>${project.basedir}/assembly.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

<build>
<plugins>
<!-- Copy the Ozone resources in a temporary folder -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<id>Unpack Ozone</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<excludeTransitive>true</excludeTransitive>
<useBaseVersion>true</useBaseVersion>
<outputDirectory>${project.build.directory}/ozone</outputDirectory>
<includeArtifactIds>ozone</includeArtifactIds>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<!-- Override with local config files-->
<id>Copy local configs</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.directory}/${project.artifactId}-${project.version}/distro/configs</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${project.parent.basedir}/configs</directory>
</resource>
</resources>
</configuration>
</execution>
<execution>
<!-- Exclude files from Ozone -->
<id>Exclude some Ozone files</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.directory}/${project.artifactId}-${project.version}</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${project.build.directory}/ozone</directory>
<excludes>
<exclude>distro/**/appointment*</exclude>
<exclude>distro/**/concepts*demo.csv</exclude>
<exclude>distro/**/encountertypes*demo.csv</exclude>
<exclude>distro/**/personattributetypes*demo.csv</exclude>
<exclude>distro/**/privileges*demo.csv</exclude>
<exclude>distro/**/program*</exclude>
<exclude>distro/**/roles*demo.csv</exclude>
<exclude>distro/**/ampathforms/*.json</exclude>
<exclude>distro/**/ampathformstranslations/*.json</exclude>
<exclude>distro/**/*demo.csv</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- Packaging the package as a zip -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>Package distro</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>${project.basedir}/assembly.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
40 changes: 0 additions & 40 deletions configs/openmrs_config/demo-users/app.js

This file was deleted.

12 changes: 0 additions & 12 deletions configs/openmrs_config/demo-users/create-demo-users.sh

This file was deleted.

Loading

0 comments on commit 07002e7

Please sign in to comment.