Build failure for appointmentschedulingui module

I’m using appointmentschedulingui module 1.0.3 for developemnt purpose. I receive the following error on building the module:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (default) on project appointmentschedulingui-omod: An Ant BuildException has occured: exec returned: 1
[ERROR] around Ant part ...<exec failonerror="true" dir="E:\Magily\OpenMRS\healthcare\modules\openmrs-module-appointmentschedulingui-1.0.3\omod" executable="cmd" osfamily="windows">... @ 4:157 in E:\Magily\OpenMRS\healthcare\modules\openmrs-module-appointmentschedulingui-1.0.3\omod\target\antrun\build-building.xml
[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/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :appointmentschedulingui-omod

On removing the maven-antrun-plugin and exec-maven-plugin from pom.xml of omod package I’m able to build the module successfully.

Did you change the OpenMRS version it builds against?

I did not make any changes in pom or the code. Got the module release code from openmrs github repo and tried to build and got the above errors.

From peeking at omod/pom.xml (which is where antrun is mentioned) it looks like you need to have npm and bower installed to build this module.

(Maybe you don’t have npm installed?)

Removing the plugin isn’t the solution because you need them for the build process otherwise you’re technically skipping/disabling some portions of the build process. @darius has some good pointers, the plugin performs 2 executions i.e installs npm and then tries to use it in the second execution, so you might want to confirm which of the 2 is actually failing

We probably should add a note somewhere (project README?) that npm (and/or bower?) is required in order to build.

@themoonraker13 let us know if you get it working and/or have further problems, and feel free to update the readme.

1 Like

Good catch @darius. My bad that I didn’t scan the build failure log properly. :grin: I was able to build the module successfully after setting up git, npm, and bower on my system.

@mogoodrich I’ve edited README.md and generated a PR.

1 Like