coreapps build failure on unpack-dependencies

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

[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

I have just reproduced the same exact problem.

Then i just did run mvn clean install a second time and succeeded. :smile:

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.

1 Like

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. :slight_smile:

2 Likes

Weird! Thanks!

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