i retried with maven 3.2.5 and got this error:
openhie@openhie-OptiPlex-3020:~/Downloads/openmrs-module-casereport-master$ sudo mvn clean install
[sudo] password for openhie:
[INFO] Scanning for projects…
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Case Report Module
[INFO] Case Report Module API
[INFO] Case Report Module OMOD
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Case Report Module 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml
Downloaded: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml (1021 B at 0.9 KB/sec)
[INFO]
[INFO] — maven-clean-plugin:2.5:clean (default-clean) @ casereport —
[INFO]
[INFO] — license-maven-plugin:2.6:check (default) @ casereport —
[INFO] Checking licenses…
[INFO]
[INFO] — maven-install-plugin:2.4:install (default-install) @ casereport —
[INFO] Installing /home/openhie/Downloads/openmrs-module-casereport-master/pom.xml to /root/.m2/repository/org/openmrs/module/casereport/1.0-SNAPSHOT/casereport-1.0-SNAPSHOT.pom
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Case Report Module API 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] — maven-clean-plugin:2.5:clean (default-clean) @ casereport-api —
[INFO] Deleting /home/openhie/Downloads/openmrs-module-casereport-master/api/target
[INFO]
[INFO] — maven-resources-plugin:2.6:resources (default-resources) @ casereport-api —
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.
[INFO] Copying 16 resources
[INFO]
[INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ casereport-api —
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 21 source files to /home/openhie/Downloads/openmrs-module-casereport-master/api/target/classes
[WARNING] /home/openhie/Downloads/openmrs-module-casereport-master/api/src/main/java/org/openmrs/module/casereport/api/db/hibernate/HibernateCaseReportDAO.java: /home/openhie/Downloads/openmrs-module-casereport-master/api/src/main/java/org/openmrs/module/casereport/api/db/hibernate/HibernateCaseReportDAO.java uses unchecked or unsafe operations.
[WARNING] /home/openhie/Downloads/openmrs-module-casereport-master/api/src/main/java/org/openmrs/module/casereport/api/db/hibernate/HibernateCaseReportDAO.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] — maven-resources-plugin:2.6:testResources (default-testResources) @ casereport-api —
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.
[INFO] Copying 13 resources
[INFO]
[INFO] — maven-compiler-plugin:3.1:testCompile (default-testCompile) @ casereport-api —
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 8 source files to /home/openhie/Downloads/openmrs-module-casereport-master/api/target/test-classes
[WARNING] /home/openhie/Downloads/openmrs-module-casereport-master/api/src/test/java/org/openmrs/module/casereport/CaseReportUtilTest.java: Some input files use or override a deprecated API.
[WARNING] /home/openhie/Downloads/openmrs-module-casereport-master/api/src/test/java/org/openmrs/module/casereport/CaseReportUtilTest.java: Recompile with -Xlint:deprecation for details.
[INFO]
[INFO] — maven-surefire-plugin:2.12.4:test (default-test) @ casereport-api —
[INFO] Surefire report directory: /home/openhie/Downloads/openmrs-module-casereport-master/api/target/surefire-reports
T E S T S
Running org.openmrs.module.casereport.api.CaseReportServiceTest
Tests run: 37, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.594 sec
Running org.openmrs.module.casereport.CaseReportValidatorTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.116 sec
Running org.openmrs.module.casereport.CaseReportTriggerValidatorTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.137 sec
Running org.openmrs.module.casereport.CaseReportActivatorTest
INFO - CaseReportActivator.loadQueries(65) |2017-08-09 09:36:08,306| Loading queries…
INFO - CaseReportActivator.loadQueries(65) |2017-08-09 09:36:08,357| Loading queries…
INFO - CaseReportActivator.loadQueries(65) |2017-08-09 09:36:08,500| Loading queries…
INFO - CaseReportActivator.addSchedulerTaskIfNecessary(133) |2017-08-09 09:36:08,510| Creating Case Reports Task for: HIV Patient Died
WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-08-09 09:36:08,541| Task ‘HIV Patient Died’ not found
WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-08-09 09:36:08,543| getTaskByName(HIV Patient Died) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Patient Died]: not found
INFO - CaseReportActivator.addSchedulerTaskIfNecessary(133) |2017-08-09 09:36:08,559| Creating Case Reports Task for: HIV Switched To Second Line
WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-08-09 09:36:08,563| Task ‘HIV Switched To Second Line’ not found
WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-08-09 09:36:08,565| getTaskByName(HIV Switched To Second Line) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Switched To Second Line]: not found
INFO - CaseReportActivator.contextRefreshed(61) |2017-08-09 09:36:08,567| Case Report Module refreshed
INFO - CaseReportActivator.loadQueries(65) |2017-08-09 09:36:08,585| Loading queries…
INFO - CaseReportActivator.loadQueries(65) |2017-08-09 09:36:08,635| Loading queries…
INFO - CaseReportActivator.addSchedulerTaskIfNecessary(133) |2017-08-09 09:36:08,642| Creating Case Reports Task for: HIV Patient Died
WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-08-09 09:36:08,644| Task ‘HIV Patient Died’ not found
WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-08-09 09:36:08,644| getTaskByName(HIV Patient Died) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Patient Died]: not found
INFO - CaseReportActivator.contextRefreshed(61) |2017-08-09 09:36:08,653| Case Report Module refreshed
INFO - CaseReportActivator.loadQueries(65) |2017-08-09 09:36:08,702| Loading queries…
INFO - CaseReportActivator.loadQueries(65) |2017-08-09 09:36:08,710| Loading queries…
WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-08-09 09:36:08,720| Task ‘HIV Patient Died’ not found
WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-08-09 09:36:08,720| getTaskByName(HIV Patient Died) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Patient Died]: not found
WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-08-09 09:36:08,721| Task ‘HIV Switched To Second Line’ not found
WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-08-09 09:36:08,722| getTaskByName(HIV Switched To Second Line) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Switched To Second Line]: not found
INFO - CaseReportActivator.loadQueries(65) |2017-08-09 09:36:08,757| Loading queries…
INFO - CaseReportActivator.addSchedulerTaskIfNecessary(133) |2017-08-09 09:36:08,763| Creating Case Reports Task for: HIV Patient Died
WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-08-09 09:36:08,766| Task ‘HIV Patient Died’ not found
WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-08-09 09:36:08,766| getTaskByName(HIV Patient Died) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Patient Died]: not found
INFO - CaseReportActivator.addSchedulerTaskIfNecessary(133) |2017-08-09 09:36:08,773| Creating Case Reports Task for: HIV Switched To Second Line
WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-08-09 09:36:08,774| Task ‘HIV Switched To Second Line’ not found
WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-08-09 09:36:08,775| getTaskByName(HIV Switched To Second Line) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Switched To Second Line]: not found
INFO - CaseReportActivator.contextRefreshed(61) |2017-08-09 09:36:08,777| Case Report Module refreshed
INFO - CaseReportActivator.loadQueries(65) |2017-08-09 09:36:08,784| Loading queries…
INFO - CaseReportActivator.loadQueries(65) |2017-08-09 09:36:08,830| Loading queries…
INFO - CaseReportActivator.addSchedulerTaskIfNecessary(133) |2017-08-09 09:36:08,835| Creating Case Reports Task for: HIV Patient Died
WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-08-09 09:36:08,836| Task ‘HIV Patient Died’ not found
WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-08-09 09:36:08,837| getTaskByName(HIV Patient Died) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Patient Died]: not found
INFO - CaseReportActivator.addSchedulerTaskIfNecessary(133) |2017-08-09 09:36:08,845| Creating Case Reports Task for: HIV Switched To Second Line
WARN - HibernateSchedulerDAO.getTaskByName(96) |2017-08-09 09:36:08,847| Task ‘HIV Switched To Second Line’ not found
WARN - TimerSchedulerServiceImpl.getTaskByName(393) |2017-08-09 09:36:08,847| getTaskByName(HIV Switched To Second Line) failed, because: org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.openmrs.scheduler.TaskDefinition] with identifier [HIV Switched To Second Line]: not found
INFO - CaseReportActivator.contextRefreshed(61) |2017-08-09 09:36:08,849| Case Report Module refreshed
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.6 sec
Running org.openmrs.module.casereport.CaseReportUtilTest
WARN - OpenmrsUtil.getDirectoryInApplicationDataDirectory(1346) |2017-08-09 09:36:09,090| ‘/tmp/appdir-for-unit-tests-4226387009933283023/REPORT_RESULTS’ doesn’t exist. Creating directories now.
WARN - OpenmrsUtil.getDirectoryInApplicationDataDirectory(1346) |2017-08-09 09:36:09,198| ‘/tmp/appdir-for-unit-tests-3280818113014999157/REPORT_RESULTS’ doesn’t exist. Creating directories now.
WARN - OpenmrsUtil.getDirectoryInApplicationDataDirectory(1346) |2017-08-09 09:36:09,465| ‘/tmp/appdir-for-unit-tests-6063879352877438233/REPORT_RESULTS’ doesn’t exist. Creating directories now.
WARN - CaseReportUtil.getSqlCohortDefinition(251) |2017-08-09 09:36:09,544| Cannot find a Sql Cohort Query with name:some name that doesn’t exist
WARN - OpenmrsUtil.getDirectoryInApplicationDataDirectory(1346) |2017-08-09 09:36:09,586| ‘/tmp/appdir-for-unit-tests-7447834445469864609/REPORT_RESULTS’ doesn’t exist. Creating directories now.
DEBUG - CaseReportUtil.executeTask(353) |2017-08-09 09:36:09,589| Patient#2 already has an item in the queue with the trigger HIV Switched To Second Line
WARN - CaseReportUtil.getSqlCohortDefinition(251) |2017-08-09 09:36:09,671| Cannot find a Sql Cohort Query with name:some name that does not exist
WARN - OpenmrsUtil.getDirectoryInApplicationDataDirectory(1346) |2017-08-09 09:36:09,689| ‘/tmp/appdir-for-unit-tests-3042786242687817229/REPORT_RESULTS’ doesn’t exist. Creating directories now.
WARN - CaseReportUtil.getSqlCohortDefinition(251) |2017-08-09 09:36:09,727| some retired cohort query is a retired Sql Cohort Query
WARN - OpenmrsUtil.getDirectoryInApplicationDataDirectory(1346) |2017-08-09 09:36:09,807| ‘/tmp/appdir-for-unit-tests-9071977171144711315/REPORT_RESULTS’ doesn’t exist. Creating directories now.
Tests run: 19, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.052 sec
Running org.openmrs.module.casereport.CaseReportFormTest
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.511 sec <<< FAILURE!
shouldGenerateTheReportFormForTheSpecifiedPatient(org.openmrs.module.casereport.CaseReportFormTest) Time elapsed: 0.51 sec <<< FAILURE!
junit.framework.AssertionFailedError: expected:<0> but was:<-1>
at junit.framework.Assert.fail(Assert.java:57)
at junit.framework.Assert.failNotEquals(Assert.java:329)
at junit.framework.Assert.assertEquals(Assert.java:78)
at junit.framework.Assert.assertEquals(Assert.java:234)
at junit.framework.Assert.assertEquals(Assert.java:241)
at org.openmrs.module.casereport.CaseReportFormTest.shouldGenerateTheReportFormForTheSpecifiedPatient(CaseReportFormTest.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
ERROR - SchemaExport.execute(287) |2017-08-09 09:36:10,513| schema export unsuccessful
org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add “;DB_CLOSE_ON_EXIT=FALSE” to the db URL) [90121-187]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
at org.h2.message.DbException.get(DbException.java:179)
at org.h2.message.DbException.get(DbException.java:155)
at org.h2.message.DbException.get(DbException.java:144)
at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1469)
at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1444)
at org.h2.jdbc.JdbcConnection.getAutoCommit(JdbcConnection.java:447)
at com.mchange.v2.c3p0.impl.NewProxyConnection.getAutoCommit(NewProxyConnection.java:985)
at org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:82)
at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:51)
at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:263)
at org.hibernate.tool.hbm2ddl.SchemaExport.drop(SchemaExport.java:229)
at org.hibernate.impl.SessionFactoryImpl.close(SessionFactoryImpl.java:961)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.destroy(AbstractSessionFactoryBean.java:228)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.destroy(LocalSessionFactoryBean.java:902)
at org.openmrs.api.db.hibernate.HibernateSessionFactoryBean.destroy(HibernateSessionFactoryBean.java:206)
at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:238)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:510)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:486)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:742)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:455)
at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1090)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1064)
at org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:980)
Results :
Failed tests: shouldGenerateTheReportFormForTheSpecifiedPatient(org.openmrs.module.casereport.CaseReportFormTest): expected:<0> but was:<-1>
Tests run: 79, Failures: 1, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Case Report Module … SUCCESS [ 1.743 s]
[INFO] Case Report Module API … FAILURE [ 16.818 s]
[INFO] Case Report Module OMOD … SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.114 s
[INFO] Finished at: 2017-08-09T09:36:10+01:00
[INFO] Final Memory: 33M/259M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project casereport-api: There are test failures.
[ERROR]
[ERROR] Please refer to /home/openhie/Downloads/openmrs-module-casereport-master/api/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :casereport-api