OH3 build problem: Error assembling JAR

More than once I saw the following build error

[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.098 s
[INFO] Finished at: 2020-12-28T19:22:26+01:00
[INFO] Final Memory: 70M/250M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:3.0.2:jar (default-jar) on project org.openhab.binding.carnet: Error assembling JAR: Manifest file: /Users/markus/Dev/openhab-3/git/openhab-addons/bundles/org.openhab.binding.carnet/target/classes/META-INF/MANIFEST.MF does not exist. -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Usually I just need to re-run “mvn clean install” and it’s gone.
Any idea?

I have never seen that. Is it only happening on that binding?

Not sure so far, I worked on various bindings the last days to get PRs ready, saw this several times, but maybe only for this one.

The error sounds very strange and usually happens only once. A new mvn run passes without problems.

I already re-created the folder tree by switching branches and did a re-base.

Do you use eclipse? In which case I suspect eclipse auto build fights with maven where eclipse detects changes during maven build and starts also doing stuff. For that reason I sometimes disable auto build in eclipse when running a maven build (only to forget about it and wondering why eclipse doesn’t give errors on typos :man_facepalming:)


Yes I do, sounds like a reasonable reasons. I never had this with OH2 build environment, but it looks that the build process for OH3 is more complex = needs more time.

I’ll have an eye on it and let you know if that also happens when Eclipse is closed.

1 Like