diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index b92a7acf6a..df6445a783 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -14,7 +14,6 @@ jobs:
matrix:
platform: [ ubuntu-latest ]
java-version: [ 8 ]
- profile: [ 1.10, 1.11, 1.12, 2.0, 2.1, 2.2, 2.3, 2.4 ]
runs-on: ${{ matrix.platform }}
env:
@@ -36,5 +35,5 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
- run: mvn clean install -P ${{ matrix.profile }} --batch-mode --show-version --file pom.xml
+ run: mvn clean install --batch-mode --show-version --file pom.xml
diff --git a/api-1.10/.gitignore b/api-1.10/.gitignore
deleted file mode 100644
index c277ec4914..0000000000
--- a/api-1.10/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-/.settings
-/.classpath
-/.project
-/target
diff --git a/api-1.10/pom.xml b/api-1.10/pom.xml
deleted file mode 100644
index bdab2db9ee..0000000000
--- a/api-1.10/pom.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-
- 4.0.0
-
-
- org.openmrs.module
- reporting
- 1.28.0-SNAPSHOT
-
-
- reporting-api-1.10
- jar
- reporting Module api 1.10
- 1.10 api project for reporting
-
-
- 1.10.6
-
-
-
-
- ${project.parent.groupId}
- ${project.parent.artifactId}-api
- ${project.parent.version}
- provided
-
-
-
- ${project.parent.groupId}
- ${project.parent.artifactId}-api-tests
- ${project.parent.version}
- test-jar
- test
-
-
-
- org.openmrs.api
- openmrs-api
- ${openMRSVersion}
- provided
-
-
-
- org.openmrs.api
- openmrs-api
- test-jar
- ${openMRSVersion}
- test
-
-
-
- org.openmrs.test
- openmrs-test
- ${openMRSVersion}
- pom
- test
-
-
-
-
-
-
-
- src/main/resources
- true
-
-
-
-
-
- src/test/resources
-
- **/*.properties
- **/*.xml
-
- true
-
-
- src/test/resources
-
- **/*.properties
- **/*.xml
-
- false
-
-
-
-
-
diff --git a/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10.java b/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10.java
deleted file mode 100644
index 6efb85e780..0000000000
--- a/api-1.10/src/main/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * This Source Code Form is subject to the terms of the Mozilla Public License,
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
- * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
- * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
- *
- * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
- * graphic logo is a trademark of OpenMRS Inc.
- */
-package org.openmrs.module.reporting.cohort.definition.library;
-
-import org.openmrs.Concept;
-import org.openmrs.CareSetting;
-import org.openmrs.Drug;
-import org.openmrs.module.reporting.common.Match;
-import org.openmrs.module.reporting.cohort.definition.CohortDefinition;
-import org.openmrs.module.reporting.cohort.definition.DrugOrderCohortDefinition;
-import org.openmrs.module.reporting.cohort.definition.library.BuiltInCohortDefinitionLibrary;
-import org.openmrs.module.reporting.definition.library.DocumentedDefinition;
-import org.openmrs.module.reporting.evaluation.parameter.Parameter;
-import org.springframework.stereotype.Component;
-
-import java.util.Date;
-import java.util.List;
-
-/**
- * Basic set of cohort definitions
- */
-@Component
-public class BuiltInCohortDefinitionLibrary1_10 extends BuiltInCohortDefinitionLibrary {
-
-
-
- @DocumentedDefinition("drugOrderSearch")
- public CohortDefinition getDrugOrderSearch() {
- CohortDefinition drugOrderCohortDefinition = new DrugOrderCohortDefinition();
- drugOrderCohortDefinition.addParameter(new Parameter("which", "reporting.parameter.which", Match.class));
- drugOrderCohortDefinition.addParameter(new Parameter("drugConcepts", "reporting.parameter.drugConcepts", Concept.class, List.class, null));
- drugOrderCohortDefinition.addParameter(new Parameter("drugSets", "reporting.parameter.drugSets", Concept.class, List.class, null));
- drugOrderCohortDefinition.addParameter(new Parameter("activatedOnOrBefore", "reporting.parameter.activatedOnOrBefore", Date.class));
- drugOrderCohortDefinition.addParameter(new Parameter("activatedOnOrAfter", "reporting.parameter.activatedOnOrAfter", Date.class));
- drugOrderCohortDefinition.addParameter(new Parameter("activeOnOrBefore", "reporting.parameter.activeOnOrBefore", Date.class));
- drugOrderCohortDefinition.addParameter(new Parameter("activeOnOrAfter", "reporting.parameter.activeOnOrAfter", Date.class));
- drugOrderCohortDefinition.addParameter(new Parameter("activeOnDate", "reporting.parameter.activeOnDate", Date.class));
- drugOrderCohortDefinition.addParameter(new Parameter("careSetting", "reporting.parameter.careSetting", CareSetting.class));
- drugOrderCohortDefinition.addParameter(new Parameter("drugs", "reporting.parameter.drugs", Drug.class, List.class, null));
- return drugOrderCohortDefinition;
- }
-}
diff --git a/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10Test.java b/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10Test.java
deleted file mode 100644
index f975d8e06e..0000000000
--- a/api-1.10/src/test/java/org/openmrs/module/reporting/cohort/definition/library/BuiltInCohortDefinitionLibrary1_10Test.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * This Source Code Form is subject to the terms of the Mozilla Public License,
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
- * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
- * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
- *
- * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
- * graphic logo is a trademark of OpenMRS Inc.
- */
-package org.openmrs.module.reporting.cohort.definition.library;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.openmrs.CareSetting;
-import org.openmrs.Concept;
-import org.openmrs.Drug;
-import org.openmrs.module.reporting.common.Match;
-import org.openmrs.module.reporting.cohort.definition.CohortDefinition;
-import org.openmrs.module.reporting.cohort.definition.DrugOrderCohortDefinition;
-
-import java.util.Date;
-import java.util.List;
-
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-import static org.openmrs.module.reporting.common.ReportingMatchers.hasParameter;
-
-/**
- *
- */
-public class BuiltInCohortDefinitionLibrary1_10Test {
-
- private BuiltInCohortDefinitionLibrary1_10 library;
-
- @Before
- public void setUp() throws Exception {
- library = new BuiltInCohortDefinitionLibrary1_10();
- }
-
- @Test
- public void testgetDrugOrderSearch() throws Exception {
- CohortDefinition drugOrderCohortDefinition = library.getDrugOrderSearch();
- assertTrue(DrugOrderCohortDefinition.class.isAssignableFrom(drugOrderCohortDefinition.getClass()));
- assertThat(drugOrderCohortDefinition, hasParameter("which", Match.class));
- assertThat(drugOrderCohortDefinition, hasParameter("drugConcepts", Concept.class, List.class));
- assertThat(drugOrderCohortDefinition, hasParameter("drugSets", Concept.class, List.class));
- assertThat(drugOrderCohortDefinition, hasParameter("activatedOnOrBefore", Date.class));
- assertThat(drugOrderCohortDefinition, hasParameter("activatedOnOrAfter", Date.class));
- assertThat(drugOrderCohortDefinition, hasParameter("activeOnOrBefore", Date.class));
- assertThat(drugOrderCohortDefinition, hasParameter("activeOnOrAfter", Date.class));
- assertThat(drugOrderCohortDefinition, hasParameter("activeOnDate", Date.class));
- assertThat(drugOrderCohortDefinition, hasParameter("careSetting", CareSetting.class));
- assertThat(drugOrderCohortDefinition, hasParameter("drugs", Drug.class, List.class));
- }
-
-}
diff --git a/api-1.9/.gitignore b/api-1.9/.gitignore
deleted file mode 100644
index b83d22266a..0000000000
--- a/api-1.9/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/target/
diff --git a/api-1.9/pom.xml b/api-1.9/pom.xml
deleted file mode 100644
index f9f4b777f7..0000000000
--- a/api-1.9/pom.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-
- 4.0.0
-
-
- org.openmrs.module
- reporting
- 1.28.0-SNAPSHOT
-
-
- reporting-api-1.9
- jar
- reporting Module api 1.9
- 1.9 api project for reporting
-
-
- 1.9.9
-
-
-
-
- ${project.parent.groupId}
- ${project.parent.artifactId}-api
- ${project.parent.version}
- provided
-
-
-
- org.openmrs.api
- openmrs-api
- ${openMRSVersion}
- provided
-
-
-
- org.openmrs.api
- openmrs-api
- test-jar
- ${openMRSVersion}
- test
-
-
-
- org.openmrs.test
- openmrs-test
- ${openMRSVersion}
- pom
- test
-
-
-
-
-
-
-
- src/main/resources
- true
-
-
-
-
-
- src/test/resources
-
- **/*.properties
- **/*.xml
-
- true
-
-
- src/test/resources
-
- **/*.properties
- **/*.xml
-
- false
-
-
-
-
-
\ No newline at end of file
diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java
deleted file mode 100644
index 7a214dd25f..0000000000
--- a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/**
- * This Source Code Form is subject to the terms of the Mozilla Public License,
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
- * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
- * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
- *
- * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
- * graphic logo is a trademark of OpenMRS Inc.
- */
-package org.openmrs.module.reporting.report.service.db;
-
-import java.io.Serializable;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-import org.apache.commons.lang.StringUtils;
-import org.hibernate.Hibernate;
-import org.hibernate.HibernateException;
-import org.hibernate.engine.SessionImplementor;
-import org.hibernate.type.Type;
-import org.hibernate.usertype.CompositeUserType;
-import org.hibernate.usertype.ParameterizedType;
-import org.hibernate.usertype.UserType;
-import org.openmrs.api.context.Context;
-import org.openmrs.module.reporting.common.HibernateUtil;
-import org.openmrs.module.reporting.definition.DefinitionContext;
-import org.openmrs.module.reporting.evaluation.Definition;
-import org.openmrs.module.reporting.evaluation.parameter.Mapped;
-import org.openmrs.module.reporting.evaluation.parameter.Parameterizable;
-import org.openmrs.module.reporting.serializer.ReportingSerializer;
-
-/**
- * Custom User-Type for storing Mapped objects in a single table within 2 columns
- * This type takes in 2 properties and 1 parameter in the form:
- *
- *
- *
- *
- *
- * org.openmrs.module.reporting.report.definition.ReportDefinition
- *
- *
- *
- */
-@SuppressWarnings({"rawtypes", "unchecked"})
-public class MappedDefinitionType implements CompositeUserType, ParameterizedType {
-
- /**
- * Property via ParameterizedType for storing the type of the Mapped Parameterizable
- */
- private Class extends Definition> mappedType;
-
- /**
- * @see CompositeUserType#returnedClass()
- */
- public Class returnedClass() {
- return Mapped.class;
- }
-
- /**
- * @see CompositeUserType#getPropertyNames()
- */
- public String[] getPropertyNames() {
- return new String[] {"definition", "parameterMappings"};
- }
-
- /**
- * @see CompositeUserType#getPropertyTypes()
- */
- public Type[] getPropertyTypes() {
- return new Type[] { HibernateUtil.standardType("STRING"), HibernateUtil.standardType("TEXT") };
- }
-
- /**
- * @see CompositeUserType#isMutable()
- */
- public boolean isMutable() {
- return true;
- }
-
- /**
- * @see CompositeUserType#getPropertyValue(java.lang.Object, int)
- */
- public Object getPropertyValue(Object component, int property) throws HibernateException {
- Mapped m = (Mapped) component;
- return (property == 0 ? m.getParameterizable() : m.getParameterMappings());
- }
-
- /**
- * @see CompositeUserType#setPropertyValue(java.lang.Object, int, java.lang.Object)
- */
- public void setPropertyValue(Object component, int property, Object value) throws HibernateException {
- Mapped m = (Mapped) component;
- if (property == 0) {
- m.setParameterizable((Parameterizable)value);
- }
- else {
- m.setParameterMappings((Map)value);
- }
- }
-
- /**
- * @see CompositeUserType#deepCopy(java.lang.Object)
- */
- public Object deepCopy(Object value) throws HibernateException {
- if (value == null) return null;
- Mapped toCopy = (Mapped) value;
- Mapped m = new Mapped();
- m.setParameterizable(toCopy.getParameterizable());
- m.setParameterMappings(new HashMap(toCopy.getParameterMappings()));
- return m;
- }
-
- /**
- * @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object)
- */
- public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException {
- String parameterizableUuid = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[0], session, owner);
- if (StringUtils.isEmpty(parameterizableUuid)) { return null; }
- String serializedMappings = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner);
- Definition d = DefinitionContext.getDefinitionByUuid(mappedType, parameterizableUuid);
- Map mappings = new HashMap();
- if (StringUtils.isNotBlank(serializedMappings)) {
- try {
- mappings = Context.getSerializationService().deserialize(serializedMappings, Map.class, ReportingSerializer.class);
- }
- catch (Exception e) {
- throw new HibernateException("Unable to deserialize parameter mappings for definition", e);
- }
- }
- return new Mapped(d, mappings);
- }
-
- /**
- * @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor)
- */
- public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException {
- String definitionUuid = null;
- String serializedMappings = null;
- if (value != null) {
- Mapped m = (Mapped) value;
- if (m.getParameterizable() != null) {
- definitionUuid = m.getParameterizable().getUuid();
- if (m.getParameterMappings() != null && !m.getParameterMappings().isEmpty()) {
- try {
- serializedMappings = Context.getSerializationService().serialize(m.getParameterMappings(), ReportingSerializer.class);
- }
- catch (Exception e) {
- throw new HibernateException("Unable to serialize mappings for definition", e);
- }
- }
- }
- }
- HibernateUtil.standardType("STRING").nullSafeSet(st, definitionUuid, index, session);
- HibernateUtil.standardType("STRING").nullSafeSet(st, serializedMappings, index+1, session);
- }
-
- /**
- * @see CompositeUserType#replace(Object, Object, SessionImplementor, Object)
- */
- public Object replace(Object original, Object target, SessionImplementor session, Object owner) throws HibernateException {
- return original;
- }
-
- /**
- * @see UserType#equals(Object, Object)
- */
- public boolean equals(Object x, Object y) throws HibernateException {
- return x != null && x.equals(y);
- }
-
- /**
- * @see UserType#hashCode(Object)
- */
- public int hashCode(Object x) throws HibernateException {
- return x.hashCode();
- }
-
- /**
- * @see CompositeUserType#disassemble(Object, SessionImplementor)
- */
- public Serializable disassemble(Object value, SessionImplementor session) throws HibernateException {
- return (Serializable) deepCopy(value);
- }
-
- /**
- * @see CompositeUserType#assemble(Serializable, SessionImplementor, Object)
- */
- public Object assemble(Serializable cached, SessionImplementor session, Object owner) throws HibernateException {
- return deepCopy(cached);
- }
-
- /**
- * @see ParameterizedType#setParameterValues(Properties)
- */
- public void setParameterValues(Properties parameters) {
- String mappedTypeStr = parameters.getProperty("mappedType");
- try {
- mappedType = (Class extends Definition>)Context.loadClass(mappedTypeStr);
- }
- catch (Exception e) {
- throw new HibernateException("Error setting the mappedType property to " + mappedTypeStr, e);
- }
- }
-}
\ No newline at end of file
diff --git a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java b/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java
deleted file mode 100644
index 1f5a014233..0000000000
--- a/api-1.9/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/**
- * This Source Code Form is subject to the terms of the Mozilla Public License,
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
- * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
- * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
- *
- * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
- * graphic logo is a trademark of OpenMRS Inc.
- */
-package org.openmrs.module.reporting.report.service.db;
-
-import org.hibernate.HibernateException;
-import org.hibernate.usertype.UserType;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.Map;
-import java.util.Properties;
-
-import static java.sql.Types.VARCHAR;
-
-/**
- * A report definition type
- */
-public class PropertiesType implements UserType {
-
- /**
- * @see UserType#assemble(Serializable, Object)
- */
- public Object assemble(Serializable cached, Object owner) throws HibernateException {
- if (cached == null) {
- return null;
- }
- try {
- String s = (String) cached;
- Properties p = new Properties();
- p.load(new StringReader(s));
- return p;
- }
- catch (IOException e) {
- throw new IllegalArgumentException("Unable to load properties from string", e);
- }
- }
-
- /**
- * @see UserType#deepCopy(Object)
- */
- public Object deepCopy(Object value) throws HibernateException {
- if (value != null) {
- Properties val = (Properties) value;
- Properties copy = new Properties();
- for ( Map.Entry