# coreapps build failure on unpack-dependencies

**URL:** <https://talk.openmrs.org/t/coreapps-build-failure-on-unpack-dependencies/29512>\
**Category:** Development\
**Tags:** maven\
**Created:** [July 20, 2020, 11:51pm UTC](https://talk.openmrs.org/t/coreapps-build-failure-on-unpack-dependencies/29512 "2020-07-20T23:51:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bistenes](https://talk.openmrs.org/user_avatar/talk.openmrs.org/bistenes/32/18573_2.png) [@bistenes](https://talk.openmrs.org/u/bistenes)\
**Post date:** [July 20, 2020, 11:51pm UTC](https://talk.openmrs.org/t/coreapps-build-failure-on-unpack-dependencies/29512/1 "2020-07-20T23:51:35Z")

</div>

Right now, master on coreapps gives the following error on `mvn clean test`:

```auto
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:07 min
[INFO] Finished at: 2020-07-20T16:47:03-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.4:unpack-dependencies (Expand moduleApplicationContext and messages) on project coreapps-omod: Error unpacking file: /home/brandon/Code/openmrs-module-coreapps/api/target/classes to: /home/brandon/Code/openmrs-module-coreapps/omod/target/classes
[ERROR] org.codehaus.plexus.archiver.ArchiverException: The source must not be a directory.
[ERROR] -> [Help 1]

```

Any ideas? @mogoodrich

---

<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:** [July 21, 2020, 10:05am UTC](https://talk.openmrs.org/t/coreapps-build-failure-on-unpack-dependencies/29512/2 "2020-07-21T10:05:27Z")

</div>

I have just reproduced the same exact problem.

---

<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:** [July 21, 2020, 10:13am UTC](https://talk.openmrs.org/t/coreapps-build-failure-on-unpack-dependencies/29512/3 "2020-07-21T10:13:54Z")

</div>

Then i just did run `mvn clean install` a second time and succeeded. 😄

---

<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:** [July 21, 2020, 1:58pm UTC](https://talk.openmrs.org/t/coreapps-build-failure-on-unpack-dependencies/29512/4 "2020-07-21T13:58:34Z")

</div>

Interesting… “mvn clean test” fails, but “mvn clean install” works (and an install should run all the tests).

Assumedly for some reason the tests in the omod module rely on something from the api module being installed.

Once you run a “mvn clean install”, if you run “mvn test” after that (without doing a clean) it passes.

---

<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:** [July 21, 2020, 2:07pm UTC](https://talk.openmrs.org/t/coreapps-build-failure-on-unpack-dependencies/29512/5 "2020-07-21T14:07:41Z")

</div>

Sorry for confusing you. My first time running was with `mvn clean install` instead of `mvn clean test`. But it still failed with the exact same error as @bistenes. But on running the same exact command a second time, all was well. 🙂

---

<div class="post-metadata">

**Author:** ![bistenes](https://talk.openmrs.org/user_avatar/talk.openmrs.org/bistenes/32/18573_2.png) [@bistenes](https://talk.openmrs.org/u/bistenes)\
**Post date:** [July 21, 2020, 2:12pm UTC](https://talk.openmrs.org/t/coreapps-build-failure-on-unpack-dependencies/29512/6 "2020-07-21T14:12:44Z")

</div>

Weird! Thanks!

I’ll add a note to the README, unless someone is inclined to fix it.
