Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

O3-3511: Content package to create zip file #1

Merged
merged 15 commits into from
Aug 15, 2024
Merged
23 changes: 23 additions & 0 deletions assembly.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3
http://maven.apache.org/xsd/assembly-1.1.3.xsd">
<id>assemble-content</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${project.build.directory}</directory>
<includes>
<include>content.properties</include>
</includes>
<outputDirectory>/</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.basedir}/configs</directory>
<includes>
<include>**/*</include>
</includes>
</fileSet>
</fileSets>
</assembly>
1 change: 1 addition & 0 deletions configs/frontend_config/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
16 changes: 8 additions & 8 deletions content.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#name=Ref 3.x distro
#version=3.0.0
#war.openmrs=2.6.1-SNAPSHOT
omod.fhir2=1.9.0
omod.webservices.rest=2.40.0-SNAPSHOT
spa.frontendModules.@ohri/openmrs-esm-ohri-hiv-care-treatment-app=latest
spa.frontendModules.@ohri/openmrs-esm-ohri-core-app=latest
#spa.frontendModules.@openmrs/esm-primary-navigation-app=next
# content.properties - Metadata for the content package and its dependencies

# The name of this content package
name=${project.artifactId}

# The version of this content package (must follow SemVer)
version=${project.version}

183 changes: 176 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,177 @@
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.openmrs.content</groupId>
<artifactId>openmrs-content-hiv</artifactId>
<version>1.0-SNAPSHOT</version>
<name>OpenMRS HIV Content Package</name>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.openmrs.content</groupId>
<artifactId>hiv</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>OpenMRS HIV Content Package</name>
<packaging>pom</packaging>

<developers>
<developer>
<name>OpenMRS</name>
<organization>OpenMRS</organization>
<organizationUrl>http://openmrs.org</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:git@github.com:openmrs/openmrs-content-hiv.git</connection>
<developerConnection>scm:git:git@github.com:openmrs/openmrs-content-hiv.git</developerConnection>
<url>https://github.com/openmrs/openmrs-content-hiv.git</url>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.7.1</version>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${project.basedir}/assembly.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
<finalName>${project.artifactId}-${project.version}</finalName>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
<releaseProfiles>release</releaseProfiles>
<preparationGoals>clean install</preparationGoals>
<goals>deploy</goals>
<tagNameFormat>@{project.version}</tagNameFormat>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>process-resources</phase>
<goals>
<goal>resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}</directory>
<includes>
<include>content.properties</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>openmrs-repo</id>
<name>OpenMRS Nexus Repository</name>
<url>https://openmrs.jfrog.io/artifactory/releases</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<distributionManagement>
<repository>
<id>openmrs-repo-modules</id>
<name>OpenMRS Nexus Modules</name>
<url>https://mavenrepo.openmrs.org/releases</url>
</repository>
<snapshotRepository>
<id>openmrs-repo-snapshots</id>
<name>OpenMRS Nexus Snapshots</name>
<url>https://mavenrepo.openmrs.org/snapshots</url>
</snapshotRepository>
</distributionManagement>

<!-- Profiles for execution control -->
<profiles>
<profile>
<id>default-profile</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.openmrs.maven.plugins</groupId>
<artifactId>openmrs-packager-maven-plugin</artifactId>
<version>1.8.0</version>
<executions>
<execution>
<id>validate-content-package</id>
<phase>verify</phase>
<goals>
<goal>validate-content-package</goal>
</goals>
<configuration>
<sourceFile>${project.basedir}/content.properties</sourceFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<!-- Profile to exclude validate-configurations -->
<profile>
<id>include-validate-configurations</id>
<build>
<plugins>
<plugin>
<groupId>org.openmrs.maven.plugins</groupId>
<artifactId>openmrs-packager-maven-plugin</artifactId>
<version>1.8.0</version>
<executions>
<execution>
<id>validate-content-package</id>
<phase>verify</phase>
<goals>
<goal>validate-content-package</goal>
</goals>
<configuration>
<sourceFile>${project.basedir}/content.properties</sourceFile>
</configuration>
</execution>
<execution>
<id>validate-configurations</id>
<phase>verify</phase>
<goals>
<goal>validate-configurations</goal>
</goals>
<configuration>
<sourceDir>${project.basedir}/configs/backend_config</sourceDir>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>