# Mvn failure when building Metadata Mapping Module locally

**URL:** <https://talk.openmrs.org/t/mvn-failure-when-building-metadata-mapping-module-locally/9993>\
**Category:** Development\
**Created:** [February 9, 2017, 9:55pm UTC](https://talk.openmrs.org/t/mvn-failure-when-building-metadata-mapping-module-locally/9993 "2017-02-09T21:55:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mogoodrich](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mogoodrich/32/3324_2.png) [@mogoodrich](https://talk.openmrs.org/u/mogoodrich)\
**Post date:** [February 9, 2017, 9:55pm UTC](https://talk.openmrs.org/t/mvn-failure-when-building-metadata-mapping-module-locally/9993/1 "2017-02-09T21:55:37Z")

</div>

Building the metadata mapping module with maven fails for me.

First, I’m seeing this error message:

> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4.1:single (zip-owa) on project metadatamapping-owa: Assembly is incorrectly configured: null: Assembly is incorrectly configured: null: [ERROR] Assembly: null is not configured correctly: Assembly ID must be present and non-empty. [ERROR] → [Help 1]

This appears to be because the assembly.xml does have an tag. (See: [[MASSEMBLY-517] Assembly fails with empty id element now - ASF JIRA](https://issues.apache.org/jira/browse/MASSEMBLY-517))

I add an tag to the assembly.xml (just something random like “test”) and I get farther, but then run into this:

> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.4:copy (include-owa) on project metadatamapping-omod: Unable to find artifact. Failure to find org.openmrs.module:metadatamapping-owa:zip:1.2.2-SNAPSHOT in [JFrog](http://mavenrepo.openmrs.org/nexus/content/repositories/public) was cached in the local repository, resolution will not be reattempted until the update interval of openmrs-repo has elapsed or updates are forced [ERROR] [ERROR] Try downloading the file manually from the project website. [ERROR] [ERROR] Then, install it using the command: [ERROR] mvn install:install-file -DgroupId=org.openmrs.module -DartifactId=metadatamapping-owa -Dversion=1.2.2-SNAPSHOT -Dpackaging=zip -Dfile=/path/to/file [ERROR] [ERROR] Alternatively, if you host your own repository you can deploy the file there: [ERROR] mvn deploy:deploy-file -DgroupId=org.openmrs.module -DartifactId=metadatamapping-owa -Dversion=1.2.2-SNAPSHOT -Dpackaging=zip -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] [ERROR] [ERROR] [ERROR] org.openmrs.module:metadatamapping-owa:zip:1.2.2-SNAPSHOT [ERROR] [ERROR] from the specified remote repositories: [ERROR] openmrs-repo ([JFrog](http://mavenrepo.openmrs.org/nexus/content/repositories/public), releases=true, snapshots=true), [ERROR] openmrs-repo-thirdparty ([JFrog](http://mavenrepo.openmrs.org/nexus/content/repositories/thirdparty), releases=true, snapshots=true), [ERROR] openmrs-bintray-repo ([https://dl.bintray.com/openmrs/maven/](https://dl.bintray.com/openmrs/maven/), releases=true, snapshots=true), [ERROR] central ([Central Repository:](https://repo.maven.apache.org/maven2), releases=true, snapshots=false) [ERROR] → [Help 1] [ERROR]

Thoughts on what is going on here?

@raff

Thanks! Mark

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [February 9, 2017, 10:10pm UTC](https://talk.openmrs.org/t/mvn-failure-when-building-metadata-mapping-module-locally/9993/2 "2017-02-09T22:10:58Z")

</div>

I have just compiled it with Java 8 and all was well. Which version of Java are you using?

---

<div class="post-metadata">

**Author:** ![mogoodrich](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mogoodrich/32/3324_2.png) [@mogoodrich](https://talk.openmrs.org/u/mogoodrich)\
**Post date:** [February 9, 2017, 10:33pm UTC](https://talk.openmrs.org/t/mvn-failure-when-building-metadata-mapping-module-locally/9993/3 "2017-02-09T22:33:09Z")

</div>

Hmm… I am using Java 7.

This module _should_ still compile on Java 7, correct?

Take care, Mark

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [February 10, 2017, 8:05am UTC](https://talk.openmrs.org/t/mvn-failure-when-building-metadata-mapping-module-locally/9993/4 "2017-02-10T08:05:03Z")

</div>

I have just compiled it again successfully with Java 7. Could it be something in your .m2 folder?

---

<div class="post-metadata">

**Author:** ![raff](https://talk.openmrs.org/user_avatar/talk.openmrs.org/raff/32/11894_2.png) [@raff](https://talk.openmrs.org/u/raff)\
**Post date:** [February 10, 2017, 11:00am UTC](https://talk.openmrs.org/t/mvn-failure-when-building-metadata-mapping-module-locally/9993/5 "2017-02-10T11:00:35Z")

</div>

The issue is we haven’t declared a version of the assembly plugin so the build may fail on systems using a newer version, which requires assembly Id.

The other issue is that we forgot to add a dependency on owa to the omod pom.

Let me fix all that.

---

<div class="post-metadata">

**Author:** ![raff](https://talk.openmrs.org/user_avatar/talk.openmrs.org/raff/32/11894_2.png) [@raff](https://talk.openmrs.org/u/raff)\
**Post date:** [February 10, 2017, 11:55am UTC](https://talk.openmrs.org/t/mvn-failure-when-building-metadata-mapping-module-locally/9993/6 "2017-02-10T11:55:34Z")

</div>

I decided to simplify the setup and use the latest version of SDK for packaging. Fixed in: [https://github.com/openmrs/openmrs-module-metadatamapping/commit/a208833dfdefd65cc821cba7a9220463df5c086c](https://github.com/openmrs/openmrs-module-metadatamapping/commit/a208833dfdefd65cc821cba7a9220463df5c086c)

@mogoodrich, let me know if it works for you now.

---

<div class="post-metadata">

**Author:** ![mogoodrich](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mogoodrich/32/3324_2.png) [@mogoodrich](https://talk.openmrs.org/u/mogoodrich)\
**Post date:** [February 10, 2017, 3:50pm UTC](https://talk.openmrs.org/t/mvn-failure-when-building-metadata-mapping-module-locally/9993/7 "2017-02-10T15:50:56Z")

</div>

It worked thanks @raff!
