Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/maven-settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@
<name>Mekom Repository</name>
<url>https://nexus.mekomsolutions.net/repository/maven-public</url>
</repository>
<repository>
<id>sonatype-central-snapshots</id>
<name>Sonatype Central Snapshots</name>
<url>https://central.sonatype.com/repository/maven-snapshots</url>
</repository>
<repository>
<id>sonatype-nexus</id>
<name>Sonatype Nexus Repository</name>
<url>https://oss.sonatype.org/content/repositories/releases/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/standalone-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
- name: Verify Docker Compose installation
run: docker compose version

- name: Pre-run OpenMRS SDK Plugin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we now need this in the standalone but not in the SDK?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the Standalone build uses the SDK Maven plugin to generate and build the distro, it needs a pre-configured SDK environment — which the local machine already has but CI doesn’t. The SDK project itself just builds the tool, so it doesn’t require that setup to compile.

run: mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:setup-sdk -B --settings .github/maven-settings.xml

- name: Run Maven Clean
run: mvn clean --settings .github/maven-settings.xml

Expand All @@ -55,6 +58,9 @@ jobs:
java-version: '21'
distribution: 'temurin'

- name: Pre-run OpenMRS SDK Plugin
run: mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:setup-sdk -B --settings .github/maven-settings.xml

- name: Run Maven Clean
run: mvn clean --settings .github/maven-settings.xml

Expand All @@ -74,6 +80,9 @@ jobs:
java-version: '21'
distribution: 'temurin'

- name: Pre-run OpenMRS SDK Plugin
run: mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:setup-sdk -B --settings .github/maven-settings.xml

- name: Run Maven Clean
run: mvn clean --settings .github/maven-settings.xml

Expand Down
45 changes: 42 additions & 3 deletions pom-step-01.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,53 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>create-directories</id>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<mkdir dir="${project.build.directory}/openmrs3x"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.openmrs.maven.plugins</groupId>
<artifactId>openmrs-sdk-maven-plugin</artifactId>
<version>6.4.0</version>
<version>${openmrs.sdk.version}</version>
<executions>
<execution>
<id>build-distro</id>
<id>openmrs-sdk:generate-distro</id>
<phase>generate-resources</phase>
<goals>
<goal>generate-distro</goal>
</goals>
<configuration>
<outputLocation>${project.build.directory}/openmrs3x</outputLocation>
<batchAnswers>
<batchAnswer>Reference Application 3.x</batchAnswer>
<batchAnswer>${refapp.version}</batchAnswer>
</batchAnswers>
<testMode>true</testMode>
</configuration>
</execution>
<execution>
<id>openmrs-sdk:build-distro</id>
<goals>
<goal>build-distro</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<distro>referenceapplication:${refapp.version}</distro>
<distro>${project.build.directory}/openmrs3x/openmrs-distro.properties</distro>
<dir>${project.build.directory}/distro</dir>
</configuration>
</execution>
Expand Down Expand Up @@ -144,6 +178,11 @@
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.openmrs.maven.plugins</groupId>
<artifactId>openmrs-sdk-maven-plugin</artifactId>
<version>${openmrs.sdk.version}</version>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@

<tomcat.version>9.0.106</tomcat.version>
<openmrs.version>2.7.4</openmrs.version>
<refapp.version>3.4.0</refapp.version>
<refapp.version>3.6.0-SNAPSHOT</refapp.version>
<mariadb4jVersion>3.2.0</mariadb4jVersion>
<junitVersion>5.12.2</junitVersion>
<mockitoVersion>3.12.4</mockitoVersion>
<openmrs.sdk.version>6.5.0</openmrs.sdk.version>
</properties>

<dependencies>
Expand Down
Loading