How do I set up my development system?

What are the things I need to install or modify in my system to make it compatible for the usage to contribute to this project/community. I’m currently using UBUNTU 14.04 Trusty. It would be very helpful if I could get some direction to start from basics.

Regards, speedy

Did you have a look at http://flossmanuals.net/openmrs-guide/

@speedy Hi :slight_smile: Welcome to the OpenMRS community.

You might want to look at how to get started on contributing to OpenMRS. It is documented in detail as to how we can contribute.

After you’re comfortable with the setup on your system, you can checkout on JIRA issues to get the development started.

I guess you’re here at the right time :smile: There’s a fun opportunity to participate in an active sprint running right now (moving the legacy functions to a module). You can take a quick look at the JIRA issues to see if you start with your contribution there :wink:

Also join our IRC channel #openmrs to clarify any questions you have :slight_smile:

Feel free to reach out in case of any blockers :thumbsup:

when I finally typed this command: mvn clean install
after all the above mentioned one.

i got errors like:

[INFO] OpenMRS ........................................... FAILURE [6.775s]
[INFO] openmrs-tools ..................................... SKIPPED
[INFO] openmrs-test ...................................... SKIPPED
[INFO] openmrs-api ....................................... SKIPPED
[INFO] openmrs-web ....................................... SKIPPED
[INFO] openmrs-webapp .................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.699s
[INFO] Finished at: Thu Oct 29 01:14:46 IST 2015
[INFO] Final Memory: 8M/108M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin com.mycila:license-maven-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.mycila:license-maven-plugin:jar:2.6: Could not transfer artifact com.mycila:license-maven-plugin:pom:2.6 from/to openmrs-repo (http://mavenrepo.openmrs.org/nexus/content/repositories/public): Connection to http://mavenrepo.openmrs.org refused: Connection refused -> [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/PluginResolutionException

any idea why is this happening. As I’m just one step away from setting up my system. please help me so I can start soon on this project.

Regards, Speedy :smile:

Do you have connection issues?

@lluismf No I don’t have any kind of connection issues I guess.

now I tried installing mvn-SDK

mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:setup-sdk[INFO] Scanning for projects...
Downloading: http://repo.maven.apache.org/maven2/org/openmrs/maven/plugins/openmrs-sdk-maven-plugin/maven-metadata.xml
[WARNING] Could not transfer metadata org.openmrs.maven.plugins:openmrs-sdk-maven-plugin/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.788s
[INFO] Finished at: Wed Nov 04 19:27:18 IST 2015
[INFO] Final Memory: 6M/104M
[INFO] ------------------------------------------------------------------------
[ERROR] Error resolving version for plugin 'org.openmrs.maven.plugins:openmrs-sdk-maven-plugin' from the repositories [local (/home/vinay/.m2/repository), central (http://repo.maven.apache.org/maven2)]: Plugin not found in any plugin repository -> [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/PluginVersionResolutionException

how can I move forward. As this error seems to tough for me to get through. Will be glad to get some helps from the OpenMRD dev’s

Thanks in Advance :slight_smile:

Regards, Speedy

Are you behind a proxy? If yes, then you need to configure maven to use it. See https://maven.apache.org/guides/mini/guide-proxies.html

Otherwise are you able to access http://repo.maven.apache.org?

@raff Yes I’m behind a proxy, but the first link you provided doesn’t opens, gives an error secure connection failed

but the 2nd link you provided opens, and it shows Index of/ and then a list of some items.

what to do next?

Regards.

1 Like

You need to setup proxy. Try http://maven.apache.org/guides/mini/guide-proxies.html

1 Like

So after a long time trying I ended up installing openMRS and is being used with tomcat. what to do next to get myself in the contributors line for this organisation.

Regards,

Hi Vinay, Any help on how the problem was resolved will be of great help.Visited http://maven.apache.org/guides/mini/guide-proxies.html but could not find the ${user.home}/.m2/settings.xml file.

Warm Regards, Sattam

@speedy did you get a chance to look at this? https://wiki.openmrs.org/display/docs/Getting+Started+as+a+Developer

@sattam did you install maven?

Hi Daniel, yes I have installed Maven. I could see it in Eclipse when I go to Windows>Preference and look in the left hand panel. I have read the developers guide and it suggest omrs SDK. However, I intend to do the complete manual install.

Warm Reagrds, Sattam

Hi Daniel, I have managed to find the solution. Manually created the settings.xml file in ${user.home}/.m2/ with required information and that sorted the above problem.

However, I am facing another problem now. `[INFO] OpenMRS … SUCCESS [05:45 min] [INFO] openmrs-tools … FAILURE [ 38.903 s] [INFO] openmrs-test … SKIPPED [INFO] openmrs-api … SKIPPED [INFO] openmrs-web … SKIPPED [INFO] openmrs-webapp … SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 06:24 min [INFO] Finished at: 2016-07-12T17:54:20+05:30 [INFO] Final Memory: 11M/27M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.1:compile (default-compile) on project openmrs-tools: Compilation failure [ERROR] Failure executing javac, but could not parse the error: [ERROR] javac: invalid target release: 1.8 [ERROR] Usage: javac [ERROR] use -help for a list of possible options [ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.1:compile (default-compile) on project openmrs-tools: Compilation failure Failure executing javac, but could not parse the error: javac: invalid target release: 1.8 Usage: javac use -help for a list of possible options

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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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.CompilationFailureException: Compilation failure Failure executing javac, but could not parse the error: javac: invalid target release: 1.8 Usage: javac use -help for a list of possible options

at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:613)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:116)
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] [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 :openmrs-tools`

Below is a snapshot of my configuration, yet javac: invalid target release: 1.8 error coming. Any help or guidance will be appreciated.

Warm Regards, Sattam

I believe Maven is trying to compile with JDK 8 but it can’t. Do you have the JDK installed and in the path?

Yes I have both jdk 1.7 and 1.8, but read about people having problem with jdk 1.8 hence altered to point to the JDK1.7 path. I also feel Maven is trying to compile with JDK 1.8 but I am failing to understand the reason for it to do so when I apparently pointed everything to JDK1.7 :pensive:

The master branch of openmrs core requires jdk 1.8

Maven does not use Eclipse’s JDK settings (if that’s what you mean by point everything to JDK1.7).

Thanks @wyclif jdk 1.8 did the trick