Documentation for installing a UI for Platform 2.0

The new OpenMRS Platform 2.0 does not have a user interface. After successfully installing the platform, to have access to a user interface, you will have to install a user interface module. I have created a wiki that shows how to install LegacyUI and reference application as recommended by @darius. But right now the wiki shows only instructions for installing the legacyui, am still not sure what to write for the Reference Application module. Since i still don’t fully understand what the reference application module is. Here is the link to the wiki for user interface modules https://wiki.openmrs.org/display/docs/User+Interface+Modules

1 Like

Hello, I’m having 2 problems with the suggested options on this wiki. First of all, the legacy UI won’t build for me when I download it from Github. I’m not sure if there is another way to compile it to get the .omod file, but this unfortunately leaves me without an interface.

Secondly, the legacyUI is not available in the modules browser, and doesn’t appear when searched for.

Is there another option for installing a user interface?

Thank you

@cards31 The section that shows how to install legacyui by downloading from modules directory is intensional. The legacyui has not been uploaded yet, but will be soon. For now the only way to get legacyui is by building. What problems are you having with the build?

Hi Ivange,

I’m getting a build failure with the omod when I run mvn clean install. Here is the main description of the error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project legacyui-omod: There are test failures.

I’m running OSX 10.10.5 (Yosemite), and the most recent version of everything else, as I only started installing OpenMRS 2 days ago. I can post a more detailed error log if that would be helpful to you.

Thank you

EDIT: I managed to compile by running: mvn clean install -Dmaven.test.skip=true The UI seems to be working fine for me now.

Can you give more of your failure log? Are you using Java 8 to compile? If you only want to build the .omod, you could as well use -DskipTests

Hi Daniel,

Yes, I am compiling with Java 8. I’ve managed to build the working .omod by using -DskipTests.

The full error printout is:

Results :

Tests in error: 
  onSubmit_shouldEditExistingWorkflowsWithinPrograms(org.openmrs.web.controller.program.ProgramFormControllerTest): A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance: org.openmrs.Program.allWorkflows

Tests run: 298, Failures: 0, Errors: 1, Skipped: 4

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Legacy UI Module ................................... SUCCESS [  0.669 s]
[INFO] Legacy UI Module API ............................... SUCCESS [  5.239 s]
[INFO] Legacy UI Module OMOD .............................. FAILURE [01:00 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:07 min
[INFO] Finished at: 2015-12-20T20:00:05-05:00
[INFO] Final Memory: 39M/337M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project legacyui-omod: There are test failures.
[ERROR] 
[ERROR] Please refer to /Users/rob_cardy_31/GitHub/openmrs-module-legacyui/omod/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project legacyui-omod: There are test failures.

Please refer to /Users/rob_cardy_31/GitHub/openmrs-module-legacyui/omod/target/surefire-reports for the individual test results.
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
	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:497)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.

Please refer to /Users/rob_cardy_31/GitHub/openmrs-module-legacyui/omod/target/surefire-reports for the individual test results.
	at org.apache.maven.plugin.surefire.SurefireHelper.reportExecution(SurefireHelper.java:83)
	at org.apache.maven.plugin.surefire.SurefirePlugin.writeSummary(SurefirePlugin.java:176)
	at org.apache.maven.plugin.surefire.SurefirePlugin.handleSummary(SurefirePlugin.java:150)
	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:650)
	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:586)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
	... 20 more
[ERROR] 
[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 <goals> -rf :legacyui-omod

Thanks

Thanks @cards31 for raising this. I had not noticed that the module has a failing test. I have just fixed it at

So you should now be able to compile fine without skipping tests.

Thanks, @ivange94, for doing this. It was a great start! I finally got around to reviewing it, and I reordered it a bit (e.g. 2.x first, then implementer docs for legacy, then dev docs for legacy). I kept the internal anchor links with the same names.

I also made a quick commit to use short wiki links instead of full ones. I commented this on the ticket and I also asked you to do one follow up thing. Thanks!