problem with "mvn clean install openmrs-sdk:run"

Hello! I´m a new developer and following the guide OpenMRS SDK and I have just created a server and a module by these scripts:

  • mvn openmrs-sdk:setup
  • mvn openmrs-sdk:create-project

then I typed:

  • cd test (corresponds to “basicexample”)

and when I´m trying to run the module on the server by:

  • mvn clean install openmrs-sdk:run

I get this error message: (Does anyone know what I should do to solve this?)

@rakkila when you want to run you do something like “mvn openmrs-sdk:run”

The SDK will provide you with options for a particular server or more easily " mvn openmrs-sdk:run -DserverId=myserver "

Is syntactically wrong

Did you chance to look at https://wiki.openmrs.org/display/docs/OpenMRS+SDK ?

Thank you for your answer! I tried to just run “mvn openmrs-sdk:run” but I get the exactly same message.

yes, I have followed the guide

Can you run "mvn clean install -X " and get me the log at hastebin.com ?

The log exceeds the maximum length for hastebin.com :confused:

@rakkila pastebin.com works just fine… But what do you see when you type "mvn -v "

This is not wrong as @tendomart said.

@rakkila the screenshot you shared hides part of the error message. A number of things could be wrong but without seeing the full error message we’ll just be throwing stones in the dark. Common error is when you have another application running on the default port.

@ivange94 Thanks for the correction

1 Like

@rakkila I looked at the screenshot again and I’m certain you have another application running on 8080. But would help to see the complete line of the first error message in red.

I post the log here: https://pastebin.com/wEC6R0ta

when I type mvn -v:

Okay so should I run the script again with “-e” and share it with pastebin.com? :slight_smile:

I don´t think the port is being used by another application since I use the suggested one:

@rakkila do you mind using or downgrading to JDK-8…Am not so sure if OpenMRS Platform 2.1.3 and Refapp 2.8.0 run smoothly on Java-10.

My other question is what are you building, OpenMRS Platform or Distribution ?

1 Like

@rakkila I’ve never succeeded in running the feature you are trying to use. When ever a port is in use and I’m asked to select another port, it never works for me. So like I said the port is in use but the setup proposes you another port but that has never worked for me.

1 Like

The paste you shared is for

mvn clean install -X 

But that’s not what is giving your problems. Your problem is with

mvn openmrs-sdk:run

In the earlier screenshot you shared,

This doesn’t show the complete error message. You could take a better screenshot. Or you could share the complete log of the command you ran that gave the above output on pastebin.com. The log you shared on pastebin.com does not contain this error.

Now I have switched to JDK 8 and I´m building distribution!

Thank you @ivange94 and @tendomart! Here is the output I get now when I have JDK 8 and run

mvn openmrs-sdk:run

https://pastebin.com/k1J0K5Nr