[SOLVED] Invalid content checksum on mvn install of itests test project

Tags: #<Tag:0x00007fc20f6c4570> #<Tag:0x00007fc20f6c4318>

I suddenly started getting these kind of errors when mvn installing an integration test I am working on.

For example mvn install in openhab2-addons/itests/org.openhab.binding.hue.tests:

https://pastebin.com/v501kL1V

Removing rm -rf /home/USER/.m2/repository/org/openhab/core/bundles/org.openhab.core.thing.xml/ will not help, maven will still download “invalid” file.

For convenience, here are the problematic files:

/home/USER/.m2/repository/org/openhab/core/bundles/org.openhab.core/2.5.0-SNAPSHOT/org.openhab.core-2.5.0-SNAPSHOT.jar
/home/USER/.m2/repository/org/openhab/core/bundles/org.openhab.core.binding.xml/2.5.0-SNAPSHOT/org.openhab.core.binding.xml-2.5.0-SNAPSHOT.jar
/home/USER/.m2/repository/org/openhab/core/bundles/org.openhab.core.config.core/2.5.0-SNAPSHOT/org.openhab.core.config.core-2.5.0-SNAPSHOT.jar
/home/USER/.m2/repository/org/openhab/core/bundles/org.openhab.core.config.discovery/2.5.0-SNAPSHOT/org.openhab.core.config.discovery-2.5.0-SNAPSHOT.jar
/home/USER/.m2/repository/org/openhab/core/bundles/org.openhab.core.config.xml/2.5.0-SNAPSHOT/org.openhab.core.config.xml-2.5.0-SNAPSHOT.jar
/home/USER/.m2/repository/org/openhab/core/bundles/org.openhab.core.io.console/2.5.0-SNAPSHOT/org.openhab.core.io.console-2.5.0-SNAPSHOT.jar
/home/USER/.m2/repository/org/openhab/core/bundles/org.openhab.core.test/2.5.0-SNAPSHOT/org.openhab.core.test-2.5.0-SNAPSHOT.jar
/home/USER/.m2/repository/org/openhab/core/bundles/org.openhab.core.thing/2.5.0-SNAPSHOT/org.openhab.core.thing-2.5.0-SNAPSHOT.jar
/home/USER/.m2/repository/org/openhab/core/bundles/org.openhab.core.thing.xml/2.5.0-SNAPSHOT/org.openhab.core.thing.xml-2.5.0-SNAPSHOT.jar
/home/USER/.m2/repository/org/openhab/core/bundles/org.openhab.core.transform/2.5.0-SNAPSHOT/org.openhab.core.transform-2.5.0-SNAPSHOT.jar

Has anyone else encountered this?

I believe this can sometimes happen when you branch is out of sync with other snapshot dependencies. Because all runs on snapshot there is no strict fixed dependency, so when snapshots change this can case the problem. Try rebase you branch on the remove repo.

Do you run install on the complete repository? because that’s in most cases not really necessary.

1 Like

Hi, and thanks @hilbrand ,

I rebased my branch to master but still get the error. No luck even with mvn clean install -U -DwithResolver in master (commit 746ecb7a8f856f8e21ca31b61b5edd4c6a65b5b4)

I am trying to install the hue tests only, nothing else. The commands are executed in git/openhab2-addons/itests/org.openhab.binding.hue.tests.

Where does the “expected” checksums come from? I can certainly verify that the checksum in the logs match what is online if I download the file manualy…

Finally got it working, documenting the steps here.

I needed to reinstall the bom (in openhab2-addons repo) and refreshing snapshots ( “mvn clean install -U”). After that reinstalling itests test project worked with “mvn clean install -U -DwithResolver”

Hope this helps others running the integration tests.