Skip to content

Commit 3f276c0

Browse files
authored
Initial commit
0 parents  commit 3f276c0

File tree

8 files changed

+298
-0
lines changed

8 files changed

+298
-0
lines changed

.github/workflows/main.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build with Maven
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
strategy:
13+
matrix:
14+
platform: [ ubuntu-latest ]
15+
java-version: [ 8 ]
16+
17+
runs-on: ${{ matrix.platform }}
18+
env:
19+
PLATFORM: ${{ matrix.platform }}
20+
JAVA_VERSION: ${{ matrix.java-version }}
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Set up JDK
25+
uses: actions/setup-java@v4
26+
with:
27+
distribution: 'temurin'
28+
java-version: ${{ matrix.java-version }}
29+
- name: Build with Maven
30+
id: build_with_maven
31+
run: |
32+
mvn clean verify --batch-mode --file pom.xml

.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
target/
2+
!.mvn/wrapper/maven-wrapper.jar
3+
!**/src/main/**/target/
4+
!**/src/test/**/target/
5+
6+
### IntelliJ IDEA ###
7+
.idea/
8+
*.iws
9+
*.iml
10+
*.ipr
11+
12+
### Eclipse ###
13+
.apt_generated
14+
.classpath
15+
.factorypath
16+
.project
17+
.settings
18+
.springBeans
19+
.sts4-cache
20+
21+
### NetBeans ###
22+
/nbproject/private/
23+
/nbbuild/
24+
/dist/
25+
/nbdist/
26+
/.nb-gradle/
27+
build/
28+
!**/src/main/**/build/
29+
!**/src/test/**/build/
30+
31+
### VS Code ###
32+
.vscode/
33+
34+
### Mac OS ###
35+
.DS_Store

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# <u>Content Package Template</u>
2+
3+
This is a template repo to be used to set up and share Content Packages.
4+
5+
The contents of a typical Content Package are:
6+
* **Configuration**
7+
* This folder holds [Initializer compatible configuration metadata]([url](https://github.com/mekomsolutions/openmrs-module-initializer/blob/main/README.md)) that make up the content package. For example, in the /config directory, this includes:
8+
* **Forms** (in /ampathforms)
9+
* **Concepts** (in [/ocl]([url](https://github.com/mekomsolutions/openmrs-module-initializer/blob/main/README.md#:~:text=Open%20Concept%20Lab%20(ZIP%20Files))), [/concepts]([url](https://github.com/mekomsolutions/openmrs-module-initializer/blob/main/readme/concepts.md)))
10+
* **Programmatic Metadata** such as:
11+
* Programs (in [/programs]([url](https://github.com/mekomsolutions/openmrs-module-initializer/blob/main/readme/prog.md)))
12+
* Encounter types (in [/encountertypes]([url](https://github.com/mekomsolutions/openmrs-module-initializer/blob/main/readme/et.md)))
13+
* Workflows (in [/programworkflows]([url](https://github.com/mekomsolutions/openmrs-module-initializer/blob/main/readme/prog.md)))
14+
* Identifiers and other metadata
15+
* **content.properties File**
16+
* Contents: This file specifies the required ESMs and OMODs (frontend modules and backend modules) that make up the Content Package.
17+
* Importance:
18+
* The content.properties file is important because when Implementers add this Content Package to their distribution, the content.properties file will automatically be read and compared with their exitisting distro.properties file.
19+
* An automatic distro Build Helper Tool then fetches the content package's information and extracts the content into the Implementation's distro.properties file.
20+
* **Dependencies** are especially important here, as the Build Helper Tool will add any dependencies from the Content Package into an Implementation's distro.properties file.

assembly.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<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
2+
http://maven.apache.org/xsd/assembly-1.1.3.xsd">
3+
<id>assemble-content</id>
4+
<formats>
5+
<format>zip</format>
6+
</formats>
7+
<includeBaseDirectory>false</includeBaseDirectory>
8+
<fileSets>
9+
<fileSet>
10+
<directory>${project.build.directory}</directory>
11+
<includes>
12+
<include>content.properties</include>
13+
</includes>
14+
<outputDirectory>/</outputDirectory>
15+
</fileSet>
16+
<fileSet>
17+
<directory>${project.basedir}/configuration</directory>
18+
<includes>
19+
<include>**/*</include>
20+
</includes>
21+
</fileSet>
22+
</fileSets>
23+
</assembly>

configuration/backend_configuration/.gitkeep

Whitespace-only changes.

configuration/frontend_configuration/.gitkeep

Whitespace-only changes.

content.properties

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# content.properties - Metadata for the content package and its dependencies
2+
3+
# The name of this content package
4+
name=${project.artifactId}
5+
6+
# The version of this content package (must follow SemVer)
7+
version=${project.version}
8+
9+
# include any frontend or backend dependencies here, e.g.,
10+
# omod.webservices.rest = >= 2.44
11+
# spa.frontendModules.@openmrs/esm-generic-patient-widgets-app = 7.x
12+
# omod.events = ^2
13+
# omod.events.groupId = org.openmrs

pom.xml

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
<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">
2+
<modelVersion>4.0.0</modelVersion>
3+
<groupId>org.openmrs.content</groupId>
4+
<artifactId>content-package</artifactId>
5+
<version>1.0.0-SNAPSHOT</version>
6+
<name></name>
7+
<packaging>pom</packaging>
8+
<developers>
9+
<developer>
10+
<name>OpenMRS</name>
11+
<organization>OpenMRS</organization>
12+
<organizationUrl>http://openmrs.org</organizationUrl>
13+
</developer>
14+
</developers>
15+
<scm>
16+
<connection>scm:git:[email protected]:openmrs/openmrs-content-hiv.git</connection>
17+
<developerConnection>scm:git:[email protected]:openmrs/openmrs-content-hiv.git</developerConnection>
18+
<url>https://github.com/openmrs/openmrs-content-hiv.git</url>
19+
</scm>
20+
<properties>
21+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
22+
<configuration.dir>${project.basedir}/configuration</configuration.dir>
23+
</properties>
24+
<build>
25+
<plugins>
26+
<plugin>
27+
<groupId>org.openmrs.maven.plugins</groupId>
28+
<artifactId>openmrs-packager-maven-plugin</artifactId>
29+
<version>1.9.0-SNAPSHOT</version>
30+
<executions>
31+
<execution>
32+
<id>validate-content-package</id>
33+
<phase>verify</phase>
34+
<goals>
35+
<goal>validate-content-package</goal>
36+
</goals>
37+
<configuration>
38+
<sourceFile>${project.basedir}/content.properties</sourceFile>
39+
</configuration>
40+
</execution>
41+
<!-- Commented out for now
42+
<execution>
43+
<id>validate-configurations</id>
44+
<phase>verify</phase>
45+
<goals>
46+
<goal>validate-configurations</goal>
47+
</goals>
48+
<configuration>
49+
<sourceDir>${configuration.dir}/backend_configuration</sourceDir>
50+
</configuration>
51+
</execution>
52+
-->
53+
</executions>
54+
</plugin>
55+
<plugin>
56+
<groupId>org.apache.maven.plugins</groupId>
57+
<artifactId>maven-assembly-plugin</artifactId>
58+
<version>3.7.1</version>
59+
<executions>
60+
<execution>
61+
<id>make-assembly</id>
62+
<phase>package</phase>
63+
<goals>
64+
<goal>single</goal>
65+
</goals>
66+
<configuration>
67+
<descriptors>
68+
<descriptor>${project.basedir}/assembly.xml</descriptor>
69+
</descriptors>
70+
<!-- Setting appendAssemblyId to false ensures that the assembly ID
71+
is not appended to the final name of the assembled artifact -->
72+
<appendAssemblyId>false</appendAssemblyId>
73+
<finalName>${project.artifactId}-${project.version}</finalName>
74+
</configuration>
75+
</execution>
76+
</executions>
77+
</plugin>
78+
<plugin>
79+
<groupId>org.apache.maven.plugins</groupId>
80+
<artifactId>maven-release-plugin</artifactId>
81+
<version>3.1.1</version>
82+
<configuration>
83+
<autoVersionSubmodules>true</autoVersionSubmodules>
84+
<useReleaseProfile>false</useReleaseProfile>
85+
<releaseProfiles>release</releaseProfiles>
86+
<preparationGoals>clean install</preparationGoals>
87+
<goals>deploy</goals>
88+
<tagNameFormat>@{project.version}</tagNameFormat>
89+
</configuration>
90+
</plugin>
91+
<plugin>
92+
<groupId>org.apache.maven.plugins</groupId>
93+
<artifactId>maven-resources-plugin</artifactId>
94+
<version>3.3.1</version>
95+
<executions>
96+
<execution>
97+
<id>copy-resources</id>
98+
<phase>process-resources</phase>
99+
<goals>
100+
<goal>resources</goal>
101+
</goals>
102+
<configuration>
103+
<outputDirectory>${project.build.directory}</outputDirectory>
104+
<resources>
105+
<resource>
106+
<directory>${project.basedir}</directory>
107+
<includes>
108+
<include>content.properties</include>
109+
</includes>
110+
<filtering>true</filtering>
111+
</resource>
112+
</resources>
113+
</configuration>
114+
</execution>
115+
</executions>
116+
</plugin>
117+
</plugins>
118+
</build>
119+
<repositories>
120+
<repository>
121+
<id>openmrs-repo</id>
122+
<name>OpenMRS Public Repository</name>
123+
<url>https://mavenrepo.openmrs.org/public</url>
124+
<snapshots>
125+
<enabled>false</enabled>
126+
</snapshots>
127+
</repository>
128+
<repository>
129+
<id>openmrs-snapshots</id>
130+
<name>OpenMRS Snapshot Repository</name>
131+
<url>https://mavenrepo.openmrs.org/snapshots</url>
132+
<snapshots>
133+
<enabled>true</enabled>
134+
</snapshots>
135+
</repository>
136+
<repository>
137+
<id>central</id>
138+
<name>Maven Repository Switchboard</name>
139+
<url>https://repo1.maven.org/maven2</url>
140+
</repository>
141+
</repositories>
142+
<pluginRepositories>
143+
<pluginRepository>
144+
<id>openmrs-releases</id>
145+
<name>OpenMRS Public</name>
146+
<url>https://mavenrepo.openmrs.org/public</url>
147+
<snapshots>
148+
<enabled>false</enabled>
149+
</snapshots>
150+
</pluginRepository>
151+
<pluginRepository>
152+
<id>openmrs-snapshots</id>
153+
<name>OpenMRS Snapshots</name>
154+
<url>https://mavenrepo.openmrs.org/snapshots</url>
155+
<releases>
156+
<enabled>false</enabled>
157+
</releases>
158+
<snapshots>
159+
<enabled>true</enabled>
160+
</snapshots>
161+
</pluginRepository>
162+
</pluginRepositories>
163+
<distributionManagement>
164+
<repository>
165+
<id>openmrs-repo-modules</id>
166+
<name>OpenMRS Nexus Modules</name>
167+
<url>http://mavenrepo.openmrs.org/releases</url>
168+
</repository>
169+
<snapshotRepository>
170+
<id>openmrs-repo-snapshots</id>
171+
<name>OpenMRS Nexus Snapshots</name>
172+
<url>http://mavenrepo.openmrs.org/nexus/content/repositories/snapshots</url>
173+
</snapshotRepository>
174+
</distributionManagement>
175+
</project>

0 commit comments

Comments
 (0)