Openmrs api, web, web app not installing with mvn

When i try to excute the command “mvn clean install” i get that error … could anyone help please @herbert24 @dkayiwa @jnsereko @samuel34 @ssmusoke @lumuchris256 @ruhanga @reagan
and why is web and webapp being skipped

Kindly shade more light on what you were trying to do prior to running the build. mvn clean install is just a command that helps in executing a clean build life cycle and installs build phase.

@jwnasambu there it is

Thanks for your feedback. Are you running a server or working on a ticket?

@jwnasambu i have cloned the ticket already but i want to run the server first

Use this command to run your server “mvn openmrs-sdk:run -Dopenmrsd=myserver” but if you want to confirm the cloned repository builds successfully, first import the project to your IDE then create a branch using git bash or any terminal of your choice using “git checkout -b “ticket id” then run” mvn clean install" on that branch.

@ndacyayisenga which module does the ticket require you to make the changes?

@jwnasambu but before i want to confirm … Thats how my files arranged themselves in the directory… the first one openmrs has the server

then the second file openmrs-core has those files

and the the last file openmrs-module-xreports has those files

could there be any problem in my files directories

The files are well arranged and the is no problem with them

@jwnasambu according to my files in which directory do you execute this mvn openmrs-sdk:run -Dopenmrsd=myserver in the openmrs in ope

None. To run the server, just type the command directly in the command prompt then press enter.

@jwnasambu When i attempt to execute mvn openmrs-sdk:run -Dopenmrsd=myserver thats what happens

https://talk.openmrs.org/uploads/default/original/2X/8/8a38df6a4ffea2527c4307fc1f725281089cc671.png

Sorry about this. Kindly , try re-running the command again and ensure the mysql is running (it requires when all the configurations are well set) which may be the cause of failure to start tomcat.

1 Like

@ndacyayisenga, i also got the build faiture when i run mvn clean install on newly cloned core files before switching to a new branch.

as @jwnasambu suggested, extend to another working directory by running cd openmrs-core (the name of the module. you can replace it with the name you named your module provided you changed it.)

there after, switch to a new branch with the command git checkout -b name_of_the_ticket

After doing all this retry building the module again. If you fail again delete the existing files and clone new ones.

open your command prompt, check out if you have

  1. maven by running mvn -v

  2. mysql by running mysql -u root -p enter your password and if you do not get a message as in the screenshot below, reinstall, or change your mysql, (i recommend mysql-8.x.x) but you can try out any.

  3. if all this works, then go ahead and create a new server. mvn openrs-sdk:setup Remember to specify either distribution (comes with existing modules) or patform (has no modules)

FWIW, the original error was caused by space in your folder path. “LAPTOP AVENUE”. Removing it would make the tests pass.

1 Like

Thanks for the clarification

@dkayiwa i thought removing that space would be as easy as changing the name of my PC which is not the issue… would help me drop me the link that could help me if u got any?

@ndacyayisenga you do not need to change the name of your PC at all. You can just create a folder on drive C and put the openmrs source there.

1 Like

apparently there was an issue sometime back caused by the space in the folder path with me too…thanks for the heads up.