-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OZ-196: Provide parent POMs to ease inheritance in child distros (#32)
- Loading branch information
Showing
5 changed files
with
376 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,225 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.ozonehis</groupId> | ||
<artifactId>ozone-parent</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<relativePath>../ozone-parent</relativePath> | ||
</parent> | ||
|
||
<groupId>com.ozonehis</groupId> | ||
<artifactId>ozone-distro-parent</artifactId> | ||
<name>Ozone Distribution Parent</name> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<packaging>pom</packaging> | ||
<description>Parent project for Ozone distributions</description> | ||
|
||
<organization> | ||
<name>Ozone HIS</name> | ||
<url>https://www.ozone-his.com</url> | ||
</organization> | ||
|
||
<developers> | ||
<developer> | ||
<name>Mekom Solutions</name> | ||
<url>https://www.mekomsolutions.com</url> | ||
</developer> | ||
</developers> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<ozone.version>1.0.0-SNAPSHOT</ozone.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.ozonehis</groupId> | ||
<artifactId>ozone</artifactId> | ||
<type>zip</type> | ||
<version>${ozone.version}</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<!-- Unpack Ozone zip --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>Unpack Ozone</id> | ||
<phase>generate-resources</phase> | ||
<goals> | ||
<goal>unpack-dependencies</goal> | ||
</goals> | ||
<configuration> | ||
<excludeTransitive>true</excludeTransitive> | ||
<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> | ||
<executions> | ||
<execution> | ||
<!-- Copy and substitute some helper files (for demo and Gitpod) --> | ||
<id>Copy and substitute some helper files</id> | ||
<phase>process-resources</phase> | ||
<goals> | ||
<goal>copy-resources</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory>${project.build.directory}/</outputDirectory> | ||
<overwrite>true</overwrite> | ||
<resources> | ||
<resource> | ||
<directory>${project.basedir}/.mvn</directory> | ||
<filtering>false</filtering> | ||
</resource> | ||
<resource> | ||
<directory>${project.basedir}</directory> | ||
<includes> | ||
<include>mvnw</include> | ||
<include>mvnw.cmd</include> | ||
</includes> | ||
<filtering>false</filtering> | ||
</resource> | ||
<resource> | ||
<directory>${project.basedir}/scripts</directory> | ||
<filtering>false</filtering> | ||
</resource> | ||
<resource> | ||
<directory>${project.basedir}/scripts</directory> | ||
<includes> | ||
<include>*.sh</include> | ||
</includes> | ||
<excludes> | ||
<exclude>start-ozone.sh</exclude> | ||
</excludes> | ||
<filtering>true</filtering> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
|
||
<execution> | ||
<!-- Copy the docker-compose-files.txt file to set the services to run --> | ||
<id>Copy docker-compose-files.txt</id> | ||
<phase>prepare-package</phase> | ||
<goals> | ||
<goal>copy-resources</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory> | ||
${project.build.directory}/${project.artifactId}-${project.version}/run/docker/scripts</outputDirectory> | ||
<overwrite>true</overwrite> | ||
<resources> | ||
<resource> | ||
<directory>${project.basedir}/scripts</directory> | ||
<includes> | ||
<include>docker-compose-files.txt</include> | ||
<include>start-ozone.sh</include> | ||
</includes> | ||
<filtering>true</filtering> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
|
||
<execution> | ||
<!-- Override with local config files--> | ||
<id>Copy local resources</id> | ||
<phase>process-resources</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> | ||
<excludes> | ||
<exclude>.gitkeep</exclude> | ||
</excludes> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
|
||
<execution> | ||
<!-- Exclude files from Ozone --> | ||
<id>Exclude unneeded 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/**/addresshierarchy/*.*</exclude> | ||
<exclude>distro/**/ampathforms/*.json</exclude> | ||
<exclude>distro/**/ampathformstranslations/*.json</exclude> | ||
<exclude>distro/**/globalproperties/i18n.xml</exclude> | ||
<exclude>distro/**/*demo.*</exclude> | ||
</excludes> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<profiles> | ||
<profile> | ||
<id>validator</id> | ||
<activation> | ||
<property> | ||
<name>env.CI</name> | ||
<value>true</value> | ||
</property> | ||
</activation> | ||
<build> | ||
<plugins> | ||
|
||
<!-- hooking the OpenMRS config validation to the integration-test phase --> | ||
<plugin> | ||
<groupId>org.openmrs.maven.plugins</groupId> | ||
<artifactId>openmrs-packager-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>Validate OpenMRS configuration</id> | ||
<phase>integration-test</phase> | ||
<goals> | ||
<goal>validate-configurations</goal> | ||
</goals> | ||
<configuration> | ||
<sourceDir>${project.build.directory}/${project.artifactId}-${project.version}/distro/configs/openmrs/initializer_config</sourceDir> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
|
||
</project> |
Oops, something went wrong.