Hello all ---
I've spent the most time (and gotten the farthest) with the clone and edit process, so let me describe that issue:
The only thing I did that might have been nonstandard was delete the <scm> section of the pom.xml, since I don't actually have an scm at the moment.
Maven compile and package steps work with no errors.
However when I try to load the resulting omod file into my dev openMRS instance (which is a 1.10.2-SNAPSHOT version of openmrs-core only),
I get the following error:
Error while trying to start module
Module requires version matching . Current code version is 1.10.2
I've done some burrowing around in the code and discovered a few things that I think are relevant but I don't know enough about maven or j2ee to put the pieces together:
- Putting a breakpoint in org.openmrs.module.ModuleUtil.checkRequiredVersion shows me that the versionRange argument is empty: the omod is not specifying a version requirement.
- Comparing the contents of my omod file with other published omod files, I see that their config.xml files contain an element like this <required_version>1.9</required_version>. My config.xml does not have this line.
- The obvious candidate in the POM, the element <openMRSVersion>, does not have any impact on this, which I've tested in various ways.
- Simply adding a <required_version> tag to the POM.xml causes Maven to complain about a mis-configured POM.
How am I supposed to specify what version of openMRS my module is compatible with? How is the <required_version> tag in the config.xml file generated?
BTW, when I tried to use the maven archetype to generate a sample module, I found that maven would have errors building it. The same thing is true when I clone a copy of an existing published module off of github. I get error messages such as this one (which I got trying to build the webservices module)
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.1:unpack-dependencies (Expand resources) on project webservices.rest-omod: Unknown archiver type: No such archiver: 'rest/omod-common/target/classes'. -> [Help 1]
So perhaps there is something wrong in my overall environment / maven configuration --- it might even be causing both problems.
Thanks in advance for any advice,
denise