When doing a mvn clean package -Dopenmrs.version=2.2 on the openmrs_emr branch of openmrs-standalone I am facing the following issue:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building standalone 1.1.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ standalone ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-property) @ standalone ---
[INFO]
[INFO] --- liquibase-maven-plugin:2.0.1:update (empty-database-create-schema) @ standalone ---
Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/openmrs/api/openmrs-api/2.2/openmrs-api-2.2.pom
Downloading: https://repo.maven.apache.org/maven2/org/openmrs/api/openmrs-api/2.2/openmrs-api-2.2.pom
[WARNING] The POM for org.openmrs.api:openmrs-api:jar:2.2 is missing, no dependency information available
Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/openmrs/api/openmrs-api/2.2/openmrs-api-2.2.jar
Downloading: https://repo.maven.apache.org/maven2/org/openmrs/api/openmrs-api/2.2/openmrs-api-2.2.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.436 s
[INFO] Finished at: 2016-08-04T08:48:51-04:00
[INFO] Final Memory: 24M/970M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:2.0.1:update (empty-database-create-schema) on project standalone: Execution empty-database-create-schema of goal org.liquibase:liquibase-maven-plugin:2.0.1:update failed: Plugin org.liquibase:liquibase-maven-plugin:2.0.1 or one of its dependencies could not be resolved: Could not find artifact org.openmrs.api:openmrs-api:jar:2.2 in openmrs-repo (http://mavenrepo.openmrs.org/nexus/content/repositories/public) -> [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
@dkayiwa, I cannot find an option mentioned in https://github.com/openmrs/openmrs-standalone except for switching a branch, can you let me know what option needs to be used so that I can update in the directions as well
To package Reference Application from https://github.com/openmrs/openmrs-standalone, I do not find any directions to know what options to use specific to reference application. The quick summary asks us to use
mvn clean package -Dopenmrs.version=1.9.0
Similarly is there a command to be run for packaging refapp something like
mvn clean package -DrefApp.version=2.2
To phrase my question simply-
“Can we build/package OpenMRS Reference Application using OpenMRS Standalone to create a standalone version (Which I strongly believe we can) ? Can you direct me to how I can do that?”
NOTE: for the reference application standalone, you would use the openmrs-emr branch and if it is based on platform 2.0 and above, you would use the openmrs-emr2 branch
@maurya i noticed that having been doing it all the time from bamboo at a click of a button made me forget the full command. Just tried it out locally and here is what i had to use:
@maurya whenever you get a message like “Could not create connection to database server.”, it means you have instances of mysql from the previous runs that are still hanging around. The solution is to kill them and run again.
I didn’t think there would be more than one process. Thanks for pointing me to that.
I was able to build the standalone successfully, but I only see a 1.11.6 Standalone rather than a 2.4 Standalone, there is no trace of any modules. Also, there is only a ZIP generated through the build and has refapp.version on its name, but when it extracts, it extracts to openmrs-standalone 1.11.6.
@maurya if you have no modules in the standalone’s appdata/modules folder, then clone the distro and compile it to create the modules. For instance my distro is cloned at /Projects/openmrs/distro
@dkayiwa, just to confirm, the standalone for OpenMRS Reference Application only builds the OpenMRS-core war and expects the Reference Application Modules to be built and available to be packaged as standalone. Is that correct?
@maurya it pulls the war file from the maven repository. Yes it expects the reference application modules to be built and pass the folder via the refapp argument.
@maurya and @jdegraft i have made a commit to ensure that the zip has the reference application version instead of platform version. Pull the latest changes and compile again. Also note that the modules folder argument is case sensitive.
So use -Drefapp instead of DrefApp
i am facing a standalone build failure when buildinga ci plan for platform 2.4.x build which according to the logs seems to be due to liquibase maven plugin